Chrome DevTools Protocol

Methods

ServiceWorker.deliverPushMessage

parameters
origin
string
registrationId
RegistrationID
data
string

ServiceWorker.disable

ServiceWorker.dispatchPeriodicSyncEvent

parameters
origin
string
registrationId
RegistrationID
tag
string

ServiceWorker.dispatchSyncEvent

parameters
origin
string
registrationId
RegistrationID
tag
string
lastChance
boolean

ServiceWorker.enable

ServiceWorker.setForceUpdateOnPageLoad

parameters
forceUpdateOnPageLoad
boolean

ServiceWorker.skipWaiting

parameters
scopeURL
string

ServiceWorker.startWorker

parameters
scopeURL
string

ServiceWorker.stopAllWorkers

ServiceWorker.stopWorker

parameters
versionId
string

ServiceWorker.unregister

parameters
scopeURL
string

ServiceWorker.updateRegistration

parameters
scopeURL
string

Events

ServiceWorker.workerErrorReported

parameters
errorMessage
ServiceWorkerErrorMessage

ServiceWorker.workerRegistrationUpdated

parameters
registrations
array[ ServiceWorkerRegistration ]

ServiceWorker.workerVersionUpdated

parameters
versions
array[ ServiceWorkerVersion ]

Types

ServiceWorker.RegistrationID

Type: string

ServiceWorker.ServiceWorkerErrorMessage

ServiceWorker error message.

Type: object

properties
errorMessage
string
registrationId
RegistrationID
versionId
string
sourceURL
string
lineNumber
integer
columnNumber
integer

ServiceWorker.ServiceWorkerRegistration

ServiceWorker registration.

Type: object

properties
registrationId
RegistrationID
scopeURL
string
isDeleted
boolean

ServiceWorker.ServiceWorkerRouterCondition

Mostly corresponds to RouterCondition in ServiceWorker spec (https://www.w3.org/TR/service-workers/#dictdef-routercondition) while this currently lacks support for the nested conditions ("or" and "not"). TODO(crbug.com/540469610): Support recursive conditions.

Type: object

properties
urlPattern
string

Plain text, or JSON serialization of URLPatternInit or URLPattern

requestMethod
string
requestMode
string
requestDestination
string
runningStatus
ServiceWorkerVersionRunningStatus

ServiceWorker.ServiceWorkerRouterRule

Type: object

properties
condition
ServiceWorkerRouterCondition
source
ServiceWorkerRouterSource
id
integer

Rule ID assigned by the browser. Unique within each ServiceWorkerVersion.

ServiceWorker.ServiceWorkerRouterSource

Corresponds to RouterSource in the spec while the representation is different as follows. (https://www.w3.org/TR/service-workers/#typedefdef-routersource)

  • RouterSourceEnum: type equals cache, sourceDict is null.
  • RouterSourceDict: type equals sourceDict, sourceDict has valid value.

Type: object

properties
type
ServiceWorkerRouterSourceType
sourceDict
ServiceWorkerRouterSourceDict

Non-empty iff type equals "sourceDict".

ServiceWorker.ServiceWorkerRouterSourceDict

Type: object

properties
cacheName
string

ServiceWorker.ServiceWorkerRouterSourceType

Allowed Values: cache, fetchEvent, network, raceNetworkAndFetchHandler, raceNetworkAndCache, sourceDict

Type: string

ServiceWorker.ServiceWorkerVersion

ServiceWorker version.

Type: object

properties
versionId
string
registrationId
RegistrationID
scriptURL
string
runningStatus
ServiceWorkerVersionRunningStatus
status
ServiceWorkerVersionStatus
scriptLastModified
number

The Last-Modified header value of the main script.

scriptResponseTime
number

The time at which the response headers of the main script were received from the server. For cached script it is the last time the cache entry was validated.

controlledClients
array[ Target.TargetID ]
targetId
Target.TargetID
routerRules
string

Migration to typedRouterRules is in progress. The browser sends either routerRules or typedRouterRules. TODO(crbug.com/540469610): Remove routerRules after the migration.

typedRouterRules
array[ ServiceWorkerRouterRule ]

ServiceWorker.ServiceWorkerVersionRunningStatus

Allowed Values: stopped, starting, running, stopping

Type: string

ServiceWorker.ServiceWorkerVersionStatus

Allowed Values: new, installing, installed, activating, activated, redundant

Type: string