2013/5/21 David Bruant <[email protected]> > Would it make sense to add specific traps for specific objects (Date would > have some specific traps, so would objects with [[MapData]], so would > objects with [[SetData]], etc.)? > Very much like functions currently have some traps that only apply to them. >
Yes, it would work in the current Proxy design. However, the function-specific "apply" and "construct" are arguably very generic and very frequently used operations. I would be reluctant to add ad hoc traps for intercepting access to very specific operations on Date, Map, Set, WeakMap, etc. Moreover that design doesn't scale beyond the ES6 built-ins. Arguably other host objects might have other ops they want to intercept. Cheers, Tom
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

