Use cases for WeakMap

Erik Corry erik.corry at gmail.com
Sat May 14 23:57:01 PDT 2011


On May 15, 2011 2:55 AM, "Boris Zbarsky" <bzbarsky at mit.edu> 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.

That sounds more like private names

>
> 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 mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110515/6f08f9ab/attachment.html>


More information about the es-discuss mailing list