Commit 50773c7
authored
Remove async attribute from module script tag. (#5870)
Fixes #5869.
Module scripts are deferred by default per HTML spec section 4.12.1
(prepare a script algorithm): parser-inserted type=module scripts
without async go into the "list of scripts that will execute when the
document has finished parsing" (executed in section 13.2.7 "The end").
Adding async makes the script execute as soon as it downloads, which
can happen before DOM parsing completes, breaking document.getElementById
and similar DOM access in the main bundle.1 parent f0c4c03 commit 50773c7
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
| 129 | + | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| |||
0 commit comments