Non-extensible WeakMaps

David Bruant bruant.d at gmail.com
Sun Jan 22 10:28:20 PST 2012


Hi,

In Firefox Aurora as well as in Chromium 18, running the following
-----
var wm = new WeakMap();
var o = {};

Object.preventExtensions(wm);

wm.set(o, 1);
console.log(wm.get(o)); // 1
-----

Is this something that is wanted?
Same question for Maps and Sets.

David


More information about the es-discuss mailing list