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
commit 2029c98fa7
Notes: sideshowbarker 2024-07-17 05:48:45 +09:00
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&);