service_worker
RegistrationID
Bases: str
Source code in zendriver/cdp/service_worker.py
__repr__()
from_json(json)
classmethod
ServiceWorkerErrorMessage
dataclass
ServiceWorker error message.
Source code in zendriver/cdp/service_worker.py
column_number: int
instance-attribute
error_message: str
instance-attribute
line_number: int
instance-attribute
registration_id: RegistrationID
instance-attribute
source_url: str
instance-attribute
version_id: str
instance-attribute
__init__(error_message, registration_id, version_id, source_url, line_number, column_number)
from_json(json)
classmethod
Source code in zendriver/cdp/service_worker.py
to_json()
Source code in zendriver/cdp/service_worker.py
ServiceWorkerRegistration
dataclass
ServiceWorker registration.
Source code in zendriver/cdp/service_worker.py
is_deleted: bool
instance-attribute
registration_id: RegistrationID
instance-attribute
scope_url: str
instance-attribute
__init__(registration_id, scope_url, is_deleted)
from_json(json)
classmethod
ServiceWorkerVersion
dataclass
ServiceWorker version.
Source code in zendriver/cdp/service_worker.py
controlled_clients: typing.Optional[typing.List[target.TargetID]] = None
class-attribute
instance-attribute
registration_id: RegistrationID
instance-attribute
router_rules: typing.Optional[str] = None
class-attribute
instance-attribute
running_status: ServiceWorkerVersionRunningStatus
instance-attribute
script_last_modified: typing.Optional[float] = None
class-attribute
instance-attribute
script_response_time: typing.Optional[float] = None
class-attribute
instance-attribute
script_url: str
instance-attribute
status: ServiceWorkerVersionStatus
instance-attribute
target_id: typing.Optional[target.TargetID] = None
class-attribute
instance-attribute
version_id: str
instance-attribute
__init__(version_id, registration_id, script_url, running_status, status, script_last_modified=None, script_response_time=None, controlled_clients=None, target_id=None, router_rules=None)
from_json(json)
classmethod
Source code in zendriver/cdp/service_worker.py
to_json()
Source code in zendriver/cdp/service_worker.py
ServiceWorkerVersionRunningStatus
Bases: Enum
Source code in zendriver/cdp/service_worker.py
RUNNING = 'running'
class-attribute
instance-attribute
STARTING = 'starting'
class-attribute
instance-attribute
STOPPED = 'stopped'
class-attribute
instance-attribute
STOPPING = 'stopping'
class-attribute
instance-attribute
from_json(json)
classmethod
ServiceWorkerVersionStatus
Bases: Enum
Source code in zendriver/cdp/service_worker.py
ACTIVATED = 'activated'
class-attribute
instance-attribute
ACTIVATING = 'activating'
class-attribute
instance-attribute
INSTALLED = 'installed'
class-attribute
instance-attribute
INSTALLING = 'installing'
class-attribute
instance-attribute
NEW = 'new'
class-attribute
instance-attribute
REDUNDANT = 'redundant'
class-attribute
instance-attribute
from_json(json)
classmethod
WorkerErrorReported
dataclass
Source code in zendriver/cdp/service_worker.py
error_message: ServiceWorkerErrorMessage
instance-attribute
__init__(error_message)
WorkerRegistrationUpdated
dataclass
Source code in zendriver/cdp/service_worker.py
registrations: typing.List[ServiceWorkerRegistration]
instance-attribute
__init__(registrations)
WorkerVersionUpdated
dataclass
Source code in zendriver/cdp/service_worker.py
versions: typing.List[ServiceWorkerVersion]
instance-attribute
__init__(versions)
deliver_push_message(origin, registration_id, data)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
origin
|
str
|
|
required |
registration_id
|
RegistrationID
|
|
required |
data
|
str
|
|
required |
Source code in zendriver/cdp/service_worker.py
disable()
dispatch_periodic_sync_event(origin, registration_id, tag)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
origin
|
str
|
|
required |
registration_id
|
RegistrationID
|
|
required |
tag
|
str
|
|
required |
Source code in zendriver/cdp/service_worker.py
dispatch_sync_event(origin, registration_id, tag, last_chance)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
origin
|
str
|
|
required |
registration_id
|
RegistrationID
|
|
required |
tag
|
str
|
|
required |
last_chance
|
bool
|
|
required |
Source code in zendriver/cdp/service_worker.py
enable()
inspect_worker(version_id)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
version_id
|
str
|
|
required |
Source code in zendriver/cdp/service_worker.py
set_force_update_on_page_load(force_update_on_page_load)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
force_update_on_page_load
|
bool
|
|
required |
Source code in zendriver/cdp/service_worker.py
skip_waiting(scope_url)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scope_url
|
str
|
|
required |
Source code in zendriver/cdp/service_worker.py
start_worker(scope_url)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scope_url
|
str
|
|
required |
Source code in zendriver/cdp/service_worker.py
stop_all_workers()
stop_worker(version_id)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
version_id
|
str
|
|
required |
Source code in zendriver/cdp/service_worker.py
unregister(scope_url)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scope_url
|
str
|
|
required |
Source code in zendriver/cdp/service_worker.py
update_registration(scope_url)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scope_url
|
str
|
|
required |