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 のリアル/ Realistic Web Components
Search
aggre
November 25, 2018
Technology
12
8k
Web Components のリアル/ Realistic Web Components
HTML5 Conference 2018 (
https://events.html5j.org/conference/2018/11/
)での資料です
aggre
November 25, 2018
Tweet
Share
More Decks by aggre
See All by aggre
The money for the openable and shareable era
aggre
0
460
エンジニアは会社に何を求めるか? / What does engineers wants the company?
aggre
0
120
The importance ofopen assets
aggre
0
58
Fully AMP pros and cons
aggre
0
180
OSS の持続的開発をトークンエコノミーで支援する / Dev Token @OSS Universe
aggre
1
360
OSS の持続的開発をトークンエコノミーで支援する / Dev Token @CryptoBowl
aggre
1
420
Mastering lit-html directive
aggre
0
430
非中央集権ウェブ / Decentralized Web
aggre
3
570
OSS の持続的開発をトークンエコノミーで支援する / Dev Token
aggre
0
500
Other Decks in Technology
See All in Technology
LangfuseでAIエージェントの 可観測性を高めよう!/Enhancing AI Agent Observability with Langfuse!
jnymyk
1
180
【2025年度新卒技術研修】100分で学ぶ サイバーエージェントのデータベース 活用事例とMySQLパフォーマンス調査
cyberagentdevelopers
PRO
5
7k
開発視点でAWS Signerを考えてみよう!! ~コード署名のその先へ~
masakiokuda
3
160
ワールドカフェI /チューターを改良する / World Café I and Improving the Tutors
ks91
PRO
0
100
食べログが挑む!飲食店ネット予約システムで自動テスト無双して手動テストゼロを実現する戦略
hagevvashi
3
360
MCP Documentation Server @AI Coding Meetup #1
yyoshiki41
2
2.6k
AWS Control Towerを 数年運用してきての気づきとこれから/aws-controltower-ops-tips
tadayukinakamura
0
110
OpenSearchでレガシーな検索処理の大幅改善をやってやろう
dznbk
2
160
LiteXとオレオレCPUで作る自作SoC奮闘記
msyksphinz
0
370
AWSのマルチアカウント管理 ベストプラクティス最新版 2025 / Multi-Account management on AWS best practice 2025
ohmura
4
230
プロダクト開発におけるAI時代の開発生産性
shnjtk
2
210
「それはhowなんよ〜」のガイドライン #orestudy
77web
9
2.4k
Featured
See All Featured
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.3k
It's Worth the Effort
3n
184
28k
Become a Pro
speakerdeck
PRO
27
5.3k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
A Tale of Four Properties
chriscoyier
158
23k
How STYLIGHT went responsive
nonsquared
99
5.5k
Embracing the Ebb and Flow
colly
85
4.6k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
StorybookのUI Testing Handbookを読んだ
zakiyama
29
5.6k
Building Adaptive Systems
keathley
41
2.5k
Designing Experiences People Love
moore
141
24k
Transcript
Web Components HTML5 Conference 2018 @2018-11-25
aggre @aggre_ @aggre FRAME00, INC. CTO aggre.io
• Web Components (5min) • Web Components (5min) • Web
Components (10min) • Web Components (20min)
Web Components
Custom Elements Shadow DOM HTML Templates ES Modules
Custom Elements Shadow DOM HTML Templates ES Modules / Production-ready
Custom Elements Shadow DOM HTML Templates ES Modules Edge Developing
‼
IE
IE • Windows 10 Edge • Windows 7 2020 1
• Windows 8.1 ? Edge … App
None
Polyfills IE, Edge
Polyfills IE, Edge Shadow DOM
• / Polyfills OK • Edge , IE 2020 Polyfills
Web Components
• Custom Elements • Shadow DOM • HTML Templates •
HTML Imports
• Custom Elements • Shadow DOM • ES Modules
• Custom Elements • Shadow DOM • HTML Templates •
HTML Imports • Custom Elements • Shadow DOM • ES Modules
None
HTML
HTML
Custom Elements
Custom Elements
None
Custom Elements Shadow DOM ES Modules
Custom Elements Shadow DOM ES Modules Custom Elements Shadow DOM
DOM
Custom Elements
None
None
DOM createElement()
DOM createElement()
None
None
None
destroy
observedAttributes DOM
observedAttributes DOM
iframe adoptNode() ownerDocument
iframe adoptNode() ownerDocument
Shadow DOM
DOM
CSS
Shadow DOM
None
Shadow DOM
<slot>
<slot> Shadow DOM slot slot
None
slot
None
Shadow DOM slot
• Custom Elements • • Shadow DOM DOM • slot
Shadow DOM
Web Components
• • • • SSR • more…
Web Components
None
size=large
Web Components
e.g. <iron-autogrow-textarea>
e.g. <pinch-zoom>
Web Components xxx-dnd … <drag-and-drop>
None
Web Components
e.g. React
e.g. React Shadow DOM React render
• Web Components • React, Angular, Vue… • • •
:
SSR Shadow DOM slot Hydrate SSR
HTML
shadowRoot <slot> render shadowRoot
shadowRoot <slot> render shadowRoot slot
shadowRoot <slot> render shadowRoot Hydrate
shadowRoot <slot> render shadowRoot SSR
• Custom Elements • Shadow DOM, slot • •
Web Components
…
None
Web Components
• • lit-html • Web Components • lit-html Web Components
• lit-element • Angular/Vue
• lit-html • lit-html Web Components • lit-element • Angular/Vue
• lit-html • lit-html Web Components • lit-element • Angular/Vue
Web Components
• lit-html • lit-html Web Components • lit-element • Angular/Vue
FW FW Web Components
• lit-html • lit-html Web Components • lit-element • Angular/Vue
( )
None
• • innerHTML addEventListener DOM API •
lit-html ( lit-html )
None
lit-html
lit-html
lit-html html, render directive 3 API
lit-html Tagged Templates
lit-html HTML
lit-html HTML DOM DOM
lit-html DOM
lit-html textContent <p>
@Event
?attribute
.property DOM
Intellisense for lit-html typescript-lit-html-plugin, vscode-lit-html
lit-html • lit-html • Intellisense • Web Components • …
• lit-html • lit-element
lit-element
None
None
lit-html React.Component
lit-element • TypeScript Native • lit-html • Web Components •
@property({type: X}) • • lit-html .property
lit-html
None
None
lit-html
None
<header>
<nav>
<article>
<footer>
JSX lit-html
RxJS
fit-html Redux + lit-html
Directive API
Directive API 1
Directive API 0 -1
Directive API directive
Directive API
Directive API render
lit-html • TypeScript Native • JSX • Directive API •
• Vue/Angular HTML React
appendix
lit-html, hyperHTML, htm Tagged Templates
lit-html
hyperHTML
hyperHTML bind() DOM
hyperHTML wire()
htm
htm htm ( preact )
htm JSX
htm …
lit-html hyperHTML htm • (HTML Template Instantiation) • PolymerLabs/template-instantiation •
Directive API • ES5 • Node.js • Tagged Templates JSX • preact vhtml developit/ WebReflection/ Polymer/
( TypeScript Native lit-html )
• lit-element Web Components • FP lit-html ( )
• / Polyfills OK • Edge , IE 2020 Polyfills
• Custom Elements • Shadow DOM DOM • slot Shadow DOM • • • lit-element Web Components • FP lit-html
Thank you! @aggre_ @aggre aggre.io