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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
hemanth.hm
April 13, 2017
Programming
130
1
Share
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
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
400
Other Decks in Programming
See All in Programming
Vibe하게 만드는 Flutter GenUI App With ADK , 박제창, BWAI Incheon 2026
itsmedreamwalker
0
540
Codex CLIのSubagentsによる並列API実装 / Parallel API Implementation with Codex CLI Subagents
takatty
2
850
AI時代のPhpStorm最新事情 #phpcon_odawara
yusuke
0
110
煩雑なSkills管理をSoC(関心の分離)により解決する――関心を分離し、プロンプトを部品として育てるためのOSSを作った話 / Solving Complex Skills Management Through SoC (Separation of Concerns)
nrslib
3
520
存在論的プログラミング: 時間と存在を記述する
koriym
5
780
Codex CLI でつくる、Issue から merge までの開発フロー
amata1219
0
320
実践ハーネスエンジニアリング #MOSHTech
kajitack
7
5.9k
「速くなった気がする」をデータで疑う
senleaf24
0
150
Radical Imagining - LIFT 2025-2027 Policy Agenda
lift1998
0
250
車輪の再発明をしよう!PHP で実装して学ぶ、Web サーバーの仕組みと HTTP の正体
h1r0
3
500
3分でわかるatama plusのQA/about atama plus QA
atamaplus
0
110
Don't Prompt Harder, Structure Better
kitasuke
0
190
Featured
See All Featured
The SEO Collaboration Effect
kristinabergwall1
0
420
Done Done
chrislema
186
16k
Tell your own story through comics
letsgokoyo
1
880
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
220
Scaling GitHub
holman
464
140k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
110k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
330
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
How to Ace a Technical Interview
jacobian
281
24k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
240
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