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
ISUCON14公式反省会LT: 社内ISUCONの話
astj
PRO
0
140
Amazon Nova Reelの可能性
hideg
0
240
ASP.NET Core の OpenAPIサポート
h455h1
0
150
Terraform で作る Amazon ECS の CI/CD パイプライン
hiyanger
0
110
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
4
1.1k
2,500万ユーザーを支えるSREチームの6年間のスクラムのカイゼン
honmarkhunt
6
3.6k
最近のVS Codeで気になるニュース 2025/01
74th
1
230
EC2からECSへ 念願のコンテナ移行と巨大レガシーPHPアプリケーションの再構築
sumiyae
3
620
Alba: Why, How and What's So Interesting
okuramasafumi
0
240
DevFest - Serverless 101 with Google Cloud Functions
tunmise
0
140
[Fin-JAWS 第38回 ~re:Invent 2024 金融re:Cap~]FaultInjectionServiceアップデート@pre:Invent2024
shintaro_fukatsu
0
310
ErdMap: Thinking about a map for Rails applications
makicamel
1
930
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
244
12k
GitHub's CSS Performance
jonrohan
1030
460k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
YesSQL, Process and Tooling at Scale
rocio
170
14k
Building an army of robots
kneath
302
45k
Making Projects Easy
brettharned
116
6k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
Typedesign – Prime Four
hannesfritz
40
2.5k
Faster Mobile Websites
deanohume
305
30k
Making the Leap to Tech Lead
cromwellryan
133
9k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7.1k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.5k
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