summaryrefslogtreecommitdiffstats
path: root/dom/html/HTMLScriptElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/html/HTMLScriptElement.cpp')
-rw-r--r--dom/html/HTMLScriptElement.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/dom/html/HTMLScriptElement.cpp b/dom/html/HTMLScriptElement.cpp
index 006bff23a7..9fbf46699d 100644
--- a/dom/html/HTMLScriptElement.cpp
+++ b/dom/html/HTMLScriptElement.cpp
@@ -88,6 +88,12 @@ bool HTMLScriptElement::ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute,
ParseFetchPriority(aValue, aResult);
return true;
}
+
+ if (aAttribute == nsGkAtoms::blocking &&
+ StaticPrefs::dom_element_blocking_enabled()) {
+ aResult.ParseAtomArray(aValue);
+ return true;
+ }
}
return nsGenericHTMLElement::ParseAttribute(aNamespaceID, aAttribute, aValue,
@@ -251,4 +257,14 @@ nsDOMTokenList* HTMLScriptElement::Blocking() {
return mBlocking;
}
+bool HTMLScriptElement::IsPotentiallyRenderBlocking() {
+ return BlockingContainsRender();
+
+ // TODO: handle implicitly potentially render blocking
+ // https://html.spec.whatwg.org/#implicitly-potentially-render-blocking
+ // A script element el is implicitly potentially render-blocking if el's type
+ // is "classic", el is parser-inserted, and el does not have an async or defer
+ // attribute.
+}
+
} // namespace mozilla::dom