Template site objects and WeakMap

Boris Zbarsky bzbarsky at mit.edu
Wed Jun 17 18:49:38 UTC 2015


On 6/17/15 2:35 PM, Mark S. Miller wrote:
> What do other browsers currently do?

Firefox:

 > var w = new WeakMap(); var r = Symbol.for('foo'); w.set(r, true);
TypeError: r is not a non-null object

WebKit nightly:

 > var w = new WeakMap(); var r = Symbol.for('foo'); w.set(r, true);
TypeError: Attempted to set a non-object key in a WeakMap

Don't have a new enough IE to test with offhand.

-Boris


More information about the es-discuss mailing list