1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 17:27:34 +00:00

LibWeb: Add NavigationCurrentEntryChangeEvent, fired when navigating

This event will be fired by Navigation when changing the current
NavigationHistoryEntry.
This commit is contained in:
Andrew Kaster 2023-08-23 10:53:11 -06:00 committed by Andrew Kaster
parent 3c1d4eab24
commit 51c2835044
10 changed files with 107 additions and 0 deletions

View file

@ -0,0 +1,18 @@
#import <DOM/Event.idl>
#import <HTML/NavigationHistoryEntry.idl>
#import <HTML/NavigationType.idl>
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#the-navigationcurrententrychangeevent-interface
[Exposed=Window, UseNewAKString]
interface NavigationCurrentEntryChangeEvent : Event {
constructor(DOMString type, NavigationCurrentEntryChangeEventInit eventInitDict);
readonly attribute NavigationType? navigationType;
readonly attribute NavigationHistoryEntry from;
};
dictionary NavigationCurrentEntryChangeEventInit : EventInit {
// FIXME: Set default value of null when IDL generator supports it
NavigationType? navigationType;
required NavigationHistoryEntry from;
};