Documentation
¶
Overview ¶
Package serviceworker provides the Chrome DevTools Protocol commands, types, and events for the ServiceWorker domain.
Generated by the cdproto-gen command.
Index ¶
- Constants
- type DeliverPushMessageParams
- type DisableParams
- type DispatchPeriodicSyncEventParams
- type DispatchSyncEventParams
- type EnableParams
- type ErrorMessage
- type EventWorkerErrorReported
- type EventWorkerRegistrationUpdated
- type EventWorkerVersionUpdated
- type InspectWorkerParams
- type Registration
- type RegistrationID
- type SetForceUpdateOnPageLoadParams
- type SkipWaitingParams
- type StartWorkerParams
- type StopAllWorkersParams
- type StopWorkerParams
- type UnregisterParams
- type UpdateRegistrationParams
- type Version
- type VersionRunningStatus
- type VersionStatus
Constants ¶
const ( CommandDeliverPushMessage = "ServiceWorker.deliverPushMessage" CommandDisable = "ServiceWorker.disable" CommandDispatchSyncEvent = "ServiceWorker.dispatchSyncEvent" CommandDispatchPeriodicSyncEvent = "ServiceWorker.dispatchPeriodicSyncEvent" CommandEnable = "ServiceWorker.enable" CommandInspectWorker = "ServiceWorker.inspectWorker" CommandSetForceUpdateOnPageLoad = "ServiceWorker.setForceUpdateOnPageLoad" CommandSkipWaiting = "ServiceWorker.skipWaiting" CommandStartWorker = "ServiceWorker.startWorker" CommandStopAllWorkers = "ServiceWorker.stopAllWorkers" CommandStopWorker = "ServiceWorker.stopWorker" CommandUnregister = "ServiceWorker.unregister" CommandUpdateRegistration = "ServiceWorker.updateRegistration" )
Command names.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeliverPushMessageParams ¶
type DeliverPushMessageParams struct {
Origin string `json:"origin"`
RegistrationID RegistrationID `json:"registrationId"`
Data string `json:"data"`
}
DeliverPushMessageParams [no description].
func DeliverPushMessage ¶
func DeliverPushMessage(origin string, registrationID RegistrationID, data string) *DeliverPushMessageParams
DeliverPushMessage [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-deliverPushMessage
parameters:
origin registrationID data
type DisableParams ¶
type DisableParams struct{}
DisableParams [no description].
func Disable ¶
func Disable() *DisableParams
Disable [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-disable
type DispatchPeriodicSyncEventParams ¶
type DispatchPeriodicSyncEventParams struct {
Origin string `json:"origin"`
RegistrationID RegistrationID `json:"registrationId"`
Tag string `json:"tag"`
}
DispatchPeriodicSyncEventParams [no description].
func DispatchPeriodicSyncEvent ¶
func DispatchPeriodicSyncEvent(origin string, registrationID RegistrationID, tag string) *DispatchPeriodicSyncEventParams
DispatchPeriodicSyncEvent [no description].
parameters:
origin registrationID tag
type DispatchSyncEventParams ¶
type DispatchSyncEventParams struct {
Origin string `json:"origin"`
RegistrationID RegistrationID `json:"registrationId"`
Tag string `json:"tag"`
LastChance bool `json:"lastChance"`
}
DispatchSyncEventParams [no description].
func DispatchSyncEvent ¶
func DispatchSyncEvent(origin string, registrationID RegistrationID, tag string, lastChance bool) *DispatchSyncEventParams
DispatchSyncEvent [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-dispatchSyncEvent
parameters:
origin registrationID tag lastChance
type EnableParams ¶
type EnableParams struct{}
EnableParams [no description].
func Enable ¶
func Enable() *EnableParams
Enable [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-enable
type ErrorMessage ¶
type ErrorMessage struct {
ErrorMessage string `json:"errorMessage"`
RegistrationID RegistrationID `json:"registrationId"`
VersionID string `json:"versionId"`
SourceURL string `json:"sourceURL"`
LineNumber int64 `json:"lineNumber"`
ColumnNumber int64 `json:"columnNumber"`
}
ErrorMessage serviceWorker error message.
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#type-ServiceWorkerErrorMessage
type EventWorkerErrorReported ¶
type EventWorkerErrorReported struct {
ErrorMessage *ErrorMessage `json:"errorMessage"`
}
EventWorkerErrorReported [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#event-workerErrorReported
type EventWorkerRegistrationUpdated ¶
type EventWorkerRegistrationUpdated struct {
Registrations []*Registration `json:"registrations"`
}
EventWorkerRegistrationUpdated [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#event-workerRegistrationUpdated
type EventWorkerVersionUpdated ¶
type EventWorkerVersionUpdated struct {
Versions []*Version `json:"versions"`
}
EventWorkerVersionUpdated [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#event-workerVersionUpdated
type InspectWorkerParams ¶
type InspectWorkerParams struct {
VersionID string `json:"versionId"`
}
InspectWorkerParams [no description].
func InspectWorker ¶
func InspectWorker(versionID string) *InspectWorkerParams
InspectWorker [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-inspectWorker
parameters:
versionID
type Registration ¶
type Registration struct {
RegistrationID RegistrationID `json:"registrationId"`
ScopeURL string `json:"scopeURL"`
IsDeleted bool `json:"isDeleted"`
}
Registration serviceWorker registration.
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#type-ServiceWorkerRegistration
type RegistrationID ¶
type RegistrationID string
RegistrationID [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#type-RegistrationID
func (RegistrationID) String ¶
func (t RegistrationID) String() string
String returns the RegistrationID as string value.
type SetForceUpdateOnPageLoadParams ¶
type SetForceUpdateOnPageLoadParams struct {
ForceUpdateOnPageLoad bool `json:"forceUpdateOnPageLoad"`
}
SetForceUpdateOnPageLoadParams [no description].
func SetForceUpdateOnPageLoad ¶
func SetForceUpdateOnPageLoad(forceUpdateOnPageLoad bool) *SetForceUpdateOnPageLoadParams
SetForceUpdateOnPageLoad [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-setForceUpdateOnPageLoad
parameters:
forceUpdateOnPageLoad
type SkipWaitingParams ¶
type SkipWaitingParams struct {
ScopeURL string `json:"scopeURL"`
}
SkipWaitingParams [no description].
func SkipWaiting ¶
func SkipWaiting(scopeURL string) *SkipWaitingParams
SkipWaiting [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-skipWaiting
parameters:
scopeURL
type StartWorkerParams ¶
type StartWorkerParams struct {
ScopeURL string `json:"scopeURL"`
}
StartWorkerParams [no description].
func StartWorker ¶
func StartWorker(scopeURL string) *StartWorkerParams
StartWorker [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-startWorker
parameters:
scopeURL
type StopAllWorkersParams ¶
type StopAllWorkersParams struct{}
StopAllWorkersParams [no description].
func StopAllWorkers ¶
func StopAllWorkers() *StopAllWorkersParams
StopAllWorkers [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-stopAllWorkers
type StopWorkerParams ¶
type StopWorkerParams struct {
VersionID string `json:"versionId"`
}
StopWorkerParams [no description].
func StopWorker ¶
func StopWorker(versionID string) *StopWorkerParams
StopWorker [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-stopWorker
parameters:
versionID
type UnregisterParams ¶
type UnregisterParams struct {
ScopeURL string `json:"scopeURL"`
}
UnregisterParams [no description].
func Unregister ¶
func Unregister(scopeURL string) *UnregisterParams
Unregister [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-unregister
parameters:
scopeURL
type UpdateRegistrationParams ¶
type UpdateRegistrationParams struct {
ScopeURL string `json:"scopeURL"`
}
UpdateRegistrationParams [no description].
func UpdateRegistration ¶
func UpdateRegistration(scopeURL string) *UpdateRegistrationParams
UpdateRegistration [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-updateRegistration
parameters:
scopeURL
type Version ¶
type Version struct {
VersionID string `json:"versionId"`
RegistrationID RegistrationID `json:"registrationId"`
ScriptURL string `json:"scriptURL"`
RunningStatus VersionRunningStatus `json:"runningStatus"`
Status VersionStatus `json:"status"`
ScriptLastModified float64 `json:"scriptLastModified,omitempty"` // The Last-Modified header value of the main script.
ScriptResponseTime float64 `json:"scriptResponseTime,omitempty"` // 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 []target.ID `json:"controlledClients,omitempty"`
TargetID target.ID `json:"targetId,omitempty"`
RouterRules string `json:"routerRules,omitempty"`
}
Version serviceWorker version.
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#type-ServiceWorkerVersion
type VersionRunningStatus ¶
type VersionRunningStatus string
VersionRunningStatus [no description].
const ( VersionRunningStatusStopped VersionRunningStatus = "stopped" VersionRunningStatusStarting VersionRunningStatus = "starting" VersionRunningStatusRunning VersionRunningStatus = "running" VersionRunningStatusStopping VersionRunningStatus = "stopping" )
VersionRunningStatus values.
func (VersionRunningStatus) MarshalJSON ¶
func (t VersionRunningStatus) MarshalJSON() ([]byte, error)
MarshalJSON satisfies json.Marshaler.
func (VersionRunningStatus) String ¶
func (t VersionRunningStatus) String() string
String returns the VersionRunningStatus as string value.
func (*VersionRunningStatus) UnmarshalJSON ¶
func (t *VersionRunningStatus) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies json.Unmarshaler.
type VersionStatus ¶
type VersionStatus string
VersionStatus [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#type-ServiceWorkerVersionStatus
const ( VersionStatusNew VersionStatus = "new" VersionStatusInstalling VersionStatus = "installing" VersionStatusInstalled VersionStatus = "installed" VersionStatusActivating VersionStatus = "activating" VersionStatusActivated VersionStatus = "activated" VersionStatusRedundant VersionStatus = "redundant" )
VersionStatus values.
func (VersionStatus) MarshalJSON ¶
func (t VersionStatus) MarshalJSON() ([]byte, error)
MarshalJSON satisfies json.Marshaler.
func (VersionStatus) String ¶
func (t VersionStatus) String() string
String returns the VersionStatus as string value.
func (*VersionStatus) UnmarshalJSON ¶
func (t *VersionStatus) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies json.Unmarshaler.