Overriding Map/etc with get/set hooks?

Tab Atkins Jr. jackalmage at gmail.com
Mon May 20 23:58:18 PDT 2013

On Mon, May 20, 2013 at 11:24 PM, Sam Tobin-Hochstadt <samth at ccs.neu.edu> wrote:
> Is it possible for the environment to change the Map during the turn?
> IOW, is this always true?
> m.set("x", 1);
> assert(m.get("x") === 1);

Your example is not a restatement of your question.

Yes, the "environment" can change the map during the turn.  But the
map isn't affected by arbitrary things in the "environment" - it just
shares its internal data with another object which is also user
read/writeable.  The only way the map can change without a .set() call
is if your code does some CSSOM manipulation that changes the custom
properties in the associated style rule.


More information about the es-discuss mailing list