diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-07-22 15:34:14 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-22 15:34:14 -0500 |
commit | 0e887ca8d3327b63db43cc329dd83bf4c02e2a1c (patch) | |
tree | 5df69e86a3f85d31a005f7beddc4b65590bf7714 /components/script/dom/webidls | |
parent | cdf225c26e04ac8a2f3294ab32999ec482db8cd4 (diff) | |
parent | 8d7a0c2cda0c8eb8a77046cbfc7fbbf0a626f398 (diff) | |
download | servo-0e887ca8d3327b63db43cc329dd83bf4c02e2a1c.tar.gz servo-0e887ca8d3327b63db43cc329dd83bf4c02e2a1c.zip |
Auto merge of #12552 - ConnorGBrewster:history_interface, r=asajeffrey
History interface Go, Back, and Forward
<!-- Please describe your changes on the following line: -->
r? @asajeffrey
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #5670 (github issue number if applicable).
<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
implement go, forward, back
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12552)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/webidls')
-rw-r--r-- | components/script/dom/webidls/History.webidl | 18 | ||||
-rw-r--r-- | components/script/dom/webidls/Window.webidl | 2 |
2 files changed, 19 insertions, 1 deletions
diff --git a/components/script/dom/webidls/History.webidl b/components/script/dom/webidls/History.webidl new file mode 100644 index 00000000000..04742d52601 --- /dev/null +++ b/components/script/dom/webidls/History.webidl @@ -0,0 +1,18 @@ +/* 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/. */ + +// enum ScrollRestoration { "auto", "manual" }; + +// https://html.spec.whatwg.org/multipage/#the-history-interface +[Exposed=(Window,Worker)] +interface History { + // readonly attribute unsigned long length; + // attribute ScrollRestoration scrollRestoration; + // readonly attribute any state; + void go(optional long delta = 0); + void back(); + void forward(); + // void pushState(any data, DOMString title, optional USVString? url = null); + // void replaceState(any data, DOMString title, optional USVString? url = null); +}; diff --git a/components/script/dom/webidls/Window.webidl b/components/script/dom/webidls/Window.webidl index bda73c9479a..651c7081305 100644 --- a/components/script/dom/webidls/Window.webidl +++ b/components/script/dom/webidls/Window.webidl @@ -11,7 +11,7 @@ [Unforgeable] readonly attribute Document document; // attribute DOMString name; [/*PutForwards=href, */Unforgeable] readonly attribute Location location; - //readonly attribute History history; + readonly attribute History history; //[Replaceable] readonly attribute BarProp locationbar; //[Replaceable] readonly attribute BarProp menubar; //[Replaceable] readonly attribute BarProp personalbar; |