Documentation
¶
Overview ¶
Package extensions provides the Chrome DevTools Protocol commands, types, and events for the Extensions domain.
Defines commands and events for browser extensions.
Generated by the pdlgen command.
Index ¶
- Constants
- Variables
- type ClearStorageItemsParams
- type ExtensionInfo
- type GetExtensionsResult
- type GetStorageItemsParams
- type GetStorageItemsResult
- type LoadUnpackedParams
- type LoadUnpackedResult
- type RemoveStorageItemsParams
- type SetStorageItemsParams
- type StorageArea
- type TriggerActionParams
- type UninstallParams
Constants ¶
const ( CommandTriggerAction = "Extensions.triggerAction" CommandLoadUnpacked = "Extensions.loadUnpacked" CommandGetExtensions = "Extensions.getExtensions" CommandUninstall = "Extensions.uninstall" CommandGetStorageItems = "Extensions.getStorageItems" CommandRemoveStorageItems = "Extensions.removeStorageItems" CommandClearStorageItems = "Extensions.clearStorageItems" CommandSetStorageItems = "Extensions.setStorageItems" )
Command names.
Variables ¶
var ClearStorageItems = cdp.Command[ClearStorageItemsParams, cdp.Empty]{Method: CommandClearStorageItems}
ClearStorageItems clears extension storage in the given storageArea.
See: https://chromedevtools.github.io/devtools-protocol/tot/Extensions#method-clearStorageItems
var GetExtensions = cdp.Command[cdp.Empty, GetExtensionsResult]{Method: CommandGetExtensions}
GetExtensions gets a list of all unpacked extensions.
See: https://chromedevtools.github.io/devtools-protocol/tot/Extensions#method-getExtensions
var GetStorageItems = cdp.Command[GetStorageItemsParams, GetStorageItemsResult]{Method: CommandGetStorageItems}
GetStorageItems gets data from extension storage in the given storageArea. If keys is specified, these are used to filter the result.
See: https://chromedevtools.github.io/devtools-protocol/tot/Extensions#method-getStorageItems
var LoadUnpacked = cdp.Command[LoadUnpackedParams, LoadUnpackedResult]{Method: CommandLoadUnpacked}
LoadUnpacked installs an unpacked extension from the filesystem similar to --load-extension CLI flags. Returns extension ID once the extension has been installed.
See: https://chromedevtools.github.io/devtools-protocol/tot/Extensions#method-loadUnpacked
var RemoveStorageItems = cdp.Command[RemoveStorageItemsParams, cdp.Empty]{Method: CommandRemoveStorageItems}
RemoveStorageItems removes keys from extension storage in the given storageArea.
See: https://chromedevtools.github.io/devtools-protocol/tot/Extensions#method-removeStorageItems
var SetStorageItems = cdp.Command[SetStorageItemsParams, cdp.Empty]{Method: CommandSetStorageItems}
SetStorageItems sets values in extension storage in the given storageArea. The provided values will be merged with existing values in the storage area.
See: https://chromedevtools.github.io/devtools-protocol/tot/Extensions#method-setStorageItems
var TriggerAction = cdp.Command[TriggerActionParams, cdp.Empty]{Method: CommandTriggerAction}
TriggerAction runs an extension default action.
See: https://chromedevtools.github.io/devtools-protocol/tot/Extensions#method-triggerAction
var Uninstall = cdp.Command[UninstallParams, cdp.Empty]{Method: CommandUninstall}
Uninstall uninstalls an unpacked extension (others not supported) from the profile.
See: https://chromedevtools.github.io/devtools-protocol/tot/Extensions#method-uninstall
Functions ¶
This section is empty.
Types ¶
type ClearStorageItemsParams ¶
type ClearStorageItemsParams struct {
ID string `json:"id"` // ID of extension.
StorageArea StorageArea `json:"storageArea"` // StorageArea to remove data from.
}
ClearStorageItemsParams are the parameters of the command Extensions.clearStorageItems.
type ExtensionInfo ¶
type ExtensionInfo struct {
ID string `json:"id"` // Extension id.
Name string `json:"name"` // Extension name.
Version string `json:"version"` // Extension version.
Path string `json:"path"` // The path from which the extension was loaded.
Enabled bool `json:"enabled"` // Extension enabled status.
}
ExtensionInfo detailed information about an extension.
See: https://chromedevtools.github.io/devtools-protocol/tot/Extensions#type-ExtensionInfo
type GetExtensionsResult ¶ added in v0.157.3
type GetExtensionsResult struct {
Extensions []*ExtensionInfo `json:"extensions,omitempty,omitzero"`
}
GetExtensionsResult is the result of the command Extensions.getExtensions.
type GetStorageItemsParams ¶
type GetStorageItemsParams struct {
ID string `json:"id"` // ID of extension.
StorageArea StorageArea `json:"storageArea"` // StorageArea to retrieve data from.
Keys []string `json:"keys,omitempty,omitzero"` // Keys to retrieve.
}
GetStorageItemsParams are the parameters of the command Extensions.getStorageItems.
type GetStorageItemsResult ¶ added in v0.157.3
GetStorageItemsResult is the result of the command Extensions.getStorageItems.
type LoadUnpackedParams ¶
type LoadUnpackedParams struct {
Path string `json:"path"` // Absolute file path.
EnableInIncognito *bool `json:"enableInIncognito,omitempty,omitzero"` // Enable the extension in incognito
}
LoadUnpackedParams are the parameters of the command Extensions.loadUnpacked.
type LoadUnpackedResult ¶ added in v0.157.3
type LoadUnpackedResult struct {
ID string `json:"id,omitempty,omitzero"` // Extension id.
}
LoadUnpackedResult is the result of the command Extensions.loadUnpacked.
type RemoveStorageItemsParams ¶
type RemoveStorageItemsParams struct {
ID string `json:"id"` // ID of extension.
StorageArea StorageArea `json:"storageArea"` // StorageArea to remove data from.
Keys []string `json:"keys"` // Keys to remove.
}
RemoveStorageItemsParams are the parameters of the command Extensions.removeStorageItems.
type SetStorageItemsParams ¶
type SetStorageItemsParams struct {
ID string `json:"id"` // ID of extension.
StorageArea StorageArea `json:"storageArea"` // StorageArea to set data in.
Values jsonv2.Value `json:"values"`
}
SetStorageItemsParams are the parameters of the command Extensions.setStorageItems.
type StorageArea ¶
type StorageArea string
StorageArea storage areas.
See: https://chromedevtools.github.io/devtools-protocol/tot/Extensions#type-StorageArea
const ( StorageAreaSession StorageArea = "session" StorageAreaLocal StorageArea = "local" StorageAreaSync StorageArea = "sync" StorageAreaManaged StorageArea = "managed" )
StorageArea values.
func (StorageArea) String ¶
func (t StorageArea) String() string
String returns the StorageArea as string value.
type TriggerActionParams ¶
type TriggerActionParams struct {
ID string `json:"id"` // Extension id.
TargetID string `json:"targetId"` // A tab target ID to trigger the default extension action on.
}
TriggerActionParams are the parameters of the command Extensions.triggerAction.
type UninstallParams ¶
type UninstallParams struct {
ID string `json:"id"` // Extension id.
}
UninstallParams are the parameters of the command Extensions.uninstall.