aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlbuttonelement.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/htmlbuttonelement.rs')
-rw-r--r--components/script/dom/htmlbuttonelement.rs18
1 files changed, 13 insertions, 5 deletions
diff --git a/components/script/dom/htmlbuttonelement.rs b/components/script/dom/htmlbuttonelement.rs
index 38ed9b26e74..3bb7012cab4 100644
--- a/components/script/dom/htmlbuttonelement.rs
+++ b/components/script/dom/htmlbuttonelement.rs
@@ -45,21 +45,28 @@ pub struct HTMLButtonElement {
impl HTMLButtonElementDerived for EventTarget {
fn is_htmlbuttonelement(&self) -> bool {
- *self.type_id() == EventTargetTypeId::Node(NodeTypeId::Element(ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLButtonElement)))
+ *self.type_id() ==
+ EventTargetTypeId::Node(
+ NodeTypeId::Element(ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLButtonElement)))
}
}
impl HTMLButtonElement {
- fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLButtonElement {
+ fn new_inherited(localName: DOMString,
+ prefix: Option<DOMString>,
+ document: JSRef<Document>) -> HTMLButtonElement {
HTMLButtonElement {
- htmlelement: HTMLElement::new_inherited(HTMLElementTypeId::HTMLButtonElement, localName, prefix, document),
+ htmlelement:
+ HTMLElement::new_inherited(HTMLElementTypeId::HTMLButtonElement, localName, prefix, document),
//TODO: implement button_type in after_set_attr
button_type: Cell::new(ButtonType::ButtonSubmit)
}
}
#[allow(unrooted_must_root)]
- pub fn new(localName: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<HTMLButtonElement> {
+ pub fn new(localName: DOMString,
+ prefix: Option<DOMString>,
+ document: JSRef<Document>) -> Temporary<HTMLButtonElement> {
let element = HTMLButtonElement::new_inherited(localName, prefix, document);
Node::reflect_node(box element, document, HTMLButtonElementBinding::Wrap)
}
@@ -96,7 +103,8 @@ impl<'a> HTMLButtonElementMethods for JSRef<'a, HTMLButtonElement> {
make_setter!(SetFormAction, "formaction");
- make_enumerated_getter!(FormEnctype, "application/x-www-form-urlencoded", ("text/plain") | ("multipart/form-data"));
+ make_enumerated_getter!(
+ FormEnctype, "application/x-www-form-urlencoded", ("text/plain") | ("multipart/form-data"));
make_setter!(SetFormEnctype, "formenctype");