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 v1
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
hemanth.hm
April 13, 2017
Programming
1
130
Web Components v1
Quick intro to Web Components v1
hemanth.hm
April 13, 2017
Tweet
Share
More Decks by hemanth.hm
See All by hemanth.hm
Rethink Async
gnumanth
1
110
Harmony with ES6!
gnumanth
6
1.2k
Ants and Algorithm
gnumanth
1
130
NoSQL?
gnumanth
2
260
Google's whitepaper
gnumanth
3
160
Python Intro
gnumanth
1
390
Other Decks in Programming
See All in Programming
Package Management Learnings from Homebrew
mikemcquaid
0
210
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
例外処理とどう使い分ける?Result型を使ったエラー設計 #burikaigi
kajitack
16
6k
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
450
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
660
Implementation Patterns
denyspoltorak
0
280
2026年 エンジニアリング自己学習法
yumechi
0
130
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
1k
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
450
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
220
AIエージェント、”どう作るか”で差は出るか? / AI Agents: Does the "How" Make a Difference?
rkaga
4
2k
AWS re:Invent 2025参加 直前 Seattle-Tacoma Airport(SEA)におけるハードウェア紛失インシデントLT
tetutetu214
2
110
Featured
See All Featured
Everyday Curiosity
cassininazir
0
130
[SF Ruby Conf 2025] Rails X
palkan
1
740
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
430
Done Done
chrislema
186
16k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.6k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.7k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
280
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.2k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
210
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
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