mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +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 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(())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue