Definition
Realm execution contexts tied to the ServiceWorker
Global name use ServiceWorkerGlobalScope
as a basis for their global object.
This means their global object exposes the following members:
[SameObject] readonly attribute Clients clients;
[SameObject] readonly attribute ServiceWorkerRegistration registration;
[SameObject] readonly attribute ServiceWorker serviceWorker;
[NewObject] Promise<undefined> skipWaiting();
attribute EventHandler oninstall;
attribute EventHandler onactivate;
attribute EventHandler onfetch;
attribute EventHandler onmessage;
attribute EventHandler onmessageerror;
attribute EventHandler onnotificationclick;
attribute EventHandler onnotificationclose;
attribute EventHandler onbackgroundfetchsuccess;
attribute EventHandler onbackgroundfetchfail;
attribute EventHandler onbackgroundfetchabort;
attribute EventHandler onbackgroundfetchclick;
attribute EventHandler onsync;
attribute EventHandler oncontentdelete;
[SameObject] readonly attribute CookieStore cookieStore;
attribute EventHandler oncookiechange;
attribute EventHandler onperiodicsync;
attribute EventHandler oncanmakepayment;
attribute EventHandler onpaymentrequest;
attribute EventHandler onpush;
attribute EventHandler onpushsubscriptionchange;
readonly attribute WorkerGlobalScope self;
readonly attribute WorkerLocation location;
undefined importScripts((TrustedScriptURL or USVString)... urls);
attribute OnErrorEventHandler onerror;
attribute EventHandler onlanguagechange;
attribute EventHandler onoffline;
attribute EventHandler ononline;
attribute EventHandler onrejectionhandled;
attribute EventHandler onunhandledrejection;
undefined addEventListener(DOMString type, EventListener? callback, optional (AddEventListenerOptions or boolean) options = {});
undefined removeEventListener(DOMString type, EventListener? callback, optional (EventListenerOptions or boolean) options = {});
boolean dispatchEvent(Event event);
The following interfaces are exposed exclusively in the corresponding realms:
- AbortController
- AbortSignal
- BackgroundFetchEvent
- BackgroundFetchUpdateUIEvent
- ByteLengthQueuingStrategy
- CanMakePaymentEvent
- Client
- Clients
- CompressionStream
- ContentIndexEvent
- CountQueuingStrategy
- CustomEvent
- DOMException
- DecompressionStream
- ErrorEvent
- Event
- EventTarget
- ExtendableCookieChangeEvent
- ExtendableEvent
- ExtendableMessageEvent
- FetchEvent
- Global
- InstallEvent
- Instance
- Memory
- Module
- NotificationEvent
- Observable
- PaymentRequestEvent
- PeriodicSyncEvent
- PromiseRejectionEvent
- PushEvent
- PushMessageData
- PushSubscriptionChangeEvent
- ReadableByteStreamController
- ReadableStream
- ReadableStreamBYOBReader
- ReadableStreamBYOBRequest
- ReadableStreamDefaultController
- ReadableStreamDefaultReader
- ServiceWorkerGlobalScope
- Subscriber
- SyncEvent
- Table
- TextDecoder
- TextDecoderStream
- TextEncoder
- TextEncoderStream
- TransformStream
- TransformStreamDefaultController
- URL
- URLSearchParams
- WebTransportWriter
- WindowClient
- WritableStream
- WritableStreamDefaultController
- WritableStreamDefaultWriter
The following interfaces are also exposed in the corresponding realms:
- ANGLE_instanced_arrays
- AbortController
- AbortSignal
- BackgroundFetchManager
- BackgroundFetchRecord
- BackgroundFetchRegistration
- BarcodeDetector
- Blob
- BroadcastChannel
- ByteLengthQueuingStrategy
- CSSColor
- CSSColorValue
- CSSHSL
- CSSHWB
- CSSImageValue
- CSSKeywordValue
- CSSLCH
- CSSLab
- CSSMathClamp
- CSSMathInvert
- CSSMathMax
- CSSMathMin
- CSSMathNegate
- CSSMathProduct
- CSSMathSum
- CSSMathValue
- CSSMatrixComponent
- CSSNumericArray
- CSSNumericValue
- CSSOKLCH
- CSSOKLab
- CSSPerspective
- CSSRGB
- CSSRotate
- CSSScale
- CSSSkew
- CSSSkewX
- CSSSkewY
- CSSStyleValue
- CSSTransformComponent
- CSSTransformValue
- CSSTranslate
- CSSUnitValue
- CSSUnparsedValue
- CSSVariableReferenceValue
- Cache
- CacheStorage
- CanvasGradient
- CanvasPattern
- CloseEvent
- CompressionStream
- ContentIndex
- CookieStore
- CookieStoreManager
- CountQueuingStrategy
- CrashReportBody
- CropTarget
- Crypto
- CryptoKey
- CustomEvent
- DOMException
- DOMMatrix
- DOMMatrixReadOnly
- DOMPoint
- DOMPointReadOnly
- DOMQuad
- DOMRect
- DOMRectReadOnly
- DOMStringList
- DecompressionStream
- DeprecationReportBody
- EXT_blend_minmax
- EXT_color_buffer_float
- EXT_color_buffer_half_float
- EXT_disjoint_timer_query
- EXT_disjoint_timer_query_webgl2
- EXT_float_blend
- EXT_frag_depth
- EXT_sRGB
- EXT_shader_texture_lod
- EXT_texture_compression_bptc
- EXT_texture_compression_rgtc
- EXT_texture_filter_anisotropic
- EXT_texture_norm16
- ErrorEvent
- Event
- EventSource
- EventTarget
- FaceDetector
- File
- FileList
- FileReader
- FileSystemDirectoryHandle
- FileSystemFileHandle
- FileSystemHandle
- FileSystemWritableFileStream
- FontFace
- FontFaceFeatures
- FontFacePalette
- FontFacePalettes
- FontFaceSet
- FontFaceSetLoadEvent
- FontFaceVariationAxis
- FontFaceVariations
- FormData
- GPU
- GPUAdapter
- GPUAdapterInfo
- GPUBindGroup
- GPUBindGroupLayout
- GPUBuffer
- GPUCanvasContext
- GPUCommandBuffer
- GPUCommandEncoder
- GPUCompilationInfo
- GPUCompilationMessage
- GPUComputePassEncoder
- GPUComputePipeline
- GPUDevice
- GPUDeviceLostInfo
- GPUError
- GPUExternalTexture
- GPUInternalError
- GPUOutOfMemoryError
- GPUPipelineError
- GPUPipelineLayout
- GPUQuerySet
- GPUQueue
- GPURenderBundle
- GPURenderBundleEncoder
- GPURenderPassEncoder
- GPURenderPipeline
- GPUSampler
- GPUShaderModule
- GPUSupportedFeatures
- GPUSupportedLimits
- GPUTexture
- GPUTextureView
- GPUUncapturedErrorEvent
- GPUValidationError
- Global
- HID
- HIDConnectionEvent
- HIDDevice
- HIDInputReportEvent
- Headers
- IDBCursor
- IDBCursorWithValue
- IDBDatabase
- IDBFactory
- IDBIndex
- IDBKeyRange
- IDBObjectStore
- IDBOpenDBRequest
- IDBRequest
- IDBTransaction
- IDBVersionChangeEvent
- ImageBitmap
- ImageBitmapRenderingContext
- ImageData
- Instance
- InterventionReportBody
- KHR_parallel_shader_compile
- Lock
- LockManager
- MIDIAccess
- MIDIConnectionEvent
- MIDIInput
- MIDIInputMap
- MIDIMessageEvent
- MIDIOutput
- MIDIOutputMap
- MIDIPort
- MediaCapabilities
- Memory
- MessageChannel
- MessageEvent
- MessagePort
- Module
- NavigationPreloadManager
- NavigatorUAData
- NetworkInformation
- Notification
- OES_draw_buffers_indexed
- OES_element_index_uint
- OES_fbo_render_mipmap
- OES_standard_derivatives
- OES_texture_float
- OES_texture_float_linear
- OES_texture_half_float
- OES_texture_half_float_linear
- OES_vertex_array_object
- OVR_multiview2
- Observable
- OffscreenCanvas
- OffscreenCanvasRenderingContext2D
- Path2D
- Performance
- PerformanceEntry
- PerformanceMark
- PerformanceMeasure
- PerformanceObserver
- PerformanceObserverEntryList
- PerformanceResourceTiming
- PerformanceServerTiming
- PeriodicSyncManager
- PermissionStatus
- Permissions
- ProgressEvent
- PromiseRejectionEvent
- PushManager
- PushSubscription
- PushSubscriptionOptions
- ReadableByteStreamController
- ReadableStream
- ReadableStreamBYOBReader
- ReadableStreamBYOBRequest
- ReadableStreamDefaultController
- ReadableStreamDefaultReader
- Report
- ReportBody
- ReportingObserver
- Request
- Response
- RestrictionTarget
- Sanitizer
- Scheduler
- ScriptingPolicyReportBody
- SecurityPolicyViolationEvent
- ServiceWorker
- ServiceWorkerContainer
- ServiceWorkerRegistration
- StorageBucket
- StorageBucketManager
- StorageManager
- StylePropertyMapReadOnly
- Subscriber
- SubtleCrypto
- SyncManager
- Table
- TaskController
- TaskPriorityChangeEvent
- TaskSignal
- TextDecoder
- TextDecoderStream
- TextDetector
- TextEncoder
- TextEncoderStream
- TextMetrics
- TransformStream
- TransformStreamDefaultController
- TrustedHTML
- TrustedScript
- TrustedScriptURL
- TrustedTypePolicy
- TrustedTypePolicyFactory
- URL
- URLPattern
- URLSearchParams
- USB
- USBAlternateInterface
- USBConfiguration
- USBConnectionEvent
- USBDevice
- USBEndpoint
- USBInTransferResult
- USBInterface
- USBIsochronousInTransferPacket
- USBIsochronousInTransferResult
- USBIsochronousOutTransferPacket
- USBIsochronousOutTransferResult
- USBOutTransferResult
- USBPermissionResult
- WEBGL_blend_equation_advanced_coherent
- WEBGL_clip_cull_distance
- WEBGL_color_buffer_float
- WEBGL_compressed_texture_astc
- WEBGL_compressed_texture_etc
- WEBGL_compressed_texture_etc1
- WEBGL_compressed_texture_pvrtc
- WEBGL_compressed_texture_s3tc
- WEBGL_compressed_texture_s3tc_srgb
- WEBGL_debug_renderer_info
- WEBGL_debug_shaders
- WEBGL_depth_texture
- WEBGL_draw_buffers
- WEBGL_draw_instanced_base_vertex_base_instance
- WEBGL_lose_context
- WEBGL_multi_draw
- WEBGL_multi_draw_instanced_base_vertex_base_instance
- WEBGL_provoking_vertex
- WGSLLanguageFeatures
- WebGL2RenderingContext
- WebGLActiveInfo
- WebGLBuffer
- WebGLContextEvent
- WebGLFramebuffer
- WebGLObject
- WebGLProgram
- WebGLQuery
- WebGLRenderbuffer
- WebGLRenderingContext
- WebGLSampler
- WebGLShader
- WebGLShaderPrecisionFormat
- WebGLSync
- WebGLTexture
- WebGLTimerQueryEXT
- WebGLTransformFeedback
- WebGLUniformLocation
- WebGLVertexArrayObject
- WebGLVertexArrayObjectOES
- WebSocket
- WebTransport
- WebTransportBidirectionalStream
- WebTransportDatagramDuplexStream
- WebTransportError
- WebTransportReceiveStream
- WebTransportSendGroup
- WebTransportSendStream
- WebTransportWriter
- WorkerGlobalScope
- WorkerLocation
- WorkerNavigator
- WritableStream
- WritableStreamDefaultController
- WritableStreamDefaultWriter