Adding window.onstorage EventHandler

This commit is contained in:
KALPESH KRISHNA 2015-10-16 02:37:27 +05:30
parent 417cf5738e
commit a183eacb63
3 changed files with 16 additions and 0 deletions

View file

@ -83,6 +83,18 @@ impl HTMLBodyElementMethods for HTMLBodyElement {
let win = window_from_node(self);
win.r().SetOnunload(listener)
}
// https://html.spec.whatwg.org/multipage/#the-body-element
fn GetOnstorage(&self) -> Option<Rc<EventHandlerNonNull>> {
let win = window_from_node(self);
win.r().GetOnstorage()
}
// https://html.spec.whatwg.org/multipage/#the-body-element
fn SetOnstorage(&self, listener: Option<Rc<EventHandlerNonNull>>) {
let win = window_from_node(self);
win.r().SetOnstorage(listener)
}
}