Implement 'align' attribute for <div> elements

This commit is contained in:
Corey Farwell 2015-10-09 10:45:24 -04:00
parent 9cccd98254
commit 55c65d3192
4 changed files with 10 additions and 137 deletions

View file

@ -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");
}

View file

@ -10,5 +10,5 @@ interface HTMLDivElement : HTMLElement {
// https://www.whatwg.org/html/#HTMLDivElement-partial
partial interface HTMLDivElement {
// attribute DOMString align;
attribute DOMString align;
};