1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 03:47:35 +00:00

LibWeb: Add missing property and methods for history object

We provide `length` property and `go` / `back` / `forward` methods
implementation here.
This commit is contained in:
leeight 2022-10-13 22:43:04 +08:00 committed by Linus Groh
parent 2b9cf5a7b4
commit 2029c98fa7
4 changed files with 73 additions and 1 deletions

View file

@ -1,5 +1,12 @@
// https://html.spec.whatwg.org/multipage/history.html#the-history-interface
[Exposed=Window]
interface History {
readonly attribute unsigned long length;
// FIXME: attribute ScrollRestoration scrollRestoration;
// FIXME: readonly attribute any state;
undefined go(optional long delta = 0);
undefined back();
undefined forward();
undefined pushState(any data, DOMString unused, optional USVString? url = null);
undefined replaceState(any data, DOMString unused, optional USVString? url = null);
};