mirror of
https://github.com/servo/servo.git
synced 2025-07-22 06:43:40 +01:00
Implement HTMLScriptElement async attribute
This commit is contained in:
parent
89c210f2c8
commit
91717ab17c
14 changed files with 12 additions and 59 deletions
|
@ -685,6 +685,17 @@ impl HTMLScriptElementMethods for HTMLScriptElement {
|
|||
// https://html.spec.whatwg.org/multipage/#dom-script-charset
|
||||
make_setter!(SetCharset, "charset");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-script-async
|
||||
fn Async(&self) -> bool {
|
||||
self.non_blocking.get() || self.upcast::<Element>().has_attribute(&local_name!("async"))
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-script-async
|
||||
fn SetAsync(&self, value: bool) {
|
||||
self.non_blocking.set(false);
|
||||
self.upcast::<Element>().set_bool_attribute(&local_name!("async"), value);
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-script-defer
|
||||
make_bool_getter!(Defer, "defer");
|
||||
// https://html.spec.whatwg.org/multipage/#dom-script-defer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue