mirror of
https://github.com/servo/servo.git
synced 2025-06-20 23:28:59 +01:00
Pass immutable self to HTMLBodyElement::SetOnunload.
This commit is contained in:
parent
d6eae6ae8b
commit
fa148e5ff4
1 changed files with 4 additions and 4 deletions
|
@ -43,7 +43,7 @@ impl HTMLBodyElement {
|
||||||
|
|
||||||
pub trait HTMLBodyElementMethods {
|
pub trait HTMLBodyElementMethods {
|
||||||
fn GetOnunload(&self) -> Option<EventHandlerNonNull>;
|
fn GetOnunload(&self) -> Option<EventHandlerNonNull>;
|
||||||
fn SetOnunload(&mut self, listener: Option<EventHandlerNonNull>);
|
fn SetOnunload(&self, listener: Option<EventHandlerNonNull>);
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> HTMLBodyElementMethods for JSRef<'a, HTMLBodyElement> {
|
impl<'a> HTMLBodyElementMethods for JSRef<'a, HTMLBodyElement> {
|
||||||
|
@ -52,9 +52,9 @@ impl<'a> HTMLBodyElementMethods for JSRef<'a, HTMLBodyElement> {
|
||||||
win.deref().GetOnunload()
|
win.deref().GetOnunload()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn SetOnunload(&mut self, listener: Option<EventHandlerNonNull>) {
|
fn SetOnunload(&self, listener: Option<EventHandlerNonNull>) {
|
||||||
let mut win = window_from_node(self).root();
|
let win = window_from_node(self).root();
|
||||||
win.SetOnunload(listener)
|
win.deref().SetOnunload(listener)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue