Save Object.observe()! (please) + make WeakMap/WeakSet observable.
Brendan Eich
brendan.eich at gmail.com
Thu Nov 5 20:14:59 UTC 2015
I did watchpoints in SpiderMonkey in 1997 IIRC, implemented as replacement
accessors under the hood. ES5 and unfrozen ordinary objects allow
self-hosting of watchpoints (ES6 weakmaps and symbols help but are not
required).
We can't standardize watchpoints for all objects, of course.
/be
On Thu, Nov 5, 2015 at 11:49 AM Benoit Marchant <marchant at mac.com> wrote:
> Proxy at the granularity of a property would be perfect for that
>
> On Nov 5, 2015, at 10:11, Matthew Robb <matthewwrobb at gmail.com> wrote:
>
>
> On Thu, Nov 5, 2015 at 12:49 PM, Tom Van Cutsem <tomvc.be at gmail.com>
> wrote:
>
>> O.o is a much safer alternative to Proxy.startTrapping and covers at
>> least part of its use cases.
>
>
> Hmm.
>
> Okay so pretend all object's are really just proxies to whatever their
> internal backing might be. In this scenario perhaps what we might want is
> `Proxy.observeTraps` which should work just like Object.observe only
> synchronously and without a baked in ability to intercede. One could,
> however, respond to a set operation by resetting the old value. What this
> does is give you something VERY close to a built in observable Model type
> on top of plain objects.
>
>
>
> - Matthew Robb
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
> _______________________________________________
> 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/20151105/c2b46187/attachment-0001.html>
More information about the es-discuss
mailing list