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
0
680
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.9k
Kotlin製のGraphQLサーバーをNode.jsでモジュラモノリス化している話
hokaccha
0
3.7k
GraphQLの負債と向き合うためにやっていること
hokaccha
2
1.5k
ユビーのアーキテクチャに対する取り組み
hokaccha
1
460
RailsエンジニアのためのNext.js入門
hokaccha
7
21k
Cookpad Summer Internship 2021 Web Frontend
hokaccha
0
7.3k
巨大なモノリシック Rails アプリケーションの マイクロサービス化戦略 / 2019 microservices in cookpad
hokaccha
3
4k
巨大なRailsアプリケーションを「普通」にするための取り組み
hokaccha
1
1k
Web Frontend Improvement in Cookpad
hokaccha
1
1.1k
Other Decks in Programming
See All in Programming
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
390
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
7.5k
CSC307 Lecture 06
javiergs
PRO
0
690
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
730
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
180
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
170
「ブロックテーマでは再現できない」は本当か?
inc2734
0
1k
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
740
CSC307 Lecture 10
javiergs
PRO
1
660
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.9k
Architectural Extensions
denyspoltorak
0
300
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
1
2.6k
Featured
See All Featured
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
78
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1.1k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
240
The SEO identity crisis: Don't let AI make you average
varn
0
300
Done Done
chrislema
186
16k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
330
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
320
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
830
Site-Speed That Sticks
csswizardry
13
1.1k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
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:ʢͨͿΜʣແཧ
͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ