Why we need to clean up __proto__

John-David Dalton john.david.dalton at gmail.com
Wed Dec 28 08:39:16 PST 2011

The cross-browser differences of {}.hasOwnProperty('__proto__') and
{}.__proto__.hasOwnProperty('__proto__') are interesting and need to
be ironed out.

As for the issue of using objects as dictionaries you can simply
prefix keys with some unique value, `var uid = 'uid' + (+new Date);`,
and then access entries like `dict[uid + key]`. This will allow value
lookups to work correctly cross-browser regardless of ES5+ or
__proto__ support.


More information about the es-discuss mailing list