URLs / subclassing JavaScript

Allen Wirfs-Brock allen at wirfs-brock.com
Tue Dec 18 09:01:25 PST 2012

On Dec 18, 2012, at 8:08 AM, Anne van Kesteren wrote:

> On Tue, Dec 18, 2012 at 4:32 PM, Alex Russell <slightlyoff at google.com> wrote:
>> Object.observe() is a notification, not interception, mechanism. Where we
>> need to stratify an intercept, ES 6 Proxies are the mechanism we should lean
>> on, but in the main, we should ALWAYS seek to avoid using them. That is to
>> say, if we must do magic (use proxies), we must do magic; however we should
>> only arrive there after exhausting all other routes; both on the JS and DOM
>> sides.
> It seems you either need to use a Proxy, some kind of wrapper method,
> or a custom implementation in most cases. Typically when objects akin
> to Map or Array are exposed in a platform API, mutating them has
> observable (synchronous) side effects.

http://wiki.ecmascript.org/doku.php?id=strawman:object_model_reformation proposes a mechanism that would support defining such object behaviors without requiring the full magic of Proxy.  


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20121218/1eab3881/attachment.html>

More information about the es-discuss mailing list