dontenum

Setting a custom property with DontEnum

If I create: Object.prototype.count = function() {}; var m = {prop: 1}; for(var i in m) window.status += i + ", "; in the code above i contains also count inherited by its prototype. Now I want to know if there is a way to set a custom property as the flag DontEnum (it is not settable for custom property) so it will not be enumer...

Javascript, how to retrieve ALL properties of a literal object in IE

Hi, i have a literal object like this var O={ toString:function(){ // some code here }, anotherMethod:function(){ // some code here } } Im walk through object with for-in loop for(var p in O){ // some stuff with p and O[p] } The problem is toString property will not catch in the loop on IE browser! ...