ES4 draft: Object
waldemar at google.com
Thu Mar 13 11:29:04 PDT 2008
Yuh-Ruey Chen wrote:
> Brendan Eich wrote:
>> If we end up making all namespaced properties non-enumerable, then we
>> may want a property iterator that returns the names of all properties
>> in a given object. Even if this is not in the standard, it's likely
>> to be an extension. Or it could be added in the future.
> Absolutely. In fact, I thought there was already an iterator that yields
> all properties regardless of enumerability, just that this iterator
> would not be the default iterator for objects. If it's not in ES4, it
> should definitely be there because it's essential for those that want to
> customize enumerability.
As was discussed before, the language cannot have such an iterator. Were this iterator to exist, an attacker could use it to discover hidden properties of objects, get access to private and other restricted namespaces, alter private state, and break through abstraction barriers.
More information about the Es4-discuss