extensions
StorageArea
Bases: Enum
Storage areas.
Source code in zendriver/cdp/extensions.py
LOCAL = 'local'
class-attribute
instance-attribute
MANAGED = 'managed'
class-attribute
instance-attribute
SESSION = 'session'
class-attribute
instance-attribute
SYNC = 'sync'
class-attribute
instance-attribute
from_json(json)
classmethod
clear_storage_items(id_, storage_area)
Clears extension storage in the given storageArea
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id_
|
str
|
ID of extension. |
required |
storage_area
|
StorageArea
|
StorageArea to remove data from. |
required |
Source code in zendriver/cdp/extensions.py
get_storage_items(id_, storage_area, keys=None)
Gets data from extension storage in the given storageArea
. If keys
is
specified, these are used to filter the result.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id_
|
str
|
ID of extension. |
required |
storage_area
|
StorageArea
|
StorageArea to retrieve data from. |
required |
keys
|
Optional[List[str]]
|
(Optional) Keys to retrieve. |
None
|
Returns:
Type | Description |
---|---|
Generator[T_JSON_DICT, T_JSON_DICT, dict]
|
|
Source code in zendriver/cdp/extensions.py
load_unpacked(path)
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.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
str
|
Absolute file path. |
required |
Returns:
Type | Description |
---|---|
Generator[T_JSON_DICT, T_JSON_DICT, str]
|
Extension id. |
Source code in zendriver/cdp/extensions.py
remove_storage_items(id_, storage_area, keys)
Removes keys
from extension storage in the given storageArea
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id_
|
str
|
ID of extension. |
required |
storage_area
|
StorageArea
|
StorageArea to remove data from. |
required |
keys
|
List[str]
|
Keys to remove. |
required |
Source code in zendriver/cdp/extensions.py
set_storage_items(id_, storage_area, values)
Sets values
in extension storage in the given storageArea
. The provided values
will be merged with existing values in the storage area.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id_
|
str
|
ID of extension. |
required |
storage_area
|
StorageArea
|
StorageArea to set data in. |
required |
values
|
dict
|
Values to set. |
required |