mirror of
https://github.com/servo/servo.git
synced 2025-08-09 15:35:34 +01:00
script: implement autofocus IDL reflection (#32170)
* script: implement autofocus IDL reflection * test: update wpt results files
This commit is contained in:
parent
6ca3bb440e
commit
3014e201ab
27 changed files with 45 additions and 24193 deletions
|
@ -591,6 +591,17 @@ impl HTMLElementMethods for HTMLElement {
|
|||
internals.set_attached();
|
||||
Ok(internals)
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-fe-autofocus
|
||||
fn Autofocus(&self) -> bool {
|
||||
self.element.has_attribute(&local_name!("autofocus"))
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-fe-autofocus
|
||||
fn SetAutofocus(&self, autofocus: bool) {
|
||||
self.element
|
||||
.set_bool_attribute(&local_name!("autofocus"), autofocus);
|
||||
}
|
||||
}
|
||||
|
||||
fn append_text_node_to_fragment(document: &Document, fragment: &DocumentFragment, text: String) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue