BrowserDomain

The Browser domain defines methods and events for browser managing.

Official doc

Functions

Link copied to clipboard

Allows a site to use privacy sandbox features that require enrollment without the site actually being enrolled. Only supported on page targets.

Link copied to clipboard
inline suspend fun cancelDownload(guid: String, optionalArgs: CancelDownloadRequest.Builder.() -> Unit = {}): CancelDownloadResponse

Cancel a download if in progress

Link copied to clipboard
suspend fun close(): CloseResponse

Close browser gracefully.

Link copied to clipboard
suspend fun crash(): CrashResponse

Crashes browser on the main thread.

Link copied to clipboard

Crashes GPU process.

Link copied to clipboard
Link copied to clipboard

Fired when download makes progress. Last call has |done| == true.

Link copied to clipboard

Fired when page is about to start a download.

Link copied to clipboard
fun events(): Flow<BrowserEvent>

Subscribes to all events related to this domain.

Link copied to clipboard

Invoke custom browser commands used by telemetry.

Link copied to clipboard

Returns the command line switches for the browser process if, and only if --enable-automation is on the commandline.

Link copied to clipboard
inline suspend fun getHistogram(name: String, optionalArgs: GetHistogramRequest.Builder.() -> Unit = {}): GetHistogramResponse

Get a Chrome histogram by name.

Link copied to clipboard

Get Chrome histograms.

Link copied to clipboard

Returns version information.

Link copied to clipboard

Get position and size of the browser window.

Link copied to clipboard

Get the browser window that contains the devtools target.

Link copied to clipboard

Grant specific permissions to the given origin and reject all others.

Link copied to clipboard

Reset all permission management for all origins.

Link copied to clipboard
inline suspend fun setDockTile(optionalArgs: SetDockTileRequest.Builder.() -> Unit = {}): SetDockTileResponse

Set dock tile details, platform-specific.

Link copied to clipboard

Set the behavior when downloading a file.

Link copied to clipboard

Set permission settings for given origin.

Link copied to clipboard
suspend fun setWindowBounds(windowId: WindowID, bounds: Bounds): SetWindowBoundsResponse

Set position and/or size of the browser window.