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 HTMLModElement {
}
}
impl HTMLModElement {
pub fn Cite(&self) -> DOMString {
pub trait HTMLModElementMethods {
fn Cite(&self) -> DOMString;
fn SetCite(&mut self, _cite: DOMString) -> ErrorResult;
fn DateTime(&self) -> DOMString;
fn SetDateTime(&mut self, _datetime: DOMString) -> ErrorResult;
}
impl<'a> HTMLModElementMethods for JSRef<'a, HTMLModElement> {
fn Cite(&self) -> DOMString {
~""
}
pub fn SetCite(&mut self, _cite: DOMString) -> ErrorResult {
fn SetCite(&mut self, _cite: DOMString) -> ErrorResult {
Ok(())
}
pub fn DateTime(&self) -> DOMString {
fn DateTime(&self) -> DOMString {
~""
}
pub fn SetDateTime(&mut self, _datetime: DOMString) -> ErrorResult {
fn SetDateTime(&mut self, _datetime: DOMString) -> ErrorResult {
Ok(())
}
}