aboutsummaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/script/dom/htmlanchorelement.rs12
-rw-r--r--components/script/dom/webidls/HTMLAnchorElement.webidl10
2 files changed, 14 insertions, 8 deletions
diff --git a/components/script/dom/htmlanchorelement.rs b/components/script/dom/htmlanchorelement.rs
index 53aeb9a6bff..a139afe0384 100644
--- a/components/script/dom/htmlanchorelement.rs
+++ b/components/script/dom/htmlanchorelement.rs
@@ -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
diff --git a/components/script/dom/webidls/HTMLAnchorElement.webidl b/components/script/dom/webidls/HTMLAnchorElement.webidl
index f78d1dae6dd..41026e25bce 100644
--- a/components/script/dom/webidls/HTMLAnchorElement.webidl
+++ b/components/script/dom/webidls/HTMLAnchorElement.webidl
@@ -13,12 +13,12 @@
// https://html.spec.whatwg.org/multipage/#htmlanchorelement
interface HTMLAnchorElement : HTMLElement {
attribute DOMString target;
- // attribute DOMString download;
- // attribute USVString ping;
- // attribute DOMString rel;
+ // attribute DOMString download;
+ // attribute USVString ping;
+ attribute DOMString rel;
readonly attribute DOMTokenList relList;
- // attribute DOMString hreflang;
- // attribute DOMString type;
+ // attribute DOMString hreflang;
+ // attribute DOMString type;
[Pure]
attribute DOMString text;