<aside> 🔌 The Websessions API allows you persist and manage webview data and load chrome extensions.
</aside>
ext.websessions.get(
websessionId: string,
)
Gets the websession by ID.
PARAMETERS
websessionId: string
The ID of the websession to get.
RETURNS
Promise<ExtWebsession>
The promise resolves with the websession object.
ext.websessions.query(
filter?: Partial<ExtWebsession>,
)
Query websessions based on filter.
PARAMETERS
filter?: Partial<ExtWebsession>
Filter criteria for querying websessions.
RETURNS
Promise<ExtWebsession[]>
The promise resolves with an array of websession objects that match the filter.
ext.websessions.create(
properties?: ExtWebsessionProperties,
)
Create a new websession.
PARAMETERS
properties?: ExtWebsessionProperties
Properties for the new websession.
RETURNS
Promise<ExtWebsession>
The promise resolves with the created websession object.
ext.websessions.remove(
websessionIds: string[],
)
Remove websession.
PARAMETERS
websessionIds: string[]
Array of websession IDs to remove.
RETURNS
Promise<void>
The promise resolves when the websession(s) have been removed.
ext.websessions.downloadURL(
websessionId: string,
url: string,
)
Download URL in specified websession.
PARAMETERS
websessionId: string
The ID of the websession.
url: string
The URL to download.
RETURNS
Promise<void>
The promise resolves when the URL has started downloading in the specified websession.
ext.websessions.downloadPause(
websessionId: string,
downloadTag: string,
)
Pause a download in specified websession.
PARAMETERS
websessionId: string
The ID of the websession.
downloadTag: string
The tag of the download to pause.
RETURNS
Promise<void>
The promise resolves when the download has been paused.
ext.websessions.downloadIsPaused(
websessionId: string,
downloadTag: string,
)
Check if a download is paused in specified websession.
PARAMETERS
websessionId: string
The ID of the websession.
downloadTag: string
The tag of the download to check.
RETURNS
Promise<boolean>
The promise resolves with a boolean indicating if the download is paused.
ext.websessions.downloadResume(
websessionId: string,
downloadTag: string,
)
Resume a download in specified websession.
PARAMETERS
websessionId: string
downloadTag: string
RETURNS
Promise<void>
ext.websessions.downloadCanResume(
websessionId: string,
downloadTag: string,
)
Check if a download can be resumed.