Juriy Zaytsev wrote: > Scott Sauyet wrote: >> Asen Bozhilov wrote: >>> I don't know which engines are target of your code, but older JScript >>> versions has trouble with enumeration of user defined properties which >>> are same as bult-in properties of `Object.prototype'. > >>> See the blog post of Garret: >>> <URL:http://dhtmlkitchen.com/learn/js/enumeration/dontenum.jsp> > >>> If you are interested, see how I've fixed the issue: >>> <URL:https://github.com/abozhilov/Duke/blob/master/src/Duke.js> > >> Interesting, I'd forgotten about that issue. And I'm curious about >> your solution: > >>| DontEnums = [ >>| 'constructor', >>| 'toString', >>| 'valueOf', >>| 'toLocaleString', >>| 'isPrototypeOf', >>| 'propertyIsEnumerable', >>| 'hasOwnProperty' >>| ]; > >> Is that list sufficient? It seems suspiciously small. But I don't >> have additional candidates right now. > > That's sufficient. You only need to take care of Object.prototype.* 7 > non-enumerable members. See 15.2.4 in either ES3 or ES5 > (e.g:http://es5.github.com/#x15.2.4-toc).
Thanks. > The "DontEnum bug" is fixed in IE9 by the way Glad to hear it. > (among > other long-standing JScript issues, like named function expressions leaking > identifier into the enclosing scope). Now that one is really good news. How long until IE<9 dies off? Let's see if the browser half-life is... Thanks, -- Scott -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/[email protected]/ To search via a non-Google archive, visit here: http://www.mail-archive.com/[email protected]/ To unsubscribe from this group, send email to [email protected]
