1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:58:11 +00:00

LibWeb: Implement NavigateEvent AOs that are called during event firing

The potentially scroll/focus and finish 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:24:28 -06:00 committed by Alexander Kalenik
parent e05a6f6aa2
commit 2a24dda44d
3 changed files with 95 additions and 1 deletions

View file

@ -64,6 +64,8 @@ public:
JS::NonnullGCPtr<DOM::AbortController> abort_controller() const { return *m_abort_controller; }
void finish(bool did_fulfill);
private:
NavigateEvent(JS::Realm&, FlyString const& event_name, NavigateEventInit const& event_init);
@ -72,6 +74,8 @@ private:
WebIDL::ExceptionOr<void> perform_shared_checks();
void process_scroll_behavior();
void potentially_process_scroll_behavior();
void potentially_reset_the_focus();
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#concept-navigateevent-interception-state
enum class InterceptionState {