mirror of
https://github.com/roytam1/basilisk55.git
synced 2026-05-27 00:01:37 +00:00
import from UXP:
- Issue #618 - Don't preload nomodule scripts when modules are enabled (6c8f24a7) - Issue #618 - Regenerate the HTML Parser code for nomodule changes (527d5c62)
This commit is contained in:
@@ -2602,13 +2602,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);
|
||||
@@ -2617,9 +2619,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;
|
||||
|
||||
Reference in New Issue
Block a user