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
91
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
TypeScript Graph でコードレビューの心理的障壁を乗り越える
ysk8hori
2
1.1k
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
170
Click-free releases & the making of a CLI app
oheyadam
2
120
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
Enabling DevOps and Team Topologies Through Architecture: Architecting for Fast Flow
cer
PRO
0
340
CSC509 Lecture 11
javiergs
PRO
0
180
ECS Service Connectのこれまでのアップデートと今後のRoadmapを見てみる
tkikuc
2
250
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
250
レガシーシステムにどう立ち向かうか 複雑さと理想と現実/vs-legacy
suzukihoge
14
2.2k
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
8
540
TypeScriptでライブラリとの依存を限定的にする方法
tutinoko
3
690
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
260
Featured
See All Featured
A Philosophy of Restraint
colly
203
16k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
The Cult of Friendly URLs
andyhume
78
6k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
720
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Agile that works and the tools we love
rasmusluckow
327
21k
Become a Pro
speakerdeck
PRO
25
5k
For a Future-Friendly Web
brad_frost
175
9.4k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Producing Creativity
orderedlist
PRO
341
39k
A Tale of Four Properties
chriscoyier
156
23k
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