-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Test inserted async script execution order #45660
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very nice and clear. I haven't reviewed the spec text to confirm this is the required behavior, as I assume that is not in question.
I am assuming Chrome & Safari both run them async in a single posted task (not microtask)? Could you maybe modify the tests locally to see if instead of using If they do, then maybe the easiest thing to do is just align the spec to both of those implementations to at least match reality. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you insert a script like this, is it essentially synchronous even though it says "async", except parsing/execution happens after a single microtask? What if they contain further import statements?
Because if we do actually go in parallel somewhere here I agree that we need a task.
When doing
This question made me re-inspect the spec. It seems I got it slightly wrong. Let's discuss over in whatwg/html#9864. |
error
event from script 2 before executing script 1error
event from script 2 synchronously.whatwg/html#9864 discusses the issue. whatwg/html#10272 matches what is tested here.