-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ECMAScript's OrdinaryFunctionCreate has new parameter #5500
Comments
Fascinating. It appears at least Chrome and Firefox mostly agree on something like
http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=8043 however I found a case where they're inconsistent about the arguments: http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=8044 |
Interestingly, Chrome seems to just not support any function parameters other than |
Even more interestingly, if one calls it after the <!DOCTYPE html>
<body onerror="w(lineno)">
<script>
const
</script>
<script>
w(document.body.onerror.toString());
</script> yields
I filed https://crbug.com/1077133 to track this. |
It feels like the right thing to do here for the original bug is to always match the ParameterList. That's relatively easy to write up in spec. The tests will be a bit tricky, just because I'm not sure of all the scenarios where "If eventHandler is an onerror event handler of a Window object" is true. But it shouldn't be too hard to figure out. |
I'm still stuck on this phrase. (Which I probably wrote...) It seems to imply that it only works for It almost certainly shouldn't work for |
In IRC @TimothyGu pointed out that we can capture window/body/frameset using https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-target |
In fact, the problematic algorithm get the current value of the event handler is only called from algorithms that have already done the "determining the target of an event handler" step, so checking whether we are talking about the |
Closes #5500. This also makes the special case more explicit by referring to the name and eventTarget variables.
tc39/ecma262#1870 added a
_sourceText_
parameter to the abstract operationOrdinaryFunctionCreate
. The HTML spec invokes that operation once, so that invocation will need to be changed, but I don't know what value it should pass to the new parameter.The text was updated successfully, but these errors were encountered: