Type Alias: PushPayload
PushPayload =
object
Defined in: serviceWorker/createServiceWorker.ts:7
JSON payload a server sends through Web Push. Every field is optional; the service worker fills the gaps from its config.
Properties
badge?
optionalbadge?:string
Defined in: serviceWorker/createServiceWorker.ts:11
body?
optionalbody?:string
Defined in: serviceWorker/createServiceWorker.ts:9
data?
optionaldata?:Record<string,unknown>
Defined in: serviceWorker/createServiceWorker.ts:20
Any extra data the app wants back on click, kept in
notification.data.
icon?
optionalicon?:string
Defined in: serviceWorker/createServiceWorker.ts:10
title?
optionaltitle?:string
Defined in: serviceWorker/createServiceWorker.ts:8
url?
optionalurl?:string
Defined in: serviceWorker/createServiceWorker.ts:15
Same-origin URL opened when the notification is clicked.