mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +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,12 +40,18 @@ impl HTMLPreElement {
|
|||
}
|
||||
}
|
||||
|
||||
impl HTMLPreElement {
|
||||
pub fn Width(&self) -> i32 {
|
||||
pub trait HTMLPreElementMethods {
|
||||
fn Width(&self) -> i32;
|
||||
fn SetWidth(&mut self, _width: i32) -> ErrorResult;
|
||||
}
|
||||
|
||||
impl<'a> HTMLPreElementMethods for JSRef<'a, HTMLPreElement> {
|
||||
fn Width(&self) -> i32 {
|
||||
0
|
||||
}
|
||||
|
||||
pub fn SetWidth(&mut self, _width: i32) -> ErrorResult {
|
||||
fn SetWidth(&mut self, _width: i32) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue