Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/ogone/src/ogone.dom.d.ts>ServiceWorkerRegistration

Advanced Web Composition for Future
Latest
interface ServiceWorkerRegistration
implements EventTarget
import { type ServiceWorkerRegistration } from "https://deno.land/x/ogone@revb3/src/ogone.dom.d.ts";

This ServiceWorker API export interface represents the service worker registration. You register a service worker to control one or more pages that share the same origin.

Properties

readonly
active: ServiceWorker | null
readonly
installing: ServiceWorker | null
readonly
navigationPreload: NavigationPreloadManager
onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null
readonly
pushManager: PushManager
readonly
scope: string
readonly
sync: SyncManager
readonly
updateViaCache: ServiceWorkerUpdateViaCache
readonly
waiting: ServiceWorker | null

Methods

getNotifications(filter?: GetNotificationOptions): Promise<Notification[]>
showNotification(title: string, options?: NotificationOptions): Promise<void>
unregister(): Promise<boolean>
update(): Promise<void>
addEventListener<K extends keyof ServiceWorkerRegistrationEventMap>(
type: K,
options?: boolean | AddEventListenerOptions,
): void
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void
removeEventListener<K extends keyof ServiceWorkerRegistrationEventMap>(
type: K,
options?: boolean | EventListenerOptions,
): void
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void