extensions

package
v0.158.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2026 License: MIT Imports: 2 Imported by: 2

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

View Source
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

ClearStorageItems clears extension storage in the given storageArea.

See: https://chromedevtools.github.io/devtools-protocol/tot/Extensions#method-clearStorageItems

GetExtensions gets a list of all unpacked extensions.

See: https://chromedevtools.github.io/devtools-protocol/tot/Extensions#method-getExtensions

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

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

RemoveStorageItems removes keys from extension storage in the given storageArea.

See: https://chromedevtools.github.io/devtools-protocol/tot/Extensions#method-removeStorageItems

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

TriggerAction runs an extension default action.

See: https://chromedevtools.github.io/devtools-protocol/tot/Extensions#method-triggerAction

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

type GetStorageItemsResult struct {
	Data jsonv2.Value `json:"data,omitempty,omitzero"`
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL