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
400
Other Decks in Programming
See All in Programming
Claude Codeセッション現状確認 2026福岡 / fukuoka-aicoding-00-beacon
monochromegane
4
400
JPUG勉強会 OSSデータベースの内部構造を理解しよう
oga5
2
250
猫の手も借りたい!ので AIエージェント猫を作って社内に放した話 Claude Code × Container Lambda の Slack Bot "DevNeko"
naramomi7
0
250
AI主導でFastAPIのWebサービスを作るときに 人間が構造化すべき境界線
okajun35
0
600
モジュラモノリスにおける境界をGoのinternalパッケージで守る
magavel
0
3.4k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
270
Rubyと楽しいをつくる / Creating joy with Ruby
chobishiba
0
210
株式会社 Sun terras カンパニーデック
sunterras
0
2k
Fundamentals of Software Engineering In the Age of AI
therealdanvega
1
220
朝日新聞のデジタル版を支えるGoバックエンド ー価値ある情報をいち早く確実にお届けするために
junkiishida
1
380
maplibre-gl-layers - 地図に移動体たくさん表示したい
kekyo
PRO
0
200
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
13
7.7k
Featured
See All Featured
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
100
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.1k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
[SF Ruby Conf 2025] Rails X
palkan
2
820
Thoughts on Productivity
jonyablonski
75
5.1k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
770
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
150
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.4k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Being A Developer After 40
akosma
91
590k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
97
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