From 38d13e2779f9bfbf8620ead68a9bf0ffbed5762a Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Wed, 26 Aug 2020 11:19:42 -0400 Subject: Issue #618 - Don't preload nomodule scripts when modules are enabled Ref: BZ 1382020 --- parser/html/nsHtml5TreeBuilderCppSupplement.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'parser/html/nsHtml5TreeBuilderCppSupplement.h') diff --git a/parser/html/nsHtml5TreeBuilderCppSupplement.h b/parser/html/nsHtml5TreeBuilderCppSupplement.h index 634c5c218..f09cc1853 100644 --- a/parser/html/nsHtml5TreeBuilderCppSupplement.h +++ b/parser/html/nsHtml5TreeBuilderCppSupplement.h @@ -189,15 +189,18 @@ nsHtml5TreeBuilder::createElement(int32_t aNamespace, aAttributes->contains(nsHtml5AttributeName::ATTR_ASYNC); bool defer = aAttributes->contains(nsHtml5AttributeName::ATTR_DEFER); + bool noModule = + aAttributes->contains(nsHtml5AttributeName::ATTR_NOMODULE); mSpeculativeLoadQueue.AppendElement()->InitScript( url, charset, type, crossOrigin, integrity, - mode == nsHtml5TreeBuilder::IN_HEAD, + mode == nsHtml5TreeBuilder::IN_HEAD, async, - defer); + defer, + noModule); mCurrentHtmlScriptIsAsyncOrDefer = async || defer; } } else if (nsHtml5Atoms::link == aName) { @@ -303,7 +306,8 @@ nsHtml5TreeBuilder::createElement(int32_t aNamespace, integrity, mode == nsHtml5TreeBuilder::IN_HEAD, false /* async */, - false /* defer */); + false /* defer */, + false /* noModule */); } } else if (nsHtml5Atoms::style == aName) { nsHtml5TreeOperation* treeOp = mOpQueue.AppendElement(); -- cgit v1.2.3