I've run into a very odd issue with IE8's JS engine (possibly previous versions as well, but NOT IE9 in IE8 mode since the JS engine doesn't fallback). Simplified example:
var foo = { toString : 42, x : 22 };
for(var n in foo){
console.log(n)
}
// result: "x"
In other words, the toString
property never gets enumerated. Nor would valueOf
, hasOwnProperty
, etc... or var x = 5; x.toFixed = 42;
So any property that natively exists can not be enumerated as far as I can tell, even after you replace it...
My question -- Does anyone know of any way to actually access these?!? I need to because I'm walking the prototype of an object and the toString
function isn't getting picked up.