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
8.1k
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
480
エンジニアは会社に何を求めるか? / What does engineers wants the company?
aggre
0
130
The importance ofopen assets
aggre
0
69
Fully AMP pros and cons
aggre
0
190
OSS の持続的開発をトークンエコノミーで支援する / Dev Token @OSS Universe
aggre
1
380
OSS の持続的開発をトークンエコノミーで支援する / Dev Token @CryptoBowl
aggre
1
440
Mastering lit-html directive
aggre
0
440
非中央集権ウェブ / Decentralized Web
aggre
3
590
OSS の持続的開発をトークンエコノミーで支援する / Dev Token
aggre
0
510
Other Decks in Technology
See All in Technology
全員が手を動かす組織へ - 生成AIが変えるTVerの開発現場 / everyone-codes-genai-transforms-tver-development
tohae
0
220
LLMで構造化出力の成功率をグンと上げる方法
keisuketakiguchi
0
980
AIは変更差分からユニットテスト_結合テスト_システムテストでテストすべきことが出せるのか?
mineo_matsuya
2
880
開発 × 生成AI × コミュニケーション:GENDAの開発現場で感じたコミュニケーションの変化 / GENDA Tech Talk #1
genda
0
290
UDDのススメ - 拡張版 -
maguroalternative
1
600
Amazon Q と『音楽』-ゲーム音楽もAmazonQで作成してみた感想-
senseofunity129
0
160
[kickflow]20250319_少人数チームでのAutify活用
otouhujej
0
130
Google Agentspaceを実際に導入した効果と今後の展望
mixi_engineers
PRO
3
760
リモートワークで心掛けていること 〜AI活用編〜
naoki85
0
180
プロダクトエンジニアリングで開発の楽しさを拡張する話
barometrica
0
200
Cloud WANの基礎から応用~少しだけDeep Dive~
masakiokuda
3
110
オブザーバビリティ文化を組織に浸透させるには / install observability culture
mackerelio
0
150
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
231
18k
Building Adaptive Systems
keathley
43
2.7k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Intergalactic Javascript Robots from Outer Space
tanoku
272
27k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.3k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
GitHub's CSS Performance
jonrohan
1031
460k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3k
Designing for humans not robots
tammielis
253
25k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
30
9.6k
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