1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:57:35 +00:00

LibWeb: Implement Navigation AOs that are called during event firing

These Navigation API Method Tracker AOs are called by the inner navigate
event firing algorithm. Implement them beforehand to make the diff look
pretty :^).
This commit is contained in:
Andrew Kaster 2023-09-22 18:30:40 -06:00 committed by Alexander Kalenik
parent 2a24dda44d
commit 0650edc7d7
2 changed files with 99 additions and 0 deletions

View file

@ -128,6 +128,10 @@ private:
JS::NonnullGCPtr<NavigationAPIMethodTracker> maybe_set_the_upcoming_non_traverse_api_method_tracker(JS::Value info, Optional<SerializationRecord>);
JS::NonnullGCPtr<NavigationAPIMethodTracker> add_an_upcoming_traverse_api_method_tracker(String destination_key, JS::Value info);
WebIDL::ExceptionOr<NavigationResult> perform_a_navigation_api_traversal(String key, NavigationOptions const&);
void promote_an_upcoming_api_method_tracker_to_ongoing(Optional<String> destination_key);
void resolve_the_finished_promise(JS::NonnullGCPtr<NavigationAPIMethodTracker>);
void reject_the_finished_promise(JS::NonnullGCPtr<NavigationAPIMethodTracker>, JS::Value exception);
void clean_up(JS::NonnullGCPtr<NavigationAPIMethodTracker>);
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#navigation-entry-list
// Each Navigation has an associated entry list, a list of NavigationHistoryEntry objects, initially empty.