This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
In bugs https://bugzilla.mozilla.org/show_bug.cgi?id=691059 and https://bugzilla.mozilla.org/show_bug.cgi?id=684671 we had to change prototype handling so that Document.prototype.onreadystatechange and HTMLElement.prototype.onmouseenter/leave don't throw when setting. Hopefully those are just special cases which we can remove at some point. But if we're not lucky, we may need to special case all the onfoo properties. IE9 seems to behave like Gecko used to, which is why https://bugzilla.mozilla.org/show_bug.cgi?id=691059 happens also in IE9 when the test page is forced to load in IE9 mode.
Note that Gecko's behavior here has nothing to do with the prototype. We simply treat a set as a no-op and return null on get if the |this| of the getter/setter is not an instance of the right interface. That includes invoking the getter or setter on the prototype, but also on any other random object.
True. The bugs just happened to be about setting interface.prototype.onfoo
Do we need to introduce a [DoNothingIfBadThisValue] extended attribute?
I'd really prefer to avoid another hack if possible. Sites that are updating do get the latest versions of Prototype (which has this problem and has long since been fixed). We could cater to sites using older libraries that do bad things, or we can let these sites naturally evolve as more browsers implement the spec. store.sony.ca is specifically sending IE the meta tag telling it to use it's old compatibility binding for the DOM (IE8 mode): <meta http-equiv="x-ua-compatible" content="IE=8" /> This lets them update on their timetable. I plan to contact them as well to request that they update to newer versions of prototype.
Sorry, forgot to mention that I added [LenientThis] a month or so back: https://www.w3.org/Bugs/Public/show_bug.cgi?id=14037#c46 and Ian added it to the onreadystatechange attribute. This seemed the best way forward given that the broken library being used, Sarissa, is apparently unmaintained. Olli, since you originally filed this bug, could you please indicate for the Disposition of Comments document whether this resolution was satisfactory. Thanks.
We need that also on at least mouseenter/mouseleave (Gecko did that on elements, documents, windows, but it may only be needed on elements).
(In reply to comment #6) > We need that also on at least mouseenter/mouseleave (Gecko did that on > elements, documents, windows, but it may only be needed on elements). I don't know that there's any spec that defines onmouseenter and onmouseleave attributes at the moment.