blob: b87bb582e67e9fbd521a36db433d114944164aa2 [file] [log] [blame]
// GENERATED CONTENT - DO NOT EDIT
// Content was automatically extracted by Reffy into webref
// (https://github.com/w3c/webref)
// Source: App History API (https://wicg.github.io/app-history/)
partial interface Window {
readonly attribute AppHistory appHistory;
};
[Exposed=Window]
interface AppHistory : EventTarget {
sequence<AppHistoryEntry> entries();
readonly attribute AppHistoryEntry? current;
undefined updateCurrent(AppHistoryUpdateCurrentOptions options);
readonly attribute AppHistoryTransition? transition;
readonly attribute boolean canGoBack;
readonly attribute boolean canGoForward;
AppHistoryResult navigate(USVString url, optional AppHistoryNavigateOptions options = {});
AppHistoryResult reload(optional AppHistoryReloadOptions options = {});
AppHistoryResult goTo(DOMString key, optional AppHistoryNavigationOptions options = {});
AppHistoryResult back(optional AppHistoryNavigationOptions options = {});
AppHistoryResult forward(optional AppHistoryNavigationOptions options = {});
attribute EventHandler onnavigate;
attribute EventHandler onnavigatesuccess;
attribute EventHandler onnavigateerror;
attribute EventHandler oncurrentchange;
};
dictionary AppHistoryUpdateCurrentOptions {
required any state;
};
dictionary AppHistoryNavigationOptions {
any info;
};
dictionary AppHistoryNavigateOptions : AppHistoryNavigationOptions {
any state;
boolean replace = false;
};
dictionary AppHistoryReloadOptions : AppHistoryNavigationOptions {
any state;
};
dictionary AppHistoryResult {
Promise<AppHistoryEntry> committed;
Promise<AppHistoryEntry> finished;
};
[Exposed=Window]
interface AppHistoryCurrentChangeEvent : Event {
constructor(DOMString type, AppHistoryCurrentChangeEventInit eventInit);
readonly attribute AppHistoryNavigationType? navigationType;
readonly attribute AppHistoryEntry from;
};
dictionary AppHistoryCurrentChangeEventInit : EventInit {
AppHistoryNavigationType? navigationType = null;
required AppHistoryEntry destination;
};
[Exposed=Window]
interface AppHistoryTransition {
readonly attribute AppHistoryNavigationType navigationType;
readonly attribute AppHistoryEntry from;
readonly attribute Promise<undefined> finished;
AppHistoryResult rollback(optional AppHistoryNavigationOptions options = {});
};
[Exposed=Window]
interface AppHistoryNavigateEvent : Event {
constructor(DOMString type, AppHistoryNavigateEventInit eventInit);
readonly attribute AppHistoryNavigationType navigationType;
readonly attribute AppHistoryDestination destination;
readonly attribute boolean canTransition;
readonly attribute boolean userInitiated;
readonly attribute boolean hashChange;
readonly attribute AbortSignal signal;
readonly attribute FormData? formData;
readonly attribute any info;
undefined transitionWhile(Promise<undefined> newNavigationAction);
};
dictionary AppHistoryNavigateEventInit : EventInit {
AppHistoryNavigationType navigationType = "push";
required AppHistoryDestination destination;
boolean canTransition = false;
boolean userInitiated = false;
boolean hashChange = false;
required AbortSignal signal;
FormData? formData = null;
any info;
};
enum AppHistoryNavigationType {
"reload",
"push",
"replace",
"traverse"
};
[Exposed=Window]
interface AppHistoryDestination {
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 AppHistoryEntry : 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 onnavigateto;
attribute EventHandler onnavigatefrom;
attribute EventHandler onfinish;
attribute EventHandler ondispose;
};