If I define a property/function into an Object prototype (assuming that coercion will eventually lead to every variable accessing the property/function) as such ...
Object.prototype.doFunc = function(){ return 'this is ' + this;}
// OUTPUT - function(){ return 'this is ' + this;}
Object.prototype.doFunc.dontEnum = true
// OUTPUT - True
and then I run the for..in
enumerator on an object, the doFunc
function also comes up in the enumeration even though the object's .propertyIsEnumerable('doFunc')
evaluates to a False
Any thoughts? (Again this is for ECMA Script 3/JScript that is native to the ScriptControl object in a VBA project.)