Subj : Re: Enumeration of extended properties of Array and Object prototypes To : Chris Zumbrunn From : Brendan Eich Date : Tue Mar 23 2004 08:04 pm Chris Zumbrunn wrote: > One real-world example that might serve well to illustrate what I mean > would be getter/setter methods for data conversion of Javascript objects > (for example to and from XML). If you mean someone calling Object.prototype.__defineGetter__('id', f), or likewise for a setter, then the property that results in that case is not enumerable in SpiderMonkey. This looks to me like a bug introduced when the old getter= form was deprecated and its code copied into new __defineGetter__ and __defineSetter__ methods of Object.prototype, as the getter= code includes JSPROP_ENUMERATE among the attributes. But, you can take advantage of it for now. The problem hinted at by my last posting is that it's hard to change JS now, given all the implementations; harder still, as you point out, to change it in incompatible ways. Your best bet is to lobby ECMA people, if you can contact them, about getting Edition 4 changed. Adding a way to define a non-enumerable property could be done in SpiderMonkey -- is that something you could use well, or would you need standard support to get other implementations to pay attention to the change and implement the extension? /be .