Right, so every EventHandler attribute must swallow object (TreatNonObjectAsNull) because some Dell website did something silly in 2013?  If so, then we have more bugs to file: onprogress  oncontactchange  ondownloadstart  onstatechange  onmessage  ...  https://lists.w3.org/Archives/Public/public-script-coord/2013OctDec/0412.html  http://mxr.mozilla.org/mozilla-central/source/dom/apps/Webapps.js?rev=932a80206f57#499  http://mxr.mozilla.org/mozilla-central/source/dom/contacts/ContactManager.js?rev=66f5705f110d#84  http://mxr.mozilla.org/mozilla-central/source/dom/downloads/DownloadsAPI.js?rev=4d0ef24554ca#65  http://mxr.mozilla.org/mozilla-central/source/dom/downloads/DownloadsAPI.js?rev=4d0ef24554ca#311  http://mxr.mozilla.org/mozilla-central/source/dom/engineeringmode/EngineeringModeAPI.js#87 OK I only got to 'e' in the alphabet, but there are more, and these are only the JSImplemented ones, so you get the idea: there are a lot of these, and they all presumably have the same problem. Bz, what's the answer here? A) Change all of these to: typeof handler == "function" && this.__DOM_IMPL__.setEventHandler("onfoo", handler); B) Make some new NonDellEventHandler that throws or is TreatNonCallableAsNull? C) Something else?
backlog: --- → webRTC+
Priority: -- → P3
> because some Dell website did something silly in 2013? Welcome to the web. Note that I would be surprised if the Dell site were the only one doing that sort of thing.... The right answer here is to change our setEventHandler thing to deal.
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Comment on attachment 8637743 [details] [diff] [review] Event handlers on JS-implemented webidl interfaces should have the same behavior as other event handlers: accept all values, convert non-objects to null r+ I guess. allowTreatNonCallableAsNull handling is a bit hard to follow.
Attachment #8637743 - Flags: review?(bugs) → review+
Yeah, once we move Promise off webidl we should clean it up a bit...
You need to log in before you can comment on or make changes to this bug.