1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:47:46 +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

@ -22,6 +22,10 @@ public:
WebIDL::ExceptionOr<void> push_state(JS::Value data, String const& unused, String const& url);
WebIDL::ExceptionOr<void> replace_state(JS::Value data, String const& unused, String const& url);
WebIDL::ExceptionOr<void> go(long delta);
WebIDL::ExceptionOr<void> back();
WebIDL::ExceptionOr<void> forward();
WebIDL::ExceptionOr<u64> length() const;
private:
History(JS::Realm&, DOM::Document&);