accessing/modifiying getter and setter functions

Kris Zyp kriszyp at gmail.com
Sun Apr 1 19:15:05 PDT 2007


According to the spec, it is possible to define getters and setters for the properties. I am wondering if it is possible to access and modify the getter and setter for a property. Can I dynamically set the getter for an object?:

obj.get x = function() { return 10; }

Can I access the getter function/method?:

myGetter = obj.get x;

Or use the same getter for multiple properties?:

obj.get y = obj.get x;

Thanks,
Kris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.mozilla.org/pipermail/es-discuss/attachments/20070401/e322371e/attachment-0002.html 


More information about the Es4-discuss mailing list