Template site objects and WeakMap
bzbarsky at mit.edu
Wed Jun 17 17:59:42 UTC 2015
On 6/17/15 1:54 PM, Jordan Harband wrote:
> Could I not use `Object(Symbol.for('some global registry symbol'))` as a
> `WeakMap` key? That would return a realm-specific object, of course.
Object(Symbol.for("x")) == Object(Symbol.for("x")) tests false. That's
reaches step 3 which lands you in
returns a new Symbol object every time.
So while you _could_ use Object(Symbol.for('some global registry
symbol')) as a weakmap key it would not be terribly useful unless you
hung on to that object somewhere.
More information about the es-discuss