| Index: third_party/WebKit/Source/core/dom/ScriptLoader.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
|
| index 35e29537ea9ae8671e7364444d4f164221e8824b..6fb2ab939f8d779993049e9efcbc5bb988abf7b8 100644
|
| --- a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
|
| @@ -215,6 +215,11 @@ bool ScriptLoader::IsValidScriptTypeAndLanguage(
|
| return false;
|
| }
|
|
|
| +bool ScriptLoader::BlockForNoModule(ScriptType script_type, bool nomodule) {
|
| + return nomodule && script_type == ScriptType::kClassic &&
|
| + RuntimeEnabledFeatures::moduleScriptsEnabled();
|
| +}
|
| +
|
| bool ScriptLoader::IsScriptTypeSupported(LegacyTypeSupport support_legacy_types,
|
| ScriptType& out_script_type) const {
|
| return IsValidScriptTypeAndLanguage(element_->TypeAttributeValue(),
|
| @@ -296,7 +301,8 @@ bool ScriptLoader::PrepareScript(const TextPosition& script_start_position,
|
| // 11. "If the script element has a nomodule content attribute
|
| // and the script's type is "classic", then abort these steps.
|
| // The script is not executed."
|
| - // TODO(japhet): Implement this step.
|
| + if (BlockForNoModule(script_type_, element_->NomoduleAttributeValue()))
|
| + return false;
|
|
|
| // 13.
|
| if (!IsScriptForEventSupported())
|
|
|