In JavaScript there is the possibility to create getters and setters the following way:
function MyClass(){ var MyField; this.__defineGetter__(\"MyField\",
Actually, __lookupGetter__ and __lookupSetter__ methods are deprecated. Instead of these you must use:
__lookupGetter__
__lookupSetter__
/* __lookupGetter__ */ Object.getOwnPropertyDescriptor(obj, 'MyField').get; /* __lookupSetter__ */ Object.getOwnPropertyDescriptor(obj, 'MyField').set;