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
VueではじめるWeb Components
Search
hitsuji-haneta
September 06, 2019
Programming
590
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
VueではじめるWeb Components
hitsuji-haneta
September 06, 2019
More Decks by hitsuji-haneta
See All by hitsuji-haneta
SSIで覗き見るPWAの世界 / SSI on PWA
hitsuji_haneta
2
1.2k
GoとMicroserviceでDDDやってみました
hitsuji_haneta
0
420
やってみたよVueNative
hitsuji_haneta
2
510
これもフロントエンド!画面つきスピーカーで遊んでみた
hitsuji_haneta
0
120
webエンジニア向けブロックチェーンの技術的「へぇ」 / Blockchain tech tips for web developers
hitsuji_haneta
0
170
Other Decks in Programming
See All in Programming
GraphQL の onError と Nullability のこれから
quramy
0
170
ChromeでローカルLLM
ryu1013
0
160
Lambda durable functionsでHuman in the Loopを楽に…楽に……
har1101
1
180
JIS keyboard support in Omarchy
lef237
0
150
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
3
1k
最近”作らせてる” ローカルAIアプリの話
akit37
0
490
No More NoSuchMethodError
exoego
1
110
Kotlinize Is Not Just Converting to Kotlin
chigichan24
1
180
HTML-in-Canvasで作る未来のWeb UI表現
clockmaker
5
5.2k
우리의 Nitro Modules는 당신의 Turbo Modules보다 아름답다
l2hyunwoo
0
110
🇪🇸 React Alicante 2026 (Workshop)
ythecombinator
PRO
0
100
あなたの await、OS まで届いてる? strace で覗く JavaScript の非同期
hasutosasaki
1
940
Featured
See All Featured
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
300
Being A Developer After 40
akosma
PRO
92
590k
The Pragmatic Product Professional
lauravandoore
37
7.5k
Test your architecture with Archunit
thirion
2
2.4k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
20k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.9k
Scaling GitHub
holman
464
140k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
The Limits of Empathy - UXLibs8
cassininazir
2
730
Java REST API Framework Comparison - PWX 2021
mraible
34
9.8k
WENDY [Excerpt]
tessaabrams
14
40k
Transcript
Vue Web components ではじめる
自己紹介 高橋翔太 hitsuji-haneta thinkShake製作所 代表 LasTrust株式会社 CTO h1tsuj1_haneta
突然ですが皆さん
ってご存知ですか?? Web components
ライブラリなしで HTMLコンポーネント をカスタムできる ブラウザでサポート
Custom Elements Shadow DOM HTML Template
例 const template = document.createElement('template'); template.innerHTML = ` <style>…</style> <div>…</div>
`; class Button extends HTMLElement { constructor() { … this.$button .addEventListener('click', () => { console.log(this.message); }); } … } window .customElements .define(‘my-button', Button); my-button.js <script type=“module" src=“./my-button.js”> </script> <div> <h1>hello</h1> <my-button label=“hello” message=“world"> </my-button> </div> hoge.html
動かしてみると
vueの勉強会 なんですけど?
૬ੑൈ܈ʂ
メリット MyButton
メリット MyButton どんなフレームワークでも 使えちゃう
なぜ調べたか? BCライブラリ群 UI シンプルに使いたい…
<template> <div id="app"> <my-button label="hello" message=“world"/> </div> </template> <script> import
‘./components/my-button’; export default { ... }; </script> <style> ... </style> hoge.vue
ͪΐʔ؆୯
$ vue-cli-service build --target wc —-name my- button ./MyButton.vue <script
src=“https://unpkg.com/vue"></script> <script type=“module src=“./dist/my-button.js”> </script> <div> <h1>hello</h1> <my-button label=“hello” message=“world"> </my-button> </div> hoge.html
Vue Web components で はじめてみませんか?
ありがとうございました