Javascript getters/setters in IE?

OB OB picture OB OB · Jul 3, 2009 · Viewed 10.8k times · Source

For whatever reason, Javascript getters/setters for custom objects seem to work with any browser but IE.

Does IE have any other non-standard mechanism for this? (As with many other features)

If not, are there any workarounds to achieve the same functionality?

Answer

Nosredna picture Nosredna · Jul 3, 2009

IE8 has it through defineProperty, but only for DOM objects. But supposedly, it'll eventually come for JavaScript objects as well.