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
VueではじめるWeb Components
Search
hitsuji-haneta
September 06, 2019
Programming
580
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
Generative UI & AI-Assistants for Your Angular Solutions
manfredsteyer
PRO
1
220
Prismを使った型安全な暗号化_関数型まつり2026
_fhhmm
0
150
なぜ関数型プログラミングで「型」と「証明」が語られるのか #fp_matsuri
kajitack
3
1k
【やさしく解説 設計編・中級 #4】ルールの寿命と、システムの年輪
panda728
PRO
2
170
Terraform標準の組織で AWS CDKをどう使うか
mu7889yoon
1
360
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
390
GitHubCopilotCLIのスラッシュコマンドを自作してみる
htkym
0
100
【やさしく解説 設計編 #0】DDDのコード、読めるのに分からない人へ
panda728
PRO
2
280
yield再入門 #phpcon
o0h
PRO
0
740
言語を使う側から、作る側へ。 自作 Lisp で得た新たな気づき。
andpad
0
130
鹿野さんに聞く!『TypeScriptコードレシピ集』で磨く実践力
tonkotsuboy_com
4
1.2k
Hatena Engineer Seminar #37「言語モデルの活用に関する研究」
slashnephy
0
550
Featured
See All Featured
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
120k
A Soul's Torment
seathinner
6
3.1k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
880
Optimising Largest Contentful Paint
csswizardry
37
3.8k
Mobile First: as difficult as doing things right
swwweet
225
10k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
What's in a price? How to price your products and services
michaelherold
247
13k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
810
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.9k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
160
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 で はじめてみませんか?
ありがとうございました