Implement DOMTokenList.supports API

This commit is contained in:
Vincent Ricard 2020-09-20 23:05:41 +02:00
parent 3f7697690a
commit 2a4dd894de
20 changed files with 147 additions and 72 deletions

View file

@ -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