LibWeb/HTML: Split out "abort a NavigateEvent" method

I missed where this change happened in the spec. The second half of
abort_the_ongoing_navigation() becomes a separate method, which is
slightly rearranged. I've placed this in Navigation instead of
NavigateEvent because of how many steps poke at the Navigation's
internals.

The text here includes the amendments I made in
https://github.com/whatwg/html/pull/11967 to correct a variable name.

A bonus is that we now actually populate the ErrorEvent instead of
leaving it blank.
This commit is contained in:
Sam Atkins 2025-11-27 14:48:48 +00:00 committed by Andreas Kling
parent 218e646e72
commit c1e4024eca
Notes: github-actions[bot] 2025-11-30 10:48:10 +00:00
2 changed files with 39 additions and 23 deletions

View file

@ -110,6 +110,7 @@ public:
bool has_entries_and_events_disabled() const;
i64 get_the_navigation_api_entry_index(SessionHistoryEntry const&) const;
void abort_the_ongoing_navigation(GC::Ptr<WebIDL::DOMException> error = {});
void abort_a_navigate_event(GC::Ref<NavigateEvent>, GC::Ref<WebIDL::DOMException> reason);
bool fire_a_traverse_navigate_event(GC::Ref<SessionHistoryEntry> destination_she, UserNavigationInvolvement = UserNavigationInvolvement::None);
bool fire_a_push_replace_reload_navigate_event(
Bindings::NavigationType,