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
Privileged Apps with Vue.js
Search
masawada
November 15, 2014
Programming
0
150
Privileged Apps with Vue.js
masawada
November 15, 2014
Tweet
Share
More Decks by masawada
See All by masawada
よりよいレビュー環境を求めて / A code review odyssey
masawada
0
2.8k
フロントエンドの秩序は保たれているか?
masawada
0
3.9k
Getting Started with ScratchX
masawada
0
610
GyaPC::Asia Tokyo 2015 LT
masawada
0
1.4k
Chikubeam
masawada
1
1.4k
Git講習 2014.04.15
masawada
1
300
Hack U at UEC 2014.03.27
masawada
0
1.4k
Firefox OS勉強会 4th Untitled
masawada
0
1.1k
C Lecture 2013.09.19
masawada
0
140
Other Decks in Programming
See All in Programming
軽率にVue 3で リアルタイム3Dアプリを作れる ライブラリを作ってみた/vue-with-3d-app
drumath2237
3
1.1k
オレオレkaggle開発環境に Formatter/Linter入れてみた
stgkrt
0
350
UnityプログラミングバイブルR6号宣伝&Unity Logging小話
adarapata
0
110
人口ダッシュボード作成講座資料
jo76shin
0
170
GitHub Copilot Tips and Tricks
yuichielectric
2
240
プログラミングを楽しもう! / Enjoy Programming
chobishiba
1
680
TypeScript x GraphQLで2年開発してみて
yutank34
8
4.7k
PHPカンファレンス関西2024でLTとスタッフした
ohmori_yusuke
2
120
Deno に Web 標準 API を実装する / Implementing Web Standard API to Deno
petamoriken
0
310
マイ隙間家具OSSたちのご紹介
karupanerura
2
120
Learning Ruby
okuramasafumi
5
370
上手な探索的テストとその上達方法について
matsu802
1
430
Featured
See All Featured
Statistics for Hackers
jakevdp
789
220k
Raft: Consensus for Rubyists
vanstee
130
6.2k
Mobile First: as difficult as doing things right
swwweet
215
8.5k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
18
1.8k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
272
12k
Intergalactic Javascript Robots from Outer Space
tanoku
266
26k
What’s in a name? Adding method to the madness
productmarketing
PRO
14
2.5k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
111
35k
Build your cross-platform service in a week with App Engine
jlugia
223
17k
The Language of Interfaces
destraynor
150
22k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
56
13k
Stop Working from a Prison Cell
hatefulcrawdad
265
19k
Transcript
Privileged Apps with Vue.js Firefox OS ίʔυϦʔσΟϯάϛʔτΞοϓ #11 (2014/11/15) @masawada
͜ΜΜ
@masawada
None
FxOSϋοΧιϯͱ͔ओ࠵
http://masawada.me
εϥΠυ50ຕͳͷͰ ඈ͠·͢
Privileged Apps with Vue.js
Vue.js
MVVMϑϨʔϜϫʔΫ
MVCͷѥछΈ͍ͨͳͷ
ৄࡉׂѪ
(͜Θ͍͓͡͞Μ͜Θ͍)
Model View ViewModel
Model var model = { hello: “” };
View <body> <div id=“app”> <p v-text=“hello”></p> <input type=“text” v-model=“hello”> </div>
</body>
ViewModel var app = new Vue({ el: "#app", data: model
});
ViewͱModelΛ ViewModel͕όΠϯυ
None
Privileged Apps (ಛݖΞϓϦ)
Privileged Apps ɾHosted AppsͰ͑ͳ͍API͕͑Δ ɾmanifest.webappʹࢦఆΛॻ͘ ɾ੍͍͔ͭ͘ݶ͕͋Δ ɾΞϓϦΛެ։͢Δͱ͖ʹ৹͕ࠪ͋Δ
੍͍͔ͭ͘ݶ͕͋Δ
CSP
Content Security Policy
Content Security Policy ɾؔίϯετϥΫλͷېࢭ ɾeval ͷېࢭ ͳͲͳͲ… https://developer.mozilla.org/ja/Apps/CSP ΛݟͯͶ
Vue.js
ؔίϯετϥΫλଟ༻ͯͨ͠
None
ͬͨͥ
Ͳ͏࣮ͬͯݱ͍ͯ͠Δ͔
mmckegg/notevil
mmckegg/notevil ɾNode.jsͷϞδϡʔϧ ɾVue.jsͰ͜ΕΛforkͯ͠ґଘϥΠϒϥϦΛ݁߹ ɾariya/esprimaͰparseͯ͠Δ ɾάϩʔόϧΦϒδΣΫτʹΞΫηε͠ͳ͍
mmckegg/notevil case 'BinaryExpression': var l = walk(node.left) var r =
walk(node.right) switch(node.operator) { case '==': return l === r case '===': return l === r
.oO(not evil …?)
ศརͳͷͰ͍·͠ΐ͏
ݱ͔ΒҎ্Ͱ͢
༨ஊ
ίʔυϦʔσΟϯάͷ ͓ͱʹ
git find ίϚϯυ
git find ɾgit subcommand ɾPATHͷ௨Δॴʹgit-findϑΝΠϧΛஔ͘ → git findͰ࣮ߦͰ͖Δ ɾpeco͕ඞཁ
pecoͷΠϯετʔϧ (mac) $ brew tap peco/peco $ brew install peco
None
None
None
None
࠷ߴ
git find DST_PATH=$(git grep -n $1 | grep -v "[0-9]:\s*//"
| peco | awk -F ":" '{print "-c "$2" "$1}'); if [ ${#DST_PATH} -ne 0 ]; then vim $DST_PATH; fi
[git find peco][ݕࡧ]
ͥͻ͓͍͍ͩ͘͞
͋Γ͕ͱ͏͍͟͝·ͨ͠