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
WebComponents or shadow side of the Doom
Search
Grzegorz Wilczyński
November 17, 2014
Programming
0
48
WebComponents or shadow side of the Doom
WebComponents or shadow side of the Doom
Grzegorz Wilczyński
November 17, 2014
Tweet
Share
More Decks by Grzegorz Wilczyński
See All by Grzegorz Wilczyński
REWRITE'EM ALL
gwilczynski
2
460
Chain made out of coins - smart introduction to blockchain
gwilczynski
0
92
clean code
gwilczynski
0
130
git scm in one hour
gwilczynski
0
110
Single responsibility principle
gwilczynski
2
190
Productivity for Programmers
gwilczynski
3
200
Git branching model for TAPTeam
gwilczynski
0
920
JS design patterns
gwilczynski
6
360
Other Decks in Programming
See All in Programming
各クラウドサービスにおける.NETの対応と見解
ymd65536
0
110
PHPUnitしか使ってこなかった 一般PHPerがPestに乗り換えた実録
mashirou1234
0
230
PHPとAPI Platformで作る本格的なWeb APIアプリケーション(入門編) / phpcon 2024 Intro to API Platform
ttskch
0
270
PSR-15 はあなたのための ものではない? - phpcon2024
myamagishi
0
140
これが俺の”自分戦略” プロセスを楽しんでいこう! - Developers CAREER Boost 2024
niftycorp
PRO
0
190
Beyond ORM
77web
7
950
103 Early Hints
sugi_0000
1
230
コンテナをたくさん詰め込んだシステムとランタイムの変化
makihiro
1
140
php-conference-japan-2024
tasuku43
0
320
ブラウザ単体でmp4書き出すまで - muddy-web - 2024-12
yue4u
3
480
わたしの星のままで一番星になる ~ 出産を機にSIerからEC事業会社に転職した話 ~
kimura_m_29
0
180
「とりあえず動く」コードはよい、「読みやすい」コードはもっとよい / Code that 'just works' is good, but code that is 'readable' is even better.
mkmk884
3
500
Featured
See All Featured
A designer walks into a library…
pauljervisheath
204
24k
Fireside Chat
paigeccino
34
3.1k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
A better future with KSS
kneath
238
17k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
Thoughts on Productivity
jonyablonski
67
4.4k
It's Worth the Effort
3n
183
28k
GitHub's CSS Performance
jonrohan
1030
460k
How To Stay Up To Date on Web Technology
chriscoyier
789
250k
Code Review Best Practice
trishagee
65
17k
Transcript
WebComponents or shadow side of the Doom Grzegorz Wilczyński @wilq_
Wrocław, 17.11.2014
But Why?
Four Horsemen Custom Elements HTML Imports Templates Shadow DOM
Custom Elements <polymer-element name="post-list" extends="post-list-base" attributes="type posts"> <template> </template> </polymer-element>
Custom Elements <post-list> post list </post-list> ! <post-list posts="{foo: 'bar'}"
type="pretty"> post list with attributes </post-list>
Templates <template repeat="{{post in posts}}"> <post-card> <img src="{{post.avatar}}"> <h2>{{post.username}}</h2> <p>{{post.text}}</p>
</post-card> </template>
Templates <template> <div class="card-header" layout horizontal center> <content select="img"></content> <content
select="h2"></content> </div> <content></content> <template>
Shadow DOM
None
Shadow DOM Shadow DOM gives us DOM tree encapsulation and
style boundaries, but please don't: ! :host([data-post-status="warning"]) /deep/ #postState /deep/ #submitButton /deep/ core- icon { color: #259b24; }
HTML Imports <link rel="import" href="foo/bar.html">
Are We Componentized Yet? X-Tags by Mozilla Polymer by Google
Bosonic
Warehouse Search Bower Packages Component Kitchen Custom Elements
Sources http://webcomponents.org https://www.polymer-project.org http://pascalprecht.github.io/dont- stop-thinking-about-tomorrow/ http://jonrimmer.github.io/are-we- componentized-yet/
Thank YOU