aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlbodyelement.rs
diff options
context:
space:
mode:
authorKALPESH KRISHNA <kalpeshk2011@gmail.com>2015-10-16 02:37:27 +0530
committerKALPESH KRISHNA <kalpeshk2011@gmail.com>2015-10-16 02:37:27 +0530
commita183eacb63d2a314854740eb6056bf884c2e97e9 (patch)
treed9bdb822f0767fd4fc8753cc95d208f7d805e52c /components/script/dom/htmlbodyelement.rs
parent417cf5738e4609f4b2e34e9e0c4f7ef68f087432 (diff)
downloadservo-a183eacb63d2a314854740eb6056bf884c2e97e9.tar.gz
servo-a183eacb63d2a314854740eb6056bf884c2e97e9.zip
Adding window.onstorage EventHandler
Diffstat (limited to 'components/script/dom/htmlbodyelement.rs')
-rw-r--r--components/script/dom/htmlbodyelement.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/components/script/dom/htmlbodyelement.rs b/components/script/dom/htmlbodyelement.rs
index 806086a6b03..438aa79ec74 100644
--- a/components/script/dom/htmlbodyelement.rs
+++ b/components/script/dom/htmlbodyelement.rs
@@ -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)
+ }
}