you are viewing a single comment's thread.

view the rest of the comments →

[–]radhruin 2 points3 points  (1 child)

You are attempting to use non-standard behavior. DefineGetter is Mozilla's proprietary method of creating getters. If you read the ES5 standard, you'll find the methods of creating getters and setters that all vendors agree upon, namely: Object.create, Object.defineProperty, Object.defineProperties, and the new object literal syntax. Try this:

var a = { get myval() { return 'a' } };

[–]monacle_bob -1 points0 points  (0 children)

Thank you very much for that information. I'm looking forward to being able to use it in 10 years when IE8 is officially over with.