Closed jeremyroman closed 3 years ago
I believe https://wicg.github.io/import-maps/#ref-for-concept-script-type%E2%91%A2 makes it so type=importmaps
scripts are never exected.
I think scripts are only ever executed when they are added to one of the 3 (I think) lists of scripts that will execute [...] and their ready to be parser-executed flag is is set, or unless handled explicitly elsewhere in prepare a script step 28.
This spec adds a new "case" to step 28 (although it seems to reference it as step 26 which seems outdated) that handles the "readiness" of a type=importmap
script, which does not include executing the script, so I think this is why the execute algorithm is unreachable.
Ah, I think you're right. I missed an early-out in one of those branches and that you do avoid the "otherwise" branch in step 28. I was pretty sure I was missing something but it's a little inscrutable if you haven't stared at it long enough. Thanks.
A brief note might be helpful, but I'm not sure to concisely summarize either, so, mrrr.
The draft inserts an "Assert: Never reached." into the "execute a script block" algorithm, but it appears that nothing prevents this algorithm from running.
Three possible resolutions: