summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/interfaces/navigation-api.idl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
commit43a97878ce14b72f0981164f87f2e35e14151312 (patch)
tree620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/interfaces/navigation-api.idl
parentInitial commit. (diff)
downloadfirefox-upstream.tar.xz
firefox-upstream.zip
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/interfaces/navigation-api.idl')
-rw-r--r--testing/web-platform/tests/interfaces/navigation-api.idl158
1 files changed, 158 insertions, 0 deletions
diff --git a/testing/web-platform/tests/interfaces/navigation-api.idl b/testing/web-platform/tests/interfaces/navigation-api.idl
new file mode 100644
index 0000000000..1117851829
--- /dev/null
+++ b/testing/web-platform/tests/interfaces/navigation-api.idl
@@ -0,0 +1,158 @@
+// 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 canIntercept;
+ 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 intercept(optional NavigationInterceptOptions options = {});
+ undefined scroll();
+};
+
+dictionary NavigateEventInit : EventInit {
+ NavigationType navigationType = "push";
+ required NavigationDestination destination;
+ boolean canIntercept = false;
+ boolean userInitiated = false;
+ boolean hashChange = false;
+ required AbortSignal signal;
+ FormData? formData = null;
+ DOMString? downloadRequest = null;
+ any info;
+};
+
+dictionary NavigationInterceptOptions {
+ NavigationInterceptHandler handler;
+ NavigationFocusReset focusReset;
+ NavigationScrollBehavior scroll;
+};
+
+enum NavigationFocusReset {
+ "after-transition",
+ "manual"
+};
+
+enum NavigationScrollBehavior {
+ "after-transition",
+ "manual"
+};
+
+callback NavigationInterceptHandler = Promise<undefined> ();
+
+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;
+};