aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/htmlbuttonelement.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/script/dom/htmlbuttonelement.rs')
-rw-r--r--src/components/script/dom/htmlbuttonelement.rs135
1 files changed, 0 insertions, 135 deletions
diff --git a/src/components/script/dom/htmlbuttonelement.rs b/src/components/script/dom/htmlbuttonelement.rs
index 1618d0b5b8f..59999403192 100644
--- a/src/components/script/dom/htmlbuttonelement.rs
+++ b/src/components/script/dom/htmlbuttonelement.rs
@@ -5,12 +5,10 @@
use dom::bindings::codegen::BindingDeclarations::HTMLButtonElementBinding;
use dom::bindings::codegen::InheritTypes::HTMLButtonElementDerived;
use dom::bindings::js::{JSRef, Temporary};
-use dom::bindings::error::ErrorResult;
use dom::document::Document;
use dom::element::HTMLButtonElementTypeId;
use dom::eventtarget::{EventTarget, NodeTargetTypeId};
use dom::htmlelement::HTMLElement;
-use dom::htmlformelement::HTMLFormElement;
use dom::node::{Node, ElementNodeTypeId, window_from_node};
use dom::validitystate::ValidityState;
use servo_util::str::DOMString;
@@ -40,145 +38,12 @@ impl HTMLButtonElement {
}
pub trait HTMLButtonElementMethods {
- fn Autofocus(&self) -> bool;
- fn SetAutofocus(&self, _autofocus: bool) -> ErrorResult;
- fn Disabled(&self) -> bool;
- fn SetDisabled(&self, _disabled: bool) -> ErrorResult;
- fn GetForm(&self) -> Option<Temporary<HTMLFormElement>>;
- fn FormAction(&self) -> DOMString;
- fn SetFormAction(&self, _formaction: DOMString) -> ErrorResult;
- fn FormEnctype(&self) -> DOMString;
- fn SetFormEnctype(&self, _formenctype: DOMString) -> ErrorResult;
- fn FormMethod(&self) -> DOMString;
- fn SetFormMethod(&self, _formmethod: DOMString) -> ErrorResult;
- fn FormNoValidate(&self) -> bool;
- fn SetFormNoValidate(&self, _novalidate: bool) -> ErrorResult;
- fn FormTarget(&self) -> DOMString;
- fn SetFormTarget(&self, _formtarget: DOMString) -> ErrorResult;
- fn Name(&self) -> DOMString;
- fn SetName(&self, _name: DOMString) -> ErrorResult;
- fn Type(&self) -> DOMString;
- fn SetType(&self, _type: DOMString) -> ErrorResult;
- fn Value(&self) -> DOMString;
- fn SetValue(&self, _value: DOMString) -> ErrorResult;
- fn WillValidate(&self) -> bool;
- fn SetWillValidate(&self, _will_validate: bool);
fn Validity(&self) -> Temporary<ValidityState>;
- fn ValidationMessage(&self) -> DOMString;
- fn SetValidationMessage(&self, _message: DOMString) -> ErrorResult;
- fn CheckValidity(&self) -> bool;
- fn SetCustomValidity(&self, _error: DOMString);
}
impl<'a> HTMLButtonElementMethods for JSRef<'a, HTMLButtonElement> {
- fn Autofocus(&self) -> bool {
- false
- }
-
- fn SetAutofocus(&self, _autofocus: bool) -> ErrorResult {
- Ok(())
- }
-
- fn Disabled(&self) -> bool {
- false
- }
-
- fn SetDisabled(&self, _disabled: bool) -> ErrorResult {
- Ok(())
- }
-
- fn GetForm(&self) -> Option<Temporary<HTMLFormElement>> {
- None
- }
-
- fn FormAction(&self) -> DOMString {
- "".to_owned()
- }
-
- fn SetFormAction(&self, _formaction: DOMString) -> ErrorResult {
- Ok(())
- }
-
- fn FormEnctype(&self) -> DOMString {
- "".to_owned()
- }
-
- fn SetFormEnctype(&self, _formenctype: DOMString) -> ErrorResult {
- Ok(())
- }
-
- fn FormMethod(&self) -> DOMString {
- "".to_owned()
- }
-
- fn SetFormMethod(&self, _formmethod: DOMString) -> ErrorResult {
- Ok(())
- }
-
- fn FormNoValidate(&self) -> bool {
- false
- }
-
- fn SetFormNoValidate(&self, _novalidate: bool) -> ErrorResult {
- Ok(())
- }
-
- fn FormTarget(&self) -> DOMString {
- "".to_owned()
- }
-
- fn SetFormTarget(&self, _formtarget: DOMString) -> ErrorResult {
- Ok(())
- }
-
- fn Name(&self) -> DOMString {
- "".to_owned()
- }
-
- fn SetName(&self, _name: DOMString) -> ErrorResult {
- Ok(())
- }
-
- fn Type(&self) -> DOMString {
- "".to_owned()
- }
-
- fn SetType(&self, _type: DOMString) -> ErrorResult {
- Ok(())
- }
-
- fn Value(&self) -> DOMString {
- "".to_owned()
- }
-
- fn SetValue(&self, _value: DOMString) -> ErrorResult {
- Ok(())
- }
-
- fn WillValidate(&self) -> bool {
- false
- }
-
- fn SetWillValidate(&self, _will_validate: bool) {
- }
-
fn Validity(&self) -> Temporary<ValidityState> {
let window = window_from_node(self).root();
ValidityState::new(&*window)
}
-
- fn ValidationMessage(&self) -> DOMString {
- "".to_owned()
- }
-
- fn SetValidationMessage(&self, _message: DOMString) -> ErrorResult {
- Ok(())
- }
-
- fn CheckValidity(&self) -> bool {
- true
- }
-
- fn SetCustomValidity(&self, _error: DOMString) {
- }
}