Skip to content

Commit

Permalink
Bug 1688879 - Part 7: External import maps aren't supported. r=jonco,…
Browse files Browse the repository at this point in the history
…yulia

External import maps aren't supported for now.
WICG/import-maps#235

Differential Revision: https://phabricator.services.mozilla.com/D142075
  • Loading branch information
allstarschh committed May 5, 2022
1 parent bf4ad5a commit 661d803
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions dom/script/ScriptLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -913,6 +913,14 @@ bool ScriptLoader::ProcessExternalScript(nsIScriptElement* aElement,
LOG(("ScriptLoader (%p): Process external script for element %p", this,
aElement));

// Bug 1765745: Support external import maps.
if (aScriptKind == ScriptKind::eImportMap) {
NS_DispatchToCurrentThread(
NewRunnableMethod("nsIScriptElement::FireErrorEvent", aElement,
&nsIScriptElement::FireErrorEvent));
return false;
}

nsCOMPtr<nsIURI> scriptURI = aElement->GetScriptURI();
if (!scriptURI) {
// Asynchronously report the failure to create a URI object
Expand Down

0 comments on commit 661d803

Please sign in to comment.