diff options
author | Vincent Ricard <magic@magicninja.org> | 2020-09-20 23:05:41 +0200 |
---|---|---|
committer | Vincent Ricard <magic@magicninja.org> | 2020-10-05 09:26:36 +0200 |
commit | 2a4dd894deb33bfe7c0d788afc9cc8c40c55ef48 (patch) | |
tree | 2e49fe758d0333ec09806e0d86f5ca900dfd2088 /components/script/dom/htmlformelement.rs | |
parent | 3f7697690aabd2d8c31bc880fcae21250244219a (diff) | |
download | servo-2a4dd894deb33bfe7c0d788afc9cc8c40c55ef48.tar.gz servo-2a4dd894deb33bfe7c0d788afc9cc8c40c55ef48.zip |
Implement DOMTokenList.supports API
Diffstat (limited to 'components/script/dom/htmlformelement.rs')
-rw-r--r-- | components/script/dom/htmlformelement.rs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/components/script/dom/htmlformelement.rs b/components/script/dom/htmlformelement.rs index af2ee5e5d15..54c9d710dd3 100644 --- a/components/script/dom/htmlformelement.rs +++ b/components/script/dom/htmlformelement.rs @@ -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 |