diff options
author | Moonchild <moonchild@palemoon.org> | 2020-08-25 07:06:43 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-08-25 07:06:43 +0000 |
commit | 2008a442097ce941097d5272cf552c1d6895b78e (patch) | |
tree | e4c6248559f4fe559cfe32df5ccf81a3bdcb47ab /parser | |
parent | 4aaa2f4b7772f9aa4466a8caf009459f92222ed1 (diff) | |
download | uxp-2008a442097ce941097d5272cf552c1d6895b78e.tar.gz |
Issue mcp-graveyard/UXP#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 'parser')
-rw-r--r-- | parser/html/nsHtml5TreeOperation.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/parser/html/nsHtml5TreeOperation.cpp b/parser/html/nsHtml5TreeOperation.cpp index 46907d3a4a..6444b96749 100644 --- a/parser/html/nsHtml5TreeOperation.cpp +++ b/parser/html/nsHtml5TreeOperation.cpp @@ -1076,7 +1076,7 @@ nsHtml5TreeOperation::Perform(nsHtml5TreeOpExecutor* aBuilder, nsCOMPtr<nsIScriptElement> sele = do_QueryInterface(node); NS_ASSERTION(sele, "Node didn't QI to script."); sele->SetScriptLineNumber(mFour.integer); - sele->FreezeUriAsyncDefer(); + sele->FreezeExecutionAttrs(node->OwnerDoc()); return NS_OK; } case eTreeOpSvgLoad: { |