summaryrefslogtreecommitdiffstats
path: root/dom/svg
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-08-25 07:06:43 +0000
committerMoonchild <moonchild@palemoon.org>2020-08-25 07:06:43 +0000
commitb78f53ffb09a6aae6dbdc069c7cdd42d11b5eed2 (patch)
treee4c6248559f4fe559cfe32df5ccf81a3bdcb47ab /dom/svg
parent8b397a63af13f7dfc127b1105f33cd652b2f1f6d (diff)
downloadUXP-b78f53ffb09a6aae6dbdc069c7cdd42d11b5eed2.tar
UXP-b78f53ffb09a6aae6dbdc069c7cdd42d11b5eed2.tar.gz
UXP-b78f53ffb09a6aae6dbdc069c7cdd42d11b5eed2.tar.lz
UXP-b78f53ffb09a6aae6dbdc069c7cdd42d11b5eed2.tar.xz
UXP-b78f53ffb09a6aae6dbdc069c7cdd42d11b5eed2.zip
Issue #618 - (async) Implement async attribute for inline module scripts.
This commit does several things: - Moves the pref check from ScriptLoader to ns[I]Document so it can be called on the document. - Changes the atrribute freezing function to a better name that takes the document as a parameter. - Sets the proper async/defer attributes on HTML script elements based on keywords and whether they are module scripts or not.
Diffstat (limited to 'dom/svg')
-rw-r--r--dom/svg/SVGScriptElement.cpp2
-rw-r--r--dom/svg/SVGScriptElement.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/dom/svg/SVGScriptElement.cpp b/dom/svg/SVGScriptElement.cpp
index 7adce2f46..9a4afb13a 100644
--- a/dom/svg/SVGScriptElement.cpp
+++ b/dom/svg/SVGScriptElement.cpp
@@ -137,7 +137,7 @@ SVGScriptElement::GetScriptCharset(nsAString& charset)
}
void
-SVGScriptElement::FreezeUriAsyncDefer()
+SVGScriptElement::FreezeExecutionAttrs(nsIDocument* aOwnerDoc)
{
if (mFrozen) {
return;
diff --git a/dom/svg/SVGScriptElement.h b/dom/svg/SVGScriptElement.h
index 79a3de70d..8ee94bf02 100644
--- a/dom/svg/SVGScriptElement.h
+++ b/dom/svg/SVGScriptElement.h
@@ -44,7 +44,7 @@ public:
virtual bool GetScriptType(nsAString& type) override;
virtual void GetScriptText(nsAString& text) override;
virtual void GetScriptCharset(nsAString& charset) override;
- virtual void FreezeUriAsyncDefer() override;
+ virtual void FreezeExecutionAttrs(nsIDocument* aOwnerDoc) override;
virtual CORSMode GetCORSMode() const override;
// ScriptElement