Bug 1808360 - Add error message for external import maps. r=jonco,flod

Differential Revision: https://phabricator.services.mozilla.com/D166028
This commit is contained in:
Yoshi Cheng-Hao Huang
2023-01-05 14:16:58 +00:00
parent f127492b43
commit 63b04f821e
4 changed files with 36 additions and 0 deletions

View File

@@ -942,6 +942,9 @@ bool ScriptLoader::ProcessExternalScript(nsIScriptElement* aElement,
NS_DispatchToCurrentThread(
NewRunnableMethod("nsIScriptElement::FireErrorEvent", aElement,
&nsIScriptElement::FireErrorEvent));
nsContentUtils::ReportToConsole(
nsIScriptError::warningFlag, "Script Loader"_ns, mDocument,
nsContentUtils::eDOM_PROPERTIES, "ImportMapExternalNotSupported");
return false;
}