-
Notifications
You must be signed in to change notification settings - Fork 550
Micro-tasks don't define insertion point semantics & all browsers disagree #165
Comments
Sure, can you reopen over on the HTML Standard? |
As far as I can tell this is a bug in Firefox. There's a microtask checkpoint that's part of script execution so I don't see how insertion point could get undefined before that point. |
This is probably https://bugzilla.mozilla.org/show_bug.cgi?id=1193394. |
So for inline script execution we have: And https://w3c.github.io/html/single-page.html#execute-a-script-block doesn't have an explicit micro-task checkpoint. The only micro-task checkpoint I see is BEFORE we execute the script, but that has nothing to do with the Promise's that get inserted during. @annevk Can you help me out with how you arrived at the "microtask checkpoint that's part of script execution?" |
@DigiTec I don't know anything about that specification as I (and others) explained here: https://annevankesteren.nl/2016/01/film-at-11. It's completely secret what kind of modifications were made, how, and why. Now, https://html.spec.whatwg.org/multipage/scripting.html#execute-the-script-block, in step 8, invokes https://html.spec.whatwg.org/multipage/webappapis.html#run-a-classic-script, which in step 10 invokes https://html.spec.whatwg.org/multipage/webappapis.html#clean-up-after-running-script, which in step 5 handles microtasks. |
Thank you, I consulted the incorrect spec at this time and that is an issue for me to work out. Thank you for the explanation. I'll review the relevant sections and see if there is anything we can do here to help align Edge with the other browsers in this regard. @travisleithead Seems like a big chunk of text to push back into the W3C version of the spec. |
The W3C version, apart from it being unclear what changes were made before the initial commit (apart from breaking many links), is easily hundreds of commits behind. Coupled with the W3C having switched formats, which apparently took four-person months or so to do, I very much doubt it's going to be usable ever. |
…ATWG (#387) * CSP integrations for Issue #201 Had to adapt "resulting URL record" -> "resulting parsed URL" (will fix with changes to 2.5.2 eventually) * Update refs to CSP3 (from CSP1 Note) for Issue #191 Also fix typo 'teh' * Groundwork for realms #190 and scripting updates #165, #189 Importing dependent changes since last sync of WHATWG in mid-Jan. Added JS-related terms * intermediate: translated definitions in scripting section * Imports 3 fetch script algorithms and reorders a few sections to match WHATWG * add algorithms for script creation * WIP: Syncing changes through event handler section * webappapi include mostly synced. script element section remains * syncing changes for the script element * pulling in more required sections for linking issues * Further reducing linking issues * fixes more linking issues * Finally builds CLEAN! * Adding some missing CSP changes * Adding a few more CSP dependencies * All CSP changes validated and builds clean * Removed script modules * tables in DTs don't render nicely; also fixed backtick use in a few places * Fixes for @arronei's PR feedback
With thanks to our friends at WHATWG, I believe I've ported over all of these dependencies in 1b70bac. Closing this issue now. |
* CSP integrations for Issue #201 Had to adapt "resulting URL record" -> "resulting parsed URL" (will fix with changes to 2.5.2 eventually) * Update refs to CSP3 (from CSP1 Note) for Issue #191 Also fix typo 'teh' * Groundwork for realms #190 and scripting updates #165, #189 Importing dependent changes since last sync of WHATWG in mid-Jan. Added JS-related terms * intermediate: translated definitions in scripting section * Imports 3 fetch script algorithms and reorders a few sections to match WHATWG * add algorithms for script creation * WIP: Syncing changes through event handler section * webappapi include mostly synced. script element section remains * syncing changes for the script element * pulling in more required sections for linking issues * Further reducing linking issues * fixes more linking issues * Finally builds CLEAN! * Adding some missing CSP changes * Adding a few more CSP dependencies * All CSP changes validated and builds clean * removing tables from dt elements for readability * Fix a minor bad merge issue
* CSP integrations for Issue w3c#201 Had to adapt "resulting URL record" -> "resulting parsed URL" (will fix with changes to 2.5.2 eventually) * Update refs to CSP3 (from CSP1 Note) for Issue w3c#191 Also fix typo 'teh' * Groundwork for realms w3c#190 and scripting updates w3c#165, w3c#189 Importing dependent changes since last sync of WHATWG in mid-Jan. Added JS-related terms * intermediate: translated definitions in scripting section * Imports 3 fetch script algorithms and reorders a few sections to match WHATWG * add algorithms for script creation * WIP: Syncing changes through event handler section * webappapi include mostly synced. script element section remains * syncing changes for the script element * pulling in more required sections for linking issues * Further reducing linking issues * fixes more linking issues * Finally builds CLEAN! * Adding some missing CSP changes * Adding a few more CSP dependencies * All CSP changes validated and builds clean * removing tables from dt elements for readability * Fix a minor bad merge issue
https://jsfiddle.net/h0446dky/
FireFox prints
thirdfourth
as they reopen the document after the script exits, but yet they define an insertion point for the lifetime of third and fourth (two separate promises)Chrome prints
firstsecondthirdfourth
as they keep an insertion point the entire timeEdge either crashes or prints
third
as script execution stops after the first call todocument.write
The text was updated successfully, but these errors were encountered: