mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Make the traits for the IDL interfaces take &self
This commit is contained in:
parent
856fda7f2e
commit
709d347872
99 changed files with 1192 additions and 1192 deletions
|
@ -79,21 +79,21 @@ impl VirtualMethods for HTMLAnchorElement {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> HTMLAnchorElementMethods for &'a HTMLAnchorElement {
|
||||
impl HTMLAnchorElementMethods for HTMLAnchorElement {
|
||||
// https://html.spec.whatwg.org/multipage/#dom-a-text
|
||||
fn Text(self) -> DOMString {
|
||||
fn Text(&self) -> DOMString {
|
||||
let node = NodeCast::from_ref(self);
|
||||
node.GetTextContent().unwrap()
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-a-text
|
||||
fn SetText(self, value: DOMString) {
|
||||
fn SetText(&self, value: DOMString) {
|
||||
let node = NodeCast::from_ref(self);
|
||||
node.SetTextContent(Some(value))
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-a-rellist
|
||||
fn RelList(self) -> Root<DOMTokenList> {
|
||||
fn RelList(&self) -> Root<DOMTokenList> {
|
||||
self.rel_list.or_init(|| {
|
||||
DOMTokenList::new(ElementCast::from_ref(self), &atom!("rel"))
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue