ServiceWorker Domain
Methods
Events
Types
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.stopAllWorkers #
Events
ServiceWorker.workerRegistrationUpdated #
parameters
- registrations
-
array[ ServiceWorkerRegistration ]
Types
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:typeequalscache,sourceDictis null.RouterSourceDict:typeequalssourceDict,sourceDicthas valid value.
Type: object
properties
- type
-
ServiceWorkerRouterSourceType
- sourceDict
-
ServiceWorkerRouterSourceDict
Non-empty iff
typeequals "sourceDict".
ServiceWorker.ServiceWorkerRouterSourceType #
cache, fetchEvent, network, raceNetworkAndFetchHandler, raceNetworkAndCache, sourceDictType: 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
typedRouterRulesis in progress. The browser sends eitherrouterRulesortypedRouterRules. TODO(crbug.com/540469610): RemoverouterRulesafter the migration. - typedRouterRules
-
array[ ServiceWorkerRouterRule ]
ServiceWorker.ServiceWorkerVersionRunningStatus #
stopped, starting, running, stoppingType: string
ServiceWorker.ServiceWorkerVersionStatus #
new, installing, installed, activating, activated, redundantType: string