Remove async attribute from module script tag#5870
Merged
canova merged 1 commit intofirefox-devtools:mainfrom Mar 2, 2026
Merged
Remove async attribute from module script tag#5870canova merged 1 commit intofirefox-devtools:mainfrom
canova merged 1 commit intofirefox-devtools:mainfrom
Conversation
Fixes firefox-devtools#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.
1b5e655 to
5a9acf5
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5870 +/- ##
=======================================
Coverage 85.56% 85.56%
=======================================
Files 319 319
Lines 31499 31499
Branches 8705 8705
=======================================
Hits 26953 26953
Misses 4115 4115
Partials 431 431 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
canova
approved these changes
Mar 2, 2026
Member
canova
left a comment
There was a problem hiding this comment.
Ah, I've seen this while looking into some deploy previews too. But wasn't sure if it was an issue in the deploy preview or more generic. But this makes sense. Thanks for the fix!
tenderlove
added a commit
to tenderlove/profiler
that referenced
this pull request
Mar 2, 2026
* main: (289 commits) Escape CSS URLs that are coming from profiles (firefox-devtools#5874) Memoize the computation of search filtering across threads. Memoize the computation of the implementation-filtered thread across threads. Memoize the computation of the call node table across threads. Reserve functions for collapsed resources globally. Correctly adjust transforms when merging profiles. Use Int32Array and oldXToNewXPlusOne convention in merge-compare.ts. Make profile compacting apply to the newly-shared tables. Update snapshots. Share the stackTable, frameTable, funcTable, resourceTable and nativeSymbols across threads. Update docsify to v4.13.1 with a PR manually patched Remove unused ga docsify plugin Remove async attribute from module script tag. (firefox-devtools#5870) Bump rollup from 2.79.2 to 2.80.0 Remove unused defaultCategory parameter. Implement the "collapse resource" transform with the help of the "collapse direct recursion" transform. Persist selected marker in URL and show sticky tooltip on load (firefox-devtools#5847) Fix unhandled promise rejection in setupInitialUrlState (firefox-devtools#5864) Force canvas redraw when system theme changes (firefox-devtools#5861) Fix the color of dark mode back arrow svg (firefox-devtools#5863) ...
Merged
canova
added a commit
that referenced
this pull request
Mar 3, 2026
Changes: [fatadel] Fix crash when nativeSymbol index is out of bounds in assembly view (#5850) [depfu[bot]] Update all Yarn dependencies (2026-02-25) (#5859) [Nazım Can Altınova] Fix the color of dark mode back arrow svg (#5863) [fatadel] Force canvas redraw when system theme changes (#5861) [Nazım Can Altınova] Fix unhandled promise rejection in setupInitialUrlState (#5864) [fatadel] Persist selected marker in URL and show sticky tooltip on load (#5847) [Markus Stange] Implement the "collapse resource" transform with the help of the "collapse direct recursion" transform. (#5824) [Markus Stange] Bump rollup from 2.79.2 to 2.80.0 (#5868) [Markus Stange] Remove async attribute from module script tag. (#5870) [Nazım Can Altınova] Update the docsify package that's used in the user documentation (#5872) [Markus Stange] Share stackTable, frameTable, funcTable, resourceTable and nativeSymbols between threads (#5482) [Nazım Can Altınova] Escape CSS URLs that are coming from profiles (#5874) [fatadel] Update home page message for the other browser case (#5866) [fatadel] Add support for ternaries in marker labels (#5857) [Markus Stange] Reduce allocations for getStackLineInfo + getStackAddressInfo (#5761) And special thanks to our localizers: de: Ger fy-NL: Fjoerfoks it: Francesco Lodolo [:flod] nl: Fjoerfoks ru: berry ru: Valery Ledovskoy zh-TW: Pin-guang Chen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #5869.
Module scripts are deferred by default per HTML spec section 4.12.1 (prepare a script element): 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.