aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlscriptelement.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/htmlscriptelement.rs')
-rw-r--r--components/script/dom/htmlscriptelement.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/components/script/dom/htmlscriptelement.rs b/components/script/dom/htmlscriptelement.rs
index 8285b26605d..3a55590c81d 100644
--- a/components/script/dom/htmlscriptelement.rs
+++ b/components/script/dom/htmlscriptelement.rs
@@ -447,7 +447,10 @@ impl HTMLScriptElement {
return;
}
- // TODO: Step 12: nomodule content attribute
+ // Step 12
+ if element.has_attribute(&local_name!("nomodule")) && script_type == ScriptType::Classic {
+ return;
+ }
// Step 13.
if !element.has_attribute(&local_name!("src")) &&
@@ -1062,6 +1065,11 @@ impl HTMLScriptElementMethods for HTMLScriptElement {
// https://html.spec.whatwg.org/multipage/#dom-script-defer
make_bool_setter!(SetDefer, "defer");
+ // https://html.spec.whatwg.org/multipage/#dom-script-nomodule
+ make_bool_getter!(NoModule, "nomodule");
+ // https://html.spec.whatwg.org/multipage/#dom-script-nomodule
+ make_bool_setter!(SetNoModule, "nomodule");
+
// https://html.spec.whatwg.org/multipage/#dom-script-integrity
make_getter!(Integrity, "integrity");
// https://html.spec.whatwg.org/multipage/#dom-script-integrity