mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Implement HTMLAnchorElement.rel getter and setter
Signed-off-by: Ying-Ruei Liang(KK) <thumbd03803@gmail.com>
This commit is contained in:
parent
2084ee29c4
commit
bb6d52971a
13 changed files with 103 additions and 110 deletions
|
@ -113,11 +113,17 @@ impl HTMLAnchorElementMethods for HTMLAnchorElement {
|
|||
self.upcast::<Node>().SetTextContent(Some(value))
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-a-rel
|
||||
make_getter!(Rel, "rel");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-a-rel
|
||||
fn SetRel(&self, rel: DOMString) {
|
||||
self.upcast::<Element>().set_tokenlist_attribute(&local_name!("rel"), rel);
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-a-rellist
|
||||
fn RelList(&self) -> Root<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")))
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-a-coords
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue