mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Implement nomodule attribute
This commit is contained in:
parent
5c9536acdc
commit
1cc6435cfc
2 changed files with 11 additions and 1 deletions
|
@ -447,7 +447,10 @@ impl HTMLScriptElement {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Step 12: nomodule content attribute
|
// Step 12
|
||||||
|
if element.has_attribute(&local_name!("nomodule")) && script_type == ScriptType::Classic {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Step 13.
|
// Step 13.
|
||||||
if !element.has_attribute(&local_name!("src")) &&
|
if !element.has_attribute(&local_name!("src")) &&
|
||||||
|
@ -1062,6 +1065,11 @@ impl HTMLScriptElementMethods for HTMLScriptElement {
|
||||||
// https://html.spec.whatwg.org/multipage/#dom-script-defer
|
// https://html.spec.whatwg.org/multipage/#dom-script-defer
|
||||||
make_bool_setter!(SetDefer, "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
|
// https://html.spec.whatwg.org/multipage/#dom-script-integrity
|
||||||
make_getter!(Integrity, "integrity");
|
make_getter!(Integrity, "integrity");
|
||||||
// https://html.spec.whatwg.org/multipage/#dom-script-integrity
|
// https://html.spec.whatwg.org/multipage/#dom-script-integrity
|
||||||
|
|
|
@ -11,6 +11,8 @@ interface HTMLScriptElement : HTMLElement {
|
||||||
attribute USVString src;
|
attribute USVString src;
|
||||||
[CEReactions]
|
[CEReactions]
|
||||||
attribute DOMString type;
|
attribute DOMString type;
|
||||||
|
[CEReactions]
|
||||||
|
attribute boolean noModule;
|
||||||
[CEReactions]
|
[CEReactions]
|
||||||
attribute DOMString charset;
|
attribute DOMString charset;
|
||||||
[CEReactions]
|
[CEReactions]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue