Overriding Map/etc with get/set hooks?

Sam Tobin-Hochstadt samth at ccs.neu.edu
Mon May 20 23:44:34 PDT 2013

On Mon, May 20, 2013 at 11:32 PM, Anne van Kesteren <annevk at annevk.nl> wrote:
> On Tue, May 21, 2013 at 7:24 AM, 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);
> If we ignore the toString() and other validation, yes. But note that
> setting will directly be observable through getComputedStyle.
> Object.observe does not work for this, just like it does not work for
> URLQuery (which we discussed a while back).

If that's all the case, then why do you need any fancy spec
methodology? You have a Map, which is consulted by, and mutated by,
the environment. When you first create this Map, you add a bunch of
stuff to it.  And that's it, AFAICT.


More information about the es-discuss mailing list