A recent change to the ECMAScript spec forced the HTML spec to be explicit about what the source text of a compiled event handler is. That is, what is the value of things like div.onclick.toString() or document.body.onerror.toString(). The resulting HTML pull request is at https://github.com/whatwg/html/pull/5514. It turns out that browsers mostly do the sensible thing here, and the resulting source text matches the list of arguments to the event handler in question. The exception is in Safari, which per the results of https://github.com/web-platform-tests/wpt/pull/23467 will output `function onerror(event) {\nfoo\n}` instead of `function onerror(event, source, lineno, colno, error) {\nfoo\n}` for window.onerror, body.onerror, and frameset.onerror, despite those functions taking 5 arguments. So concretely, the goal is to pass the tests at https://github.com/web-platform-tests/wpt/pull/23467 by changing the stringification of onerror in those three cases. (But *not* changing it for cases like someDiv.onerror.)
I'm looking into this issue.
Pull request: https://github.com/WebKit/WebKit/pull/17407
<rdar://problem/122574926>