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
10分で理解する HTML Modules
Search
takanorip
November 19, 2020
Technology
1.4k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
10分で理解する HTML Modules
takanorip
November 19, 2020
More Decks by takanorip
See All by takanorip
今さら理解するウェブフォントver.2026
takanorip
3
610
AI-Slopなデザインを生まないためのデザインプロセス戦略
takanorip
10
6.2k
「見せる」登壇資料デザインの極意
takanorip
7
1.7k
Design System Documentation Tooling 2025
takanorip
3
3.1k
デザインエンジニアの延長にデザインマネージャーとしての可能性を探る
takanorip
1
1.4k
Tools for Design Engineers other than LLM in the LLM era
takanorip
1
910
Bulletproof Design System with TypeScript
takanorip
7
5.4k
Eleventy3.0 で始める爆速個人ブログ開発!
takanorip
0
320
Webフォント選定の極意!フォントの基本から最新トレンドまで徹底解説
takanorip
6
1.2k
Other Decks in Technology
See All in Technology
並行性の問題を防げ!実践トランザクション入門
occhi
0
280
全人類(ほぼ)AWS Organizations の上でAWSを利用している、その世界を知る話
htan
1
130
AIがコードを書く時代に、エンジニアは何で自分の価値を証明するのか / In an era where AI writes code how do engineers prove their value
carta_engineering
1
750
実体験から学ぶ分析エージェントの開発と運⽤
recruitengineers
PRO
8
1.9k
Datadog の学び方 - あるいは、オブザーバビリティを学ぶとは何か
mananyuki
1
530
生成AIを使って「人が」考える技術 ― AI時代の人機共想と実践ノウハウ|UNITT AC2026
ishiirikie
0
580
自作バイナリを動かす「入口」8選
puhitaku
1
1.2k
FOSS4Gを活用した自治体業務DXの試み
470715
0
140
「Docker Desktop不要の時代」は 来たのか?
ueponx
0
430
事業活動を AI Ready にする攻めと守りのデータエンジニアリング / data-engineering-for-ai-ready-business
pei0804
7
2.4k
カンファレンスに参加した後の浮遊感とセルフケア
pauli
0
320
V8のArray.prototype.flatを最大約20倍速くするまでと、巨大OSSへの大規模コミットの道のり
riyaamemiya
0
130
Featured
See All Featured
Marketing to machines
jonoalderson
1
5.9k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
450
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Designing Experiences People Love
moore
143
24k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.9k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
540
A Soul's Torment
seathinner
8
3.7k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
720
We Have a Design System, Now What?
morganepeng
55
8.4k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Transcript
10分で理解する HTML Modules Takanori Oki / 20201119 / 隅田川.js
自己紹介 • Takanori Oki / @takanorip / @takanoripe(Twitter) • UIデザイナー、フロントエンドエンジニア
• Web Platform Study GroupのOrganizer • https://www.youtube.com/channel/UCfToJ- sTOqvBnnuVq3zdZhA • 月1回くらいYouTubeでライブ配信してます • Web標準やブラウザ実装についての話を中心に話してます
HTML Imports
HTML Imports(Abandoned) • CustomElementsを外部からインポートする機能 • Chromeに先行実装されてたが様々な課題があり、開発が停止 • Global object pollution
• Parse blocking with inline script • Independent dependency resolution infrastructures between HTML Imports and ES6 Script Modules • Non-intuitive import pass through
HTML Modules
HTML Modules • https://github.com/WICG/webcomponents/issues/645 • ES Modulesの仕組みに乗っかってHTML、CSS、JSONをJavaScript ファイルの中にインポートしようという仕組み • セキュリティ課題が見つかり開発が進んでいなかったが、TC39で
提案されているImport Assertionsが実装されれば解決されそう • https://github.com/tc39/proposal-import-assertions
Import Assertions
Import Assertions • Import文にインライン構文を追加し、ファイルの情報を補足する • ファイル拡張子とHTTP Content Typeヘッダがミスマッチなことが 多いため、拡張子からモジュールタイプを判断することが難しい
CSS Modules • ES Modulesを拡張して、CSSファイルからCSSStyleSheetをインポート できるようにする仕様 • CSSStyleSheetはadoptedStyleSheetsを介してdocumentまたは shadowRootに追加できる •
https://wicg.github.io/construct-stylesheets/#using- constructed-stylesheets • 最近LitElementでこのCSS Modulesに対応するための変更があった
CSS Modules
まとめ • HTML ModulesはJavaScriptの中でHTMLをモジュールとして 扱うための技術 • CSSやJSONもモジュールとして扱えるようになるかも • CSS in
JSがこのCSS Modulesをベースに作り変えられるかも? • 今後の動向に注目!
Thank you!