mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +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 HTMLBaseElement {
|
|||
}
|
||||
}
|
||||
|
||||
impl HTMLBaseElement {
|
||||
pub fn Href(&self) -> DOMString {
|
||||
pub trait HTMLBaseElementMethods {
|
||||
fn Href(&self) -> DOMString;
|
||||
fn SetHref(&self, _href: DOMString) -> ErrorResult;
|
||||
fn Target(&self) -> DOMString;
|
||||
fn SetTarget(&self, _target: DOMString) -> ErrorResult;
|
||||
}
|
||||
|
||||
impl<'a> HTMLBaseElementMethods for JSRef<'a, HTMLBaseElement> {
|
||||
fn Href(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetHref(&self, _href: DOMString) -> ErrorResult {
|
||||
fn SetHref(&self, _href: DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Target(&self) -> DOMString {
|
||||
fn Target(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetTarget(&self, _target: DOMString) -> ErrorResult {
|
||||
fn SetTarget(&self, _target: DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue