aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/webidls
diff options
context:
space:
mode:
authorConnor Brewster <brewsterc@my.caspercollege.edu>2016-05-03 16:10:13 -0600
committerConnor Brewster <brewsterc@my.caspercollege.edu>2016-05-11 22:11:46 -0600
commit11dd0d7c46e9b61a0d7174202ca16200c98eda1a (patch)
treee186e0ceed9ab1d4ca28bebf8cd4c2b187e8a21c /components/script/dom/webidls
parent641b374f0b752671207d21941c3e5ff4e681d706 (diff)
downloadservo-11dd0d7c46e9b61a0d7174202ca16200c98eda1a.tar.gz
servo-11dd0d7c46e9b61a0d7174202ca16200c98eda1a.zip
add popstateevent, hashchangeevent, pagetransitionevent
Diffstat (limited to 'components/script/dom/webidls')
-rw-r--r--components/script/dom/webidls/HashChangeEvent.webidl15
-rw-r--r--components/script/dom/webidls/PageTransitionEvent.webidl13
-rw-r--r--components/script/dom/webidls/PopStateEvent.webidl13
3 files changed, 41 insertions, 0 deletions
diff --git a/components/script/dom/webidls/HashChangeEvent.webidl b/components/script/dom/webidls/HashChangeEvent.webidl
new file mode 100644
index 00000000000..924c300cdfe
--- /dev/null
+++ b/components/script/dom/webidls/HashChangeEvent.webidl
@@ -0,0 +1,15 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+// https://html.spec.whatwg.org/multipage/#hashchangeevent
+[Constructor(DOMString type, optional HashChangeEventInit eventInitDict)/*, Exposed=(Window,Worker)*/]
+interface HashChangeEvent : Event {
+ readonly attribute USVString oldURL;
+ readonly attribute USVString newURL;
+};
+
+dictionary HashChangeEventInit : EventInit {
+ USVString oldURL = "";
+ USVString newURL = "";
+};
diff --git a/components/script/dom/webidls/PageTransitionEvent.webidl b/components/script/dom/webidls/PageTransitionEvent.webidl
new file mode 100644
index 00000000000..f96eda200f4
--- /dev/null
+++ b/components/script/dom/webidls/PageTransitionEvent.webidl
@@ -0,0 +1,13 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+// https://html.spec.whatwg.org/multipage/#the-pagetransitionevent-interface
+[Constructor(DOMString type, optional PageTransitionEventInit eventInitDict)/*, Exposed=(Window,Worker)*/]
+interface PageTransitionEvent : Event {
+ readonly attribute boolean persisted;
+};
+
+dictionary PageTransitionEventInit : EventInit {
+ boolean persisted = false;
+};
diff --git a/components/script/dom/webidls/PopStateEvent.webidl b/components/script/dom/webidls/PopStateEvent.webidl
new file mode 100644
index 00000000000..99372b392a6
--- /dev/null
+++ b/components/script/dom/webidls/PopStateEvent.webidl
@@ -0,0 +1,13 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+// https://html.spec.whatwg.org/multipage/#the-popstateevent-interface
+[Constructor(DOMString type, optional PopStateEventInit eventInitDict)/*, Exposed=(Window,Worker)*/]
+interface PopStateEvent : Event {
+ readonly attribute any state;
+};
+
+dictionary PopStateEventInit : EventInit {
+ any state = null;
+};