Move WebIDL methods to traits implemented by JSRef types.

This commit is contained in:
Josh Matthews 2014-04-10 21:29:54 -04:00
parent dfdda0098a
commit 76783b029e
106 changed files with 3644 additions and 1912 deletions

View file

@ -40,20 +40,28 @@ impl HTMLOptGroupElement {
}
}
impl HTMLOptGroupElement {
pub fn Disabled(&self) -> bool {
pub trait HTMLOptGroupElementMethods {
fn Disabled(&self) -> bool;
fn SetDisabled(&mut self, _disabled: bool) -> ErrorResult;
fn Label(&self) -> DOMString;
fn SetLabel(&mut self, _label: DOMString) -> ErrorResult;
}
impl<'a> HTMLOptGroupElementMethods for JSRef<'a, HTMLOptGroupElement> {
fn Disabled(&self) -> bool {
false
}
pub fn SetDisabled(&mut self, _disabled: bool) -> ErrorResult {
fn SetDisabled(&mut self, _disabled: bool) -> ErrorResult {
Ok(())
}
pub fn Label(&self) -> DOMString {
fn Label(&self) -> DOMString {
~""
}
pub fn SetLabel(&mut self, _label: DOMString) -> ErrorResult {
fn SetLabel(&mut self, _label: DOMString) -> ErrorResult {
Ok(())
}
}