4 ms·
This actually can be done safely with Object.defineProperty, using non-enumerable properties.
by taralx 13y ago
This actually can be done safely with Object.defineProperty, using non-enumerable properties.
- barrkel 13y agoThat doesn't work in IE8 (for non-DOM objects). IE8 is the last version of IE for WinXP.
- aaronem 13y agoIf you have to support IE 8, you probably shouldn't extend prototypes without serious thought, especially in a legacy codebase, because the interpreter support isn't there to do it right. On the other hand, Windows XP is barely six months shy of EOL, and IE 8 currently has something like 4% share. Now would seem to be an excellent time to start dropping support for IE 8. Such support is never going to gain you more users, and many other browsers run on Windows XP. "Don't use Object.defineProperty because a dying browser on a dying platform doesn't support it" strikes me as a rather weak argument. I mean, there are still people out there using IE 6, God help them. Why not shoot as low as we can?
- barrkel 13y agoThe company I work for makes software for banks. Neither WinXP nor IE8 are dead there, not by a long shot.