diff options
Diffstat (limited to 'dom/script/ScriptLoader.cpp')
-rw-r--r-- | dom/script/ScriptLoader.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/dom/script/ScriptLoader.cpp b/dom/script/ScriptLoader.cpp index 989301b91..0052c72fe 100644 --- a/dom/script/ScriptLoader.cpp +++ b/dom/script/ScriptLoader.cpp @@ -2576,13 +2576,15 @@ ScriptLoader::ParsingComplete(bool aTerminated) } void -ScriptLoader::PreloadURI(nsIURI *aURI, const nsAString &aCharset, +ScriptLoader::PreloadURI(nsIURI *aURI, + const nsAString &aCharset, const nsAString &aType, const nsAString &aCrossOrigin, const nsAString& aIntegrity, bool aScriptFromHead, bool aAsync, bool aDefer, + bool aNoModule, const mozilla::net::ReferrerPolicy aReferrerPolicy) { NS_ENSURE_TRUE_VOID(mDocument); @@ -2591,9 +2593,16 @@ ScriptLoader::PreloadURI(nsIURI *aURI, const nsAString &aCharset, return; } - // TODO: Preload module scripts. - if (mDocument->ModuleScriptsEnabled() && aType.LowerCaseEqualsASCII("module")) { - return; + if (mDocument->ModuleScriptsEnabled()) { + // Don't load nomodule scripts. + if (aNoModule) { + return; + } + + // TODO: Preload module scripts. + if (aType.LowerCaseEqualsASCII("module")) { + return; + } } SRIMetadata sriMetadata; |