Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Web Components: What, Why, How, When
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Peter Gasston
November 24, 2014
Technology
81
0
Share
Web Components: What, Why, How, When
Given at #lwsroots, 24th November 2014.
Peter Gasston
November 24, 2014
More Decks by Peter Gasston
See All by Peter Gasston
People Don’t Change
stopsatgreen
0
200
Your Reality Here
stopsatgreen
0
130
Growing Up, Getting Serious - #SotB6
stopsatgreen
1
380
Growing Up, Getting Serious
stopsatgreen
0
110
Surveying the Landscape — November 2016
stopsatgreen
1
200
Surveying the Landscape - Fronteers
stopsatgreen
2
520
The Web vs. The Browser
stopsatgreen
0
230
Surveying the Landscape Sept. 2016
stopsatgreen
1
460
Surveying the Landscape
stopsatgreen
4
910
Other Decks in Technology
See All in Technology
ジュニアエンジニアはSREとどう向き合うべきか
nrinetcom
PRO
0
100
The Making of AI Chips
pfn
PRO
0
630
Cortex(Code) を ML モデルの 精度改善サイクルに組み込む.pdf
oimo23
0
250
TSKaigi 2026 - enumよ、さようなら
teamlab
PRO
2
300
React Compiler導入の効果と運用の工夫
kakehashi
PRO
3
310
R&D 祭 2024 アニメエフェクト作成の効率化
olmdrd
PRO
0
110
障害対応のRunbookは作った、でも本当に動くの? AWS FIS で EKS の AZ 障害を再現してみた
tk3fftk
0
120
Loadbalancing exporter internals
ymotongpoo
1
120
Oracle AI Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
4
2.6k
サプライチェーン攻撃への備えについて考えている #湘なんか
stefafafan
2
2.2k
Oracle AI Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
6
1.7k
Purview Endpoint DLP 動かしてみた
kozakigh
1
460
Featured
See All Featured
First, design no harm
axbom
PRO
2
1.2k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
Amusing Abliteration
ianozsvald
1
170
New Earth Scene 8
popppiees
3
2.2k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
370
Design in an AI World
tapps
1
210
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
400
A Tale of Four Properties
chriscoyier
163
24k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
550
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Transcript
@stopsatgreen WEB COMPONENTS What, Why, How, When #LWSROOTS, 24/11
@stopsatgreen @stopsatgreen Peter Gasston broken-links.com
@stopsatgreen WEB COMPONENTS
@stopsatgreen ‘Demeaning’ ‘Condescending’ ‘A bit silly’
@stopsatgreen
@stopsatgreen
@stopsatgreen WHAT?
@stopsatgreen “The component model for the Web.”
@stopsatgreen A suite of technologies for making reusable UI controls
or services.
@stopsatgreen Fundamental change to the way we build the Web.
@stopsatgreen
@stopsatgreen
@stopsatgreen
@stopsatgreen ® The Lego Group
@stopsatgreen Custom Elements
@stopsatgreen Shadow DOM
@stopsatgreen HTML Imports
@stopsatgreen
@stopsatgreen Templates
@stopsatgreen WHY?
@stopsatgreen
@stopsatgreen OOCSS BEM Java Applets Dynamic Drive React Ember jQuery
UI Bootstrap Web Components
@stopsatgreen W3C WHATWG
@stopsatgreen
@stopsatgreen • jQuery : querySelector(), classList • Modernizr : @supports
• Sass : --custom-properties()
@stopsatgreen #extendthewebforward http://extensiblewebmanifesto.org/
@stopsatgreen <flex-carousel> <prev-next> <show-position> <open-lightbox>
@stopsatgreen http://msdn.microsoft.com/library/ie/ms531426.aspx
@stopsatgreen
@stopsatgreen
@stopsatgreen
@stopsatgreen meaningful naming + modularisation + encapsulation + sharing =
web components
@stopsatgreen HOW?
@stopsatgreen <indiana-jones></indiana-jones> document.registerElement('indiana-jones');
@stopsatgreen proto = Object.create(HTMLElement.prototype); proto.whip = function(…); document.registerElement('indiana-jones', { prototype:
proto }); indy = document.querySelector('indiana-jones'); indy.whip();
@stopsatgreen <button is="indiana-jones"></button> proto = Object.create(HTMLButtonElement.prototype); proto.whip = function(…); document.registerElement('indiana-jones',
{ prototype: proto, extends: 'button' });
@stopsatgreen
@stopsatgreen
@stopsatgreen var root = foo.createShadowRoot(); root.innerHTML = '<div>…</div>';
@stopsatgreen <indiana-jones> <template id="doom">…</template> <script>…</script> </indiana-jones>
@stopsatgreen <link rel="import" href="button-super.htm">
@stopsatgreen http://leafletjs.com/
@stopsatgreen <leaf-map lat="33.9186805" lon="8.1198406"></leaf-map> <link rel="import" href="leaflet-map.htm">
@stopsatgreen Everything Useful Useful & well-made Crap http://en.wikipedia.org/wiki/Sturgeon%27s_law
@stopsatgreen http://addyosmani.com/first/
@stopsatgreen http://www.paciellogroup.com/blog/2014/09/web-components-punch-list/
@stopsatgreen
@stopsatgreen
@stopsatgreen /path/to/library.min.js /path/to/a/library.min.js
@stopsatgreen <link rel="import" href="//foo.com/btn-a.htm"> <link rel="import" href="//bar.com/btn-b.htm"> <link rel="import" href="//baz.com/btn-c.htm">
@stopsatgreen WHEN?
@stopsatgreen Browser Custom Elements Shadow DOM HTML Imports Template Who
knows? ‘Under consideration’ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ http://jonrimmer.github.io/are-we-componentized-yet/
@stopsatgreen
Platform.js (polyfill) Polymer Core Bosonic Core Elements Brick Paper Elements
Elements polymer-project.org | brick.mozilla.io | bosonic.github.io | webcomponents.org Standard
@stopsatgreen Web Components are for you to drive the future
of the web. Please drive responsibly.
@stopsatgreen THE END
@stopsatgreen Unless otherwise stated, all photos in this deck are
copyright George Lucas or Mickey Mouse or someone and used without permission.