mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Implement DOMTokenList.supports API
This commit is contained in:
parent
3f7697690a
commit
2a4dd894de
20 changed files with 147 additions and 72 deletions
|
@ -450,8 +450,17 @@ impl HTMLFormElementMethods for HTMLFormElement {
|
|||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-a-rellist
|
||||
fn RelList(&self) -> DomRoot<DOMTokenList> {
|
||||
self.rel_list
|
||||
.or_init(|| DOMTokenList::new(self.upcast(), &local_name!("rel")))
|
||||
self.rel_list.or_init(|| {
|
||||
DOMTokenList::new(
|
||||
self.upcast(),
|
||||
&local_name!("rel"),
|
||||
Some(vec![
|
||||
Atom::from("noopener"),
|
||||
Atom::from("noreferrer"),
|
||||
Atom::from("opener"),
|
||||
]),
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#the-form-element:supported-property-names
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue