1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 07:38:10 +00:00

LibWeb: Implement navigation.navigate()

The implementation is incomplete, because our Navigable::navigate
implementation is missing the navigationAPIState parameter. We also
don't have Navigables hooked up completely enough to guarantee that a
fully active document that is not being unloaded always has a Navigable.
This commit is contained in:
Andrew Kaster 2023-08-24 16:20:38 -06:00 committed by Andreas Kling
parent 34ea470d4f
commit f8e5df7a99
3 changed files with 268 additions and 7 deletions

View file

@ -4,7 +4,7 @@
#import <HTML/NavigationTransition.idl>
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#navigation-interface
[Exposed=Window]
[Exposed=Window, UseNewAKString]
interface Navigation : EventTarget {
sequence<NavigationHistoryEntry> entries();
readonly attribute NavigationHistoryEntry? currentEntry;
@ -15,7 +15,7 @@ interface Navigation : EventTarget {
readonly attribute boolean canGoForward;
// TODO: Actually implement navigation algorithms
// NavigationResult navigate(USVString url, optional NavigationNavigateOptions options = {});
NavigationResult navigate(USVString url, optional NavigationNavigateOptions options = {});
// NavigationResult reload(optional NavigationReloadOptions options = {});
// NavigationResult traverseTo(DOMString key, optional NavigationOptions options = {});