WebIDL attribute reflection
bzbarsky at mozilla.com
Sun Dec 30 22:19:32 PST 2012
On 12/30/12 1:20 PM, Claude Pache wrote:
> FWIW, I used the fact that, in IE 8 & 9, innerHTML is conveniently a configurable accessor found at Element.prototype (in IE8) or HTMLElement.prototype (in IE9), for correcting a quirk of its setter, by extracting it and replacing it with a corrected version.
Indeed, this is one of the major reasons properties are accessors in
WebIDL. It allows libraries to polyfill functionality as it's added in
specs (e.g. if the set of things that can be assigned to a property
changes, that may be possible to polyfill by hooking the setter).
> I don't know if and how it would be possible if it was an own property on each instance
It wouldn't be possible, in the proposals I've seen so far in this thread.
More information about the es-discuss