Use cases for WeakMap

Rick Waldron waldron.rick at
Sat May 14 18:06:19 PDT 2011


Would you mind sharing a piece of working code (as in, runs in the latest
Firefox Nightly) that demonstrates your example in a real world scenario?
This would be greatly appreciated


On Sat, May 14, 2011 at 8:55 PM, Boris Zbarsky <bzbarsky at> wrote:

> On 5/14/11 6:37 PM, Oliver Hunt wrote:
>> Can you provide a use case where you have an object key as the usual
>> programming idiom?
> Attaching metadata to object without polluting the objects themselves.
> For example, Firefox extensions want to do this all the time for various
> DOM objects (and especially Window).
> -Boris
> _______________________________________________
> es-discuss mailing list
> es-discuss at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list