Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Web Components v1
Search
hemanth.hm
April 13, 2017
Programming
140
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Web Components v1
Quick intro to Web Components v1
hemanth.hm
April 13, 2017
More Decks by hemanth.hm
See All by hemanth.hm
Rethink Async
gnumanth
1
130
Harmony with ES6!
gnumanth
6
1.3k
Ants and Algorithm
gnumanth
1
150
NoSQL?
gnumanth
2
270
Google's whitepaper
gnumanth
3
180
Python Intro
gnumanth
1
410
Other Decks in Programming
See All in Programming
App Intentsのビルドプロセスを支える技術
kntkymt
0
180
初心者DevRelとして参加者だった私が、DevRel Talks!#2に登壇するまでにしてきたこと
sokohirai
0
360
LL言語やWebフレームワークのPostgreSQL対応 〜DBの機能がユーザーに届くまで〜
kentaroutakeda
0
150
AIの中の人になってみる
htkym
0
170
GKE で Pod の見方を変えたら、スケールアウト時の挙動を真に捉えられた話
stkk
0
110
Building an Out-of-Order CPU
latte72
1
750
デプロイ直後のレイテンシスパイクを調べたら、 Railsの仕様にたどり着いた
nhsykym
0
110
App Storeの外へ──日本のiOSサイドローディング入門 for iOSDC Japan 2026
yuukiw00w
0
140
個人開発基盤をまるごとCloudflareに引っ越して爆速で総合的体験を向上させた話
tinykitten
0
140
AWS DevOps Agentで インシデント対応をAIに任せたい
honmarkhunt
7
2.7k
ALB ログから Trace を気合で繋げる技術
fohte
7
880
XHTMLが残したもの
yosuke_furukawa
PRO
2
640
Featured
See All Featured
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
880
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
Raft: Consensus for Rubyists
vanstee
141
7.7k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.8k
Building Applications with DynamoDB
mza
96
7.2k
sira's awesome portfolio website redesign presentation
elsirapls
0
410
The SEO identity crisis: Don't let AI make you average
varn
0
550
YesSQL, Process and Tooling at Scale
rocio
174
15k
Mind Mapping
helmedeiros
1
350
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
400
Paper Plane
katiecoart
PRO
3
53k
Skip the Path - Find Your Career Trail
mkilby
1
220
Transcript
Web Componentes
· <template> tag · HTML imports · Shadow DOM ·
Custom Elements
<template>
'content' in document.createElement('template');
Activating <template>: var t = document.querySelector('#aweTemplate'); var clone = document.importNode(t.content,
true); document.body.appendChild(clone);
DEMO
HTML imports
'import' in document.createElement('link');
<link rel="import" href="/imports/aweTemplate.html"> <link rel="import" href="/imports/aweTemplate.html" onload="handleLoad(event)" onerror="handleError(event)">
const link = document.querySelector('link[rel=import]'); const xkcd = link.import; // Access
DOM of the document in aweTemplate const cartoon = xkcd.querySelector('img');
const aweDoc = document.currentScript.ownerDocument;
DEMO
Shadow DOM
const supportsShadowDOMV1 = !!HTMLElement.prototype.attachShadow;
const host = document.body.createShadowRoot(); host.innerHTML = "<p>I'm a <em>shadow</em> dom!</p>";
document.appendChild(host);
DEMO
Custom Elements
const supportsCustomElements = 'customElements' in window;
class AweElement extends HTMLElement {...} window.customElements.define('awe-element', AppDrawer);
window.customElements.define('awe-element', class extends HTMLElement {...});
class AweElement extends HTMLElement { constructor() { super(); // Don't
forget ... } connectedCallback() { ... } disconnectedCallback() { ... } attributeChangedCallback(attrName, oldVal, newVal) { ... } }
None
DEMO
None
None
h3manth.com @gnumanth
None