Extensions

class Extensions(cdp: CDP) : Domain

Defines commands and events for browser extensions.

Constructors

Link copied to clipboard
constructor(cdp: CDP)

Types

Link copied to clipboard
@Serializable
data class ClearStorageItemsParameter(val id: String, val storageArea: Extensions.StorageArea)
Link copied to clipboard
@Serializable
data class GetStorageItemsParameter(val id: String, val storageArea: Extensions.StorageArea, val keys: List<String>? = null)
Link copied to clipboard
@Serializable
data class GetStorageItemsReturn(val data: Map<String, JsonElement>)
Link copied to clipboard
@Serializable
data class LoadUnpackedParameter(val path: String)
Link copied to clipboard
@Serializable
data class LoadUnpackedReturn(val id: String)
Link copied to clipboard
@Serializable
data class RemoveStorageItemsParameter(val id: String, val storageArea: Extensions.StorageArea, val keys: List<String>)
Link copied to clipboard
@Serializable
data class SetStorageItemsParameter(val id: String, val storageArea: Extensions.StorageArea, val values: Map<String, JsonElement>)
Link copied to clipboard

Storage areas.

Link copied to clipboard
@Serializable
data class UninstallParameter(val id: String)

Functions

Link copied to clipboard
suspend fun clearStorageItems(args: Extensions.ClearStorageItemsParameter, mode: CommandMode = CommandMode.DEFAULT)
suspend fun clearStorageItems(id: String, storageArea: Extensions.StorageArea)

Clears extension storage in the given storageArea.

Link copied to clipboard

Gets data from extension storage in the given storageArea. If keys is specified, these are used to filter the result.

Link copied to clipboard

Installs an unpacked extension from the filesystem similar to --load-extension CLI flags. Returns extension ID once the extension has been installed. Available if the client is connected using the --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging flag is set.

Link copied to clipboard
suspend fun removeStorageItems(args: Extensions.RemoveStorageItemsParameter, mode: CommandMode = CommandMode.DEFAULT)
suspend fun removeStorageItems(id: String, storageArea: Extensions.StorageArea, keys: List<String>)

Removes keys from extension storage in the given storageArea.

Link copied to clipboard
suspend fun setStorageItems(args: Extensions.SetStorageItemsParameter, mode: CommandMode = CommandMode.DEFAULT)
suspend fun setStorageItems(id: String, storageArea: Extensions.StorageArea, values: Map<String, JsonElement>)

Sets values in extension storage in the given storageArea. The provided values will be merged with existing values in the storage area.

Link copied to clipboard
suspend fun uninstall(id: String)
suspend fun uninstall(args: Extensions.UninstallParameter, mode: CommandMode = CommandMode.DEFAULT)

Uninstalls an unpacked extension (others not supported) from the profile. Available if the client is connected using the --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging.