diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /dom/html/HTMLScriptElement.cpp | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/html/HTMLScriptElement.cpp')
-rw-r--r-- | dom/html/HTMLScriptElement.cpp | 16 |
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 |