4 ms·
Many of these frameworks want to support IE 8, which is the default browser of windows 7. IE 8 only supports Object.defineProperty with DOM objects[0], which ca
by mnemonik 13y ago
Many of these frameworks want to support IE 8, which is the default browser of windows 7. IE 8 only supports Object.defineProperty with DOM objects[0], which can be infuriating.
No one should use __defineGetter__ and __defineSetter__ because they are non-standard and deprecated[1].
[0] http://kangax.github.io/es5-compat-table/#define-property-ie-note http://kangax.github.io/es5-compat-table/#define-property-ie...
[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineGetter https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
Edit: left this tab open and I see this point has since been made, but I will leave the comment anyways.
- mannix 13y agoYes, the only reason I'd use __defineGetter__ would be a fallback for Object#defineProperty. I'm curious if the IE8 limitation could be worked around, using something like: if (ie8) RactiveBaseModel.prototype = HTMLAnchorElement.prototype;