I ran into a very strange problem with the IE8 JS engine (possibly with previous versions, but not IE9 in IE8 mode, since the JS engine is not backing down). A simplified example:
var foo = { toString : 42, x : 22 };
for(var n in foo){
console.log(n)
}
In other words, the property toStringwill never be listed. Would not be valueOf, hasOwnPropertyetc. Orvar x = 5; x.toFixed = 42;
Thus, any property that originally exists cannot be listed, as far as I can tell, even after replacing it ...
My question is. Does anyone know how to access these?!? I need it because I'm going to prototype an object, but the function toStringdoes not receive.