mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Move WebIDL methods to traits implemented by JSRef types.
This commit is contained in:
parent
dfdda0098a
commit
76783b029e
106 changed files with 3644 additions and 1912 deletions
|
@ -40,20 +40,28 @@ impl HTMLLIElement {
|
|||
}
|
||||
}
|
||||
|
||||
impl HTMLLIElement {
|
||||
pub fn Value(&self) -> i32 {
|
||||
pub trait HTMLLIElementMethods {
|
||||
fn Value(&self) -> i32;
|
||||
fn SetValue(&mut self, _value: i32) -> ErrorResult;
|
||||
fn Type(&self) -> DOMString;
|
||||
fn SetType(&mut self, _type: DOMString) -> ErrorResult;
|
||||
}
|
||||
|
||||
impl<'a> HTMLLIElementMethods for JSRef<'a, HTMLLIElement> {
|
||||
fn Value(&self) -> i32 {
|
||||
0
|
||||
}
|
||||
|
||||
pub fn SetValue(&mut self, _value: i32) -> ErrorResult {
|
||||
fn SetValue(&mut self, _value: i32) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> DOMString {
|
||||
fn Type(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetType(&mut self, _type: DOMString) -> ErrorResult {
|
||||
fn SetType(&mut self, _type: DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue