| // GENERATED CONTENT - DO NOT EDIT |
| // Content was automatically extracted by Reffy into webref |
| // (https://github.com/w3c/webref) |
| // Source: Navigation API (https://wicg.github.io/navigation-api/) |
| |
| partial interface Window { |
| [Replaceable] readonly attribute Navigation navigation; |
| }; |
| |
| [Exposed=Window] |
| interface Navigation : EventTarget { |
| sequence<NavigationHistoryEntry> entries(); |
| readonly attribute NavigationHistoryEntry? currentEntry; |
| undefined updateCurrentEntry(NavigationUpdateCurrentEntryOptions options); |
| readonly attribute NavigationTransition? transition; |
| |
| readonly attribute boolean canGoBack; |
| readonly attribute boolean canGoForward; |
| |
| NavigationResult navigate(USVString url, optional NavigationNavigateOptions options = {}); |
| NavigationResult reload(optional NavigationReloadOptions options = {}); |
| |
| NavigationResult traverseTo(DOMString key, optional NavigationOptions options = {}); |
| NavigationResult back(optional NavigationOptions options = {}); |
| NavigationResult forward(optional NavigationOptions options = {}); |
| |
| attribute EventHandler onnavigate; |
| attribute EventHandler onnavigatesuccess; |
| attribute EventHandler onnavigateerror; |
| attribute EventHandler oncurrententrychange; |
| }; |
| |
| dictionary NavigationUpdateCurrentEntryOptions { |
| required any state; |
| }; |
| |
| dictionary NavigationOptions { |
| any info; |
| }; |
| |
| dictionary NavigationNavigateOptions : NavigationOptions { |
| any state; |
| NavigationHistoryBehavior history = "auto"; |
| }; |
| |
| dictionary NavigationReloadOptions : NavigationOptions { |
| any state; |
| }; |
| |
| dictionary NavigationResult { |
| Promise<NavigationHistoryEntry> committed; |
| Promise<NavigationHistoryEntry> finished; |
| }; |
| |
| enum NavigationHistoryBehavior { |
| "auto", |
| "push", |
| "replace" |
| }; |
| |
| [Exposed=Window] |
| interface NavigationCurrentEntryChangeEvent : Event { |
| constructor(DOMString type, NavigationCurrentEntryChangeEventInit eventInit); |
| |
| readonly attribute NavigationType? navigationType; |
| readonly attribute NavigationHistoryEntry from; |
| }; |
| |
| dictionary NavigationCurrentEntryChangeEventInit : EventInit { |
| NavigationType? navigationType = null; |
| required NavigationHistoryEntry destination; |
| }; |
| |
| [Exposed=Window] |
| interface NavigationTransition { |
| readonly attribute NavigationType navigationType; |
| readonly attribute NavigationHistoryEntry from; |
| readonly attribute Promise<undefined> finished; |
| }; |
| |
| [Exposed=Window] |
| interface NavigateEvent : Event { |
| constructor(DOMString type, NavigateEventInit eventInit); |
| |
| readonly attribute NavigationType navigationType; |
| readonly attribute NavigationDestination destination; |
| readonly attribute boolean canTransition; |
| readonly attribute boolean userInitiated; |
| readonly attribute boolean hashChange; |
| readonly attribute AbortSignal signal; |
| readonly attribute FormData? formData; |
| readonly attribute DOMString? downloadRequest; |
| readonly attribute any info; |
| |
| undefined transitionWhile(Promise<undefined> newNavigationAction, |
| optional NavigationTransitionWhileOptions options = {}); |
| undefined restoreScroll(); |
| }; |
| |
| dictionary NavigateEventInit : EventInit { |
| NavigationType navigationType = "push"; |
| required NavigationDestination destination; |
| boolean canTransition = false; |
| boolean userInitiated = false; |
| boolean hashChange = false; |
| required AbortSignal signal; |
| FormData? formData = null; |
| DOMString? downloadRequest = null; |
| any info; |
| }; |
| |
| dictionary NavigationTransitionWhileOptions { |
| NavigationFocusReset focusReset; |
| NavigationScrollRestoration scrollRestoration; |
| }; |
| |
| enum NavigationFocusReset { |
| "after-transition", |
| "manual" |
| }; |
| |
| enum NavigationScrollRestoration { |
| "after-transition", |
| "manual" |
| }; |
| |
| enum NavigationType { |
| "reload", |
| "push", |
| "replace", |
| "traverse" |
| }; |
| |
| [Exposed=Window] |
| interface NavigationDestination { |
| readonly attribute USVString url; |
| readonly attribute DOMString? key; |
| readonly attribute DOMString? id; |
| readonly attribute long long index; |
| readonly attribute boolean sameDocument; |
| |
| any getState(); |
| }; |
| |
| [Exposed=Window] |
| interface NavigationHistoryEntry : EventTarget { |
| readonly attribute USVString? url; |
| readonly attribute DOMString key; |
| readonly attribute DOMString id; |
| readonly attribute long long index; |
| readonly attribute boolean sameDocument; |
| |
| any getState(); |
| |
| attribute EventHandler ondispose; |
| }; |