aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmldivelement.rs
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2015-10-09 10:45:24 -0400
committerCorey Farwell <coreyf@rwell.org>2015-10-10 08:15:44 -0400
commit55c65d319272b84197cb80edce388fd5ae601ed8 (patch)
treecbbc14f159e4a0ef4c3b8332f1b77b0719b7799d /components/script/dom/htmldivelement.rs
parent9cccd98254191b1663dcaee9010eee63fa8074a3 (diff)
downloadservo-55c65d319272b84197cb80edce388fd5ae601ed8.tar.gz
servo-55c65d319272b84197cb80edce388fd5ae601ed8.zip
Implement 'align' attribute for <div> elements
Diffstat (limited to 'components/script/dom/htmldivelement.rs')
-rw-r--r--components/script/dom/htmldivelement.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/components/script/dom/htmldivelement.rs b/components/script/dom/htmldivelement.rs
index d5979f2c16b..b2e6a2882bf 100644
--- a/components/script/dom/htmldivelement.rs
+++ b/components/script/dom/htmldivelement.rs
@@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HTMLDivElementBinding;
+use dom::bindings::codegen::Bindings::HTMLDivElementBinding::{self, HTMLDivElementMethods};
use dom::bindings::codegen::InheritTypes::HTMLDivElementDerived;
use dom::bindings::js::Root;
use dom::document::Document;
@@ -42,3 +42,11 @@ impl HTMLDivElement {
Node::reflect_node(box element, document, HTMLDivElementBinding::Wrap)
}
}
+
+impl HTMLDivElementMethods for HTMLDivElement {
+ // https://html.spec.whatwg.org/multipage/#dom-div-align
+ make_getter!(Align);
+
+ // https://html.spec.whatwg.org/multipage/#dom-div-align
+ make_setter!(SetAlign, "align");
+}