Polyfilling Object.observe

Ranando King kingmph at gmail.com
Tue Jul 24 17:08:40 UTC 2018


The only way I can think of that might work will only work if all actions
against the observed object happen through methods of the observed object's
prototype. In that case, you can proxy the prototype. Short of that, you're
out of luck.

On Tue, Jul 24, 2018 at 12:02 PM /#!/JoePea <joe at trusktr.io> wrote:

> Is there a way to polyfill `Object.observe` in such a way that the object
> before observation is the same reference as the object being observed after
> the call (i.e. not a Proxy), and other than monkey-patching getters/setters?
>
> Is defining getters/setters the only way?
>
> */#!/*JoePea
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20180724/ce8a16c1/attachment-0001.html>


More information about the es-discuss mailing list