aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom')
-rw-r--r--components/script/dom/htmlhrelement.rs7
-rw-r--r--components/script/dom/webidls/HTMLHRElement.webidl2
2 files changed, 8 insertions, 1 deletions
diff --git a/components/script/dom/htmlhrelement.rs b/components/script/dom/htmlhrelement.rs
index 93fdebbc954..bea12efbfea 100644
--- a/components/script/dom/htmlhrelement.rs
+++ b/components/script/dom/htmlhrelement.rs
@@ -37,6 +37,12 @@ impl HTMLHRElement {
}
impl HTMLHRElementMethods for HTMLHRElement {
+ // https://html.spec.whatwg.org/multipage/#dom-hr-align
+ make_getter!(Align, "align");
+
+ // https://html.spec.whatwg.org/multipage/#dom-hr-align
+ make_atomic_setter!(SetAlign, "align");
+
// https://html.spec.whatwg.org/multipage/#dom-hr-color
make_getter!(Color, "color");
@@ -86,6 +92,7 @@ impl VirtualMethods for HTMLHRElement {
fn parse_plain_attribute(&self, name: &Atom, value: DOMString) -> AttrValue {
match name {
+ &atom!("align") => AttrValue::from_dimension(value),
&atom!("color") => AttrValue::from_legacy_color(value),
&atom!("width") => AttrValue::from_dimension(value),
_ => self.super_type().unwrap().parse_plain_attribute(name, value),
diff --git a/components/script/dom/webidls/HTMLHRElement.webidl b/components/script/dom/webidls/HTMLHRElement.webidl
index f203527b2bf..e3ba6113748 100644
--- a/components/script/dom/webidls/HTMLHRElement.webidl
+++ b/components/script/dom/webidls/HTMLHRElement.webidl
@@ -10,7 +10,7 @@ interface HTMLHRElement : HTMLElement {
// https://html.spec.whatwg.org/multipage/#HTMLHRElement-partial
partial interface HTMLHRElement {
- // attribute DOMString align;
+ attribute DOMString align;
attribute DOMString color;
// attribute boolean noShade;
// attribute DOMString size;