Object.observe inital polyfill

Tom Van Cutsem tomvc.be at gmail.com
Sun Dec 2 08:47:37 PST 2012


2012/11/30 Andrea Giammarchi <andrea.giammarchi at gmail.com>

> Last, but not least, if this script is for node.js only or modern
> browsers, the best way to implement observe() is via Proxy, changing only
> one thing: you need to re address and use the observed object rather than
> use the normal one.
>

See <
https://github.com/tvcutsem/harmony-reflect/blob/master/examples/observer.js>
for an implementation of that approach (usage example is here <
https://github.com/tvcutsem/harmony-reflect/blob/master/examples/observer.html
>.

It was based on the original spec. for Object.observe. It may not be
up-to-date with the latest version though.

Cheers,
Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20121202/057dcdf3/attachment.html>


More information about the es-discuss mailing list