mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Implement 'align' attribute for <div> elements
This commit is contained in:
parent
9cccd98254
commit
55c65d3192
4 changed files with 10 additions and 137 deletions
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -10,5 +10,5 @@ interface HTMLDivElement : HTMLElement {
|
|||
|
||||
// https://www.whatwg.org/html/#HTMLDivElement-partial
|
||||
partial interface HTMLDivElement {
|
||||
// attribute DOMString align;
|
||||
attribute DOMString align;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue