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
Direct ProxiesでObject.observeの Polyfillはできるのか
Search
Kazuhito Hokamura
December 18, 2014
Programming
0
650
Direct ProxiesでObject.observeの Polyfillはできるのか
Kazuhito Hokamura
December 18, 2014
Tweet
Share
More Decks by Kazuhito Hokamura
See All by Kazuhito Hokamura
TypeScriptとGraphQLで実現する 型安全なAPI実装 / TSKaigi 2024
hokaccha
5
4.6k
Kotlin製のGraphQLサーバーをNode.jsでモジュラモノリス化している話
hokaccha
0
3.5k
GraphQLの負債と向き合うためにやっていること
hokaccha
2
1.5k
ユビーのアーキテクチャに対する取り組み
hokaccha
1
420
RailsエンジニアのためのNext.js入門
hokaccha
7
20k
Cookpad Summer Internship 2021 Web Frontend
hokaccha
0
7.2k
巨大なモノリシック Rails アプリケーションの マイクロサービス化戦略 / 2019 microservices in cookpad
hokaccha
3
3.9k
巨大なRailsアプリケーションを「普通」にするための取り組み
hokaccha
1
990
Web Frontend Improvement in Cookpad
hokaccha
1
1.1k
Other Decks in Programming
See All in Programming
PostgreSQLのRow Level SecurityをPHPのORMで扱う Eloquent vs Doctrine #phpcon #track2
77web
2
400
プロダクト志向ってなんなんだろうね
righttouch
PRO
0
170
Deep Dive into ~/.claude/projects
hiragram
10
1.9k
型付きアクターモデルがもたらす分散シミュレーションの未来
piyo7
0
810
WindowInsetsだってテストしたい
ryunen344
1
200
「Cursor/Devin全社導入の理想と現実」のその後
saitoryc
0
440
なぜ適用するか、移行して理解するClean Architecture 〜構造を超えて設計を継承する〜 / Why Apply, Migrate and Understand Clean Architecture - Inherit Design Beyond Structure
seike460
PRO
1
710
関数型まつりレポート for JuliaTokai #22
antimon2
0
160
「ElixirでIoT!!」のこれまでとこれから
takasehideki
0
370
ruby.wasmで多人数リアルタイム通信ゲームを作ろう
lnit
2
290
第9回 情シス転職ミートアップ 株式会社IVRy(アイブリー)の紹介
ivry_presentationmaterials
1
250
『自分のデータだけ見せたい!』を叶える──Laravel × Casbin で複雑権限をスッキリ解きほぐす 25 分
akitotsukahara
1
580
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
PRO
54
11k
Adopting Sorbet at Scale
ufuk
77
9.4k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
Designing for Performance
lara
609
69k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.3k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
357
30k
How to Think Like a Performance Engineer
csswizardry
24
1.7k
Faster Mobile Websites
deanohume
307
31k
Stop Working from a Prison Cell
hatefulcrawdad
270
20k
Embracing the Ebb and Flow
colly
86
4.7k
Making the Leap to Tech Lead
cromwellryan
134
9.4k
Transcript
Direct ProxiesͰObject.observeͷ PolyfillͰ͖Δͷ͔
None
Object.observe Object.observe(obj, (changes) => { // do something }); •
objΛมߋ͢Δͱhandler͕ؔݺΕΔ
Direct Proxies var proxy = new Proxy(obj, { set(target, name,
val, receiver) { // do something } }); • objΛҾͱͯ͠৽ͨͳཧΦϒδΣΫτʢproxyʣΛಘΔ • proxyΛૢ࡞ͨ࣌͠ʹhandler͕ݺΕΔ • objΛૢ࡞ͯ͠handlerݺΕͳ͍
͜ͷAPIΛPolyfill͢Δ ͷແཧͰɾɾʁ Object.observe(obj, (changes) => { // do something });
ProxyͷPolyfillϥΠϒϥϦ
None
harmony-reflect/examples/observer.js
͍͚ͦ͏ʂʂ
ͳΜ͔ΤϥΔɾɾ // Firefox 36.0 Observer(Object); // enable polyfill var obj
= {}; Object.observe(obj, handler); //=> uncaught exception: can only get notifier of observable objects, given [object Object]
͜͏͢Δඞཁ͕͋ΔΒ͍͠ var obj = {}; var o = Object.createObservable(obj); Object.observe(o,
handler);
Q: Direct ProxiesͰObject.observeͷ PolyfillͰ͖Δͷ͔
A:ʢͨͿΜʣແཧ
͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ