mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +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,108 +40,137 @@ impl HTMLAnchorElement {
|
|||
}
|
||||
}
|
||||
|
||||
impl HTMLAnchorElement {
|
||||
pub fn Href(&self) -> DOMString {
|
||||
pub trait HTMLAnchorElementMethods {
|
||||
fn Href(&self) -> DOMString;
|
||||
fn SetHref(&mut self, _href: DOMString) -> ErrorResult;
|
||||
fn Target(&self) -> DOMString;
|
||||
fn SetTarget(&self, _target: DOMString) -> ErrorResult;
|
||||
fn Download(&self) -> DOMString;
|
||||
fn SetDownload(&self, _download: DOMString) -> ErrorResult;
|
||||
fn Ping(&self) -> DOMString;
|
||||
fn SetPing(&self, _ping: DOMString) -> ErrorResult;
|
||||
fn Rel(&self) -> DOMString;
|
||||
fn SetRel(&self, _rel: DOMString) -> ErrorResult;
|
||||
fn Hreflang(&self) -> DOMString;
|
||||
fn SetHreflang(&self, _href_lang: DOMString) -> ErrorResult;
|
||||
fn Type(&self) -> DOMString;
|
||||
fn SetType(&mut self, _type: DOMString) -> ErrorResult;
|
||||
fn Text(&self) -> DOMString;
|
||||
fn SetText(&mut self, _text: DOMString) -> ErrorResult;
|
||||
fn Coords(&self) -> DOMString;
|
||||
fn SetCoords(&mut self, _coords: DOMString) -> ErrorResult;
|
||||
fn Charset(&self) -> DOMString;
|
||||
fn SetCharset(&mut self, _charset: DOMString) -> ErrorResult;
|
||||
fn Name(&self) -> DOMString;
|
||||
fn SetName(&mut self, _name: DOMString) -> ErrorResult;
|
||||
fn Rev(&self) -> DOMString;
|
||||
fn SetRev(&mut self, _rev: DOMString) -> ErrorResult;
|
||||
fn Shape(&self) -> DOMString;
|
||||
fn SetShape(&mut self, _shape: DOMString) -> ErrorResult;
|
||||
}
|
||||
|
||||
impl<'a> HTMLAnchorElementMethods for JSRef<'a, HTMLAnchorElement> {
|
||||
fn Href(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetHref(&mut self, _href: DOMString) -> ErrorResult {
|
||||
fn SetHref(&mut 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(())
|
||||
}
|
||||
|
||||
pub fn Download(&self) -> DOMString {
|
||||
fn Download(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetDownload(&self, _download: DOMString) -> ErrorResult {
|
||||
fn SetDownload(&self, _download: DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Ping(&self) -> DOMString {
|
||||
fn Ping(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetPing(&self, _ping: DOMString) -> ErrorResult {
|
||||
fn SetPing(&self, _ping: DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Rel(&self) -> DOMString {
|
||||
fn Rel(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetRel(&self, _rel: DOMString) -> ErrorResult {
|
||||
fn SetRel(&self, _rel: DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Hreflang(&self) -> DOMString {
|
||||
fn Hreflang(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetHreflang(&self, _href_lang: DOMString) -> ErrorResult {
|
||||
fn SetHreflang(&self, _href_lang: DOMString) -> 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(())
|
||||
}
|
||||
|
||||
pub fn Text(&self) -> DOMString {
|
||||
fn Text(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetText(&mut self, _text: DOMString) -> ErrorResult {
|
||||
fn SetText(&mut self, _text: DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Coords(&self) -> DOMString {
|
||||
fn Coords(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetCoords(&mut self, _coords: DOMString) -> ErrorResult {
|
||||
fn SetCoords(&mut self, _coords: DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Charset(&self) -> DOMString {
|
||||
fn Charset(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetCharset(&mut self, _charset: DOMString) -> ErrorResult {
|
||||
fn SetCharset(&mut self, _charset: DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Name(&self) -> DOMString {
|
||||
fn Name(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetName(&mut self, _name: DOMString) -> ErrorResult {
|
||||
fn SetName(&mut self, _name: DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Rev(&self) -> DOMString {
|
||||
fn Rev(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetRev(&mut self, _rev: DOMString) -> ErrorResult {
|
||||
fn SetRev(&mut self, _rev: DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Shape(&self) -> DOMString {
|
||||
fn Shape(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetShape(&mut self, _shape: DOMString) -> ErrorResult {
|
||||
fn SetShape(&mut self, _shape: DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue