How to add non-enumerable property in JavaScript for IE8?
问题 Is there a way to add "hidden" non-enumerable properties to a JavaScript object that works cross-browser? For most modern browsers, you can do: Object.defineProperty(obj, '__id__', { enumerable: false, value: id++ }); For some older non-IE browsers that don't have Object.defineProperty , you can use the __proto__ hack. None of those, however, work for IE. Is there a way to accomplish this in IE8 (would be cool if IE7 too, but not necessary)? The main goal is to be able to add tracker