You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* The maximum number of entries to be fetched in the requested list. Omit this parameter to fetch the maximum number of entries (sessions.MAX_SESSION_RESULTS).
9735
-
*/
9732
+
/** The maximum number of entries to be fetched in the requested list. Omit this parameter to fetch the maximum number of entries ({@link sessions.MAX_SESSION_RESULTS}). */
9736
9733
maxResults?: number | undefined;
9737
9734
}
9738
9735
9739
9736
export interface Session {
9740
9737
/** The time when the window or tab was closed or modified, represented in seconds since the epoch. */
9741
9738
lastModified: number;
9742
-
/**
9743
-
* Optional.
9744
-
* The tabs.Tab, if this entry describes a tab. Either this or sessions.Session.window will be set.
9745
-
*/
9739
+
/** The {@link tabs.Tab}, if this entry describes a tab. Either this or {@link sessions.Session.window} will be set. */
9746
9740
tab?: tabs.Tab | undefined;
9747
-
/**
9748
-
* Optional.
9749
-
* The windows.Window, if this entry describes a window. Either this or sessions.Session.tab will be set.
9750
-
*/
9741
+
/** The {@link windows.Window}, if this entry describes a window. Either this or {@link sessions.Session.tab} will be set. */
/** The maximum number of sessions.Session that will be included in a requested list. */
9764
-
export var MAX_SESSION_RESULTS: number;
9752
+
/** The maximum number of {@link sessions.Session} that will be included in a requested list. */
9753
+
export const MAX_SESSION_RESULTS: 25;
9765
9754
9766
9755
/**
9767
9756
* Gets the list of recently closed tabs and/or windows.
9768
-
* @return The `getRecentlyClosed` method provides its result via callback or returned as a `Promise` (MV3 only).
9757
+
*
9758
+
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
9769
9759
*/
9770
9760
export function getRecentlyClosed(filter?: Filter): Promise<Session[]>;
9771
-
/**
9772
-
* Gets the list of recently closed tabs and/or windows.
9773
-
* @param callback
9774
-
* Parameter sessions: The list of closed entries in reverse order that they were closed (the most recently closed tab or window will be at index 0). The entries may contain either tabs or windows.
9775
-
*/
9776
-
export function getRecentlyClosed(filter: Filter, callback: (sessions: Session[]) => void): void;
9777
-
/**
9778
-
* Gets the list of recently closed tabs and/or windows.
9779
-
* @param callback
9780
-
* Parameter sessions: The list of closed entries in reverse order that they were closed (the most recently closed tab or window will be at index 0). The entries may contain either tabs or windows.
9781
-
*/
9782
9761
export function getRecentlyClosed(callback: (sessions: Session[]) => void): void;
* @return The `getDevices` method provides its result via callback or returned as a `Promise` (MV3 only).
9766
+
*
9767
+
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
9786
9768
*/
9787
9769
export function getDevices(filter?: Filter): Promise<Device[]>;
9788
-
/**
9789
-
* Retrieves all devices with synced sessions.
9790
-
* @param callback
9791
-
* Parameter devices: The list of sessions.Device objects for each synced session, sorted in order from device with most recently modified session to device with least recently modified session. tabs.Tab objects are sorted by recency in the windows.Window of the sessions.Session objects.
9792
-
*/
9793
-
export function getDevices(filter: Filter, callback: (devices: Device[]) => void): void;
9794
-
/**
9795
-
* Retrieves all devices with synced sessions.
9796
-
* @param callback
9797
-
* Parameter devices: The list of sessions.Device objects for each synced session, sorted in order from device with most recently modified session to device with least recently modified session. tabs.Tab objects are sorted by recency in the windows.Window of the sessions.Session objects.
9798
-
*/
9799
9770
export function getDevices(callback: (devices: Device[]) => void): void;
* The windows.Window.sessionId, or tabs.Tab.sessionId to restore. If this parameter is not specified, the most recently closed session is restored.
9804
-
* @return The `restore` method provides its result via callback or returned as a `Promise` (MV3 only).
9774
+
* Reopens a {@link windows.Window} or {@link tabs.Tab}, with an optional callback to run when the entry has been restored.
9775
+
*
9776
+
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
9777
+
* @param sessionId The {@link windows.Window.sessionId}, or {@link tabs.Tab.sessionId} to restore. If this parameter is not specified, the most recently closed session is restored.
9805
9778
*/
9806
9779
export function restore(sessionId?: string): Promise<Session>;
9807
-
/**
9808
-
* Reopens a windows.Window or tabs.Tab, with an optional callback to run when the entry has been restored.
9809
-
* @param sessionId Optional.
9810
-
* The windows.Window.sessionId, or tabs.Tab.sessionId to restore. If this parameter is not specified, the most recently closed session is restored.
9811
-
* @param callback Optional.
9812
-
* Parameter restoredSession: A sessions.Session containing the restored windows.Window or tabs.Tab object.
9813
-
*/
9814
-
export function restore(sessionId: string, callback: (restoredSession: Session) => void): void;
9815
-
/**
9816
-
* Reopens a windows.Window or tabs.Tab, with an optional callback to run when the entry has been restored.
9817
-
* @param callback Optional.
9818
-
* Parameter restoredSession: A sessions.Session containing the restored windows.Window or tabs.Tab object.
9819
-
*/
9820
9780
export function restore(callback: (restoredSession: Session) => void): void;
0 commit comments