mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-06 07:17:30 +09:00
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.
This commit is contained in:
parent
294721687c
commit
3781c4a6dd
11 changed files with 73 additions and 41 deletions
|
|
@ -137,7 +137,7 @@ SVGScriptElement::GetScriptCharset(nsAString& charset)
|
|||
}
|
||||
|
||||
void
|
||||
SVGScriptElement::FreezeUriAsyncDefer()
|
||||
SVGScriptElement::FreezeExecutionAttrs(nsIDocument* aOwnerDoc)
|
||||
{
|
||||
if (mFrozen) {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue