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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Kazuhito Hokamura
December 18, 2014
Programming
690
0
Share
Direct ProxiesでObject.observeの Polyfillはできるのか
Kazuhito Hokamura
December 18, 2014
More Decks by Kazuhito Hokamura
See All by Kazuhito Hokamura
TypeScriptとGraphQLで実現する 型安全なAPI実装 / TSKaigi 2024
hokaccha
5
5k
Kotlin製のGraphQLサーバーをNode.jsでモジュラモノリス化している話
hokaccha
0
3.8k
GraphQLの負債と向き合うためにやっていること
hokaccha
2
1.6k
ユビーのアーキテクチャに対する取り組み
hokaccha
1
470
RailsエンジニアのためのNext.js入門
hokaccha
7
22k
Cookpad Summer Internship 2021 Web Frontend
hokaccha
0
7.3k
巨大なモノリシック Rails アプリケーションの マイクロサービス化戦略 / 2019 microservices in cookpad
hokaccha
3
4.1k
巨大なRailsアプリケーションを「普通」にするための取り組み
hokaccha
1
1.1k
Web Frontend Improvement in Cookpad
hokaccha
1
1.2k
Other Decks in Programming
See All in Programming
Going Multiplatform with Your Android App (Android Makers 2026)
zsmb
2
350
PDI: Como Alavancar Sua Carreira e Seu Negócio
marcelgsantos
0
110
実践CRDT
tamadeveloper
0
370
瑠璃の宝石に学ぶ技術の声の聴き方 / 【劇場版】アニメから得た学びを発表会2026 #エンジニアニメ
mazrean
0
180
PHPで TLSのプロトコルを実装してみるをもう一度しゃべりたい
higaki_program
0
180
おれのAgentic Coding 2026/03
tsukasagr
1
140
夢の無限スパゲッティ製造機 -実装篇- #phpstudy
o0h
PRO
0
200
PHP でエミュレータを自作して Ubuntu を動かそう
m3m0r7
PRO
2
170
Migration to Signals, Signal Forms, Resource API, and NgRx Signal Store @Angular Days 03/2026 Munich
manfredsteyer
PRO
0
250
PHPで TLSのプロトコルを実装してみる
higaki_program
0
740
Mastering Event Sourcing: Your Parents Holidayed in Yugoslavia
super_marek
0
150
AWS re:Invent 2025の少し振り返り + DevOps AgentとBacklogを連携させてみた
satoshi256kbyte
2
150
Featured
See All Featured
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
480
Producing Creativity
orderedlist
PRO
348
40k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.1k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
330
Being A Developer After 40
akosma
91
590k
Technical Leadership for Architectural Decision Making
baasie
3
310
Agile that works and the tools we love
rasmusluckow
331
21k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
340
Game over? The fight for quality and originality in the time of robots
wayneb77
1
160
How to train your dragon (web standard)
notwaldorf
97
6.6k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
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:ʢͨͿΜʣແཧ
͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ