mirror of
https://github.com/ManchildProductions/UXP-Fixed.git
synced 2026-05-27 05:40:47 +00: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:
@@ -128,11 +128,11 @@ ScriptElement::MaybeProcessScript()
|
||||
return false;
|
||||
}
|
||||
|
||||
FreezeUriAsyncDefer();
|
||||
nsIDocument* ownerDoc = cont->OwnerDoc();
|
||||
FreezeExecutionAttrs(ownerDoc);
|
||||
|
||||
mAlreadyStarted = true;
|
||||
|
||||
nsIDocument* ownerDoc = cont->OwnerDoc();
|
||||
nsCOMPtr<nsIParser> parser = ((nsIScriptElement*) this)->GetCreatorParser();
|
||||
if (parser) {
|
||||
nsCOMPtr<nsIContentSink> sink = parser->GetContentSink();
|
||||
|
||||
Reference in New Issue
Block a user