Use cases for WeakMap

Boris Zbarsky bzbarsky at MIT.EDU
Sat May 14 17:55:13 PDT 2011


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


More information about the es-discuss mailing list