Skip to content

PushManagerAPI

Types

permissionState

type permissionState =
| @as("denied") Denied
| @as("granted") Granted
| @as("prompt") Prompt

pushEncryptionKeyName

type pushEncryptionKeyName =
| @as("auth") Auth
| @as("p256dh") P256dh

pushManager

This Push API interface provides a way to receive notifications from third-party servers as well as request URLs for push notifications. See PushManager on MDN

type pushManager = {
supportedContentEncodings: array<string>,
}

Record fields

supportedContentEncodings
array< string >

Module

There are methods and helpers defined in PushManager .

pushSubscription

This Push API interface provides a subcription's URL endpoint and allows unsubscription from a push service. See PushSubscription on MDN

type pushSubscription = {
endpoint: string,
expirationTime: Null.t<int>,
options: pushSubscriptionOptions,
}

Record fields

endpoint
string
expirationTime
Null.t< int >

Module

There are methods and helpers defined in PushSubscription .

pushSubscriptionJSON

type pushSubscriptionJSON = {
mutable endpoint?: string,
mutable expirationTime?: Null.t<int>,
mutable keys?: WebAPI.Prelude.any,
}

Record fields

endpoint
option< string >
expirationTime
option< Null.t< int > >
keys
option< WebAPI.Prelude.any >

pushSubscriptionOptions

type pushSubscriptionOptions = {
userVisibleOnly: bool,
applicationServerKey: Null.t<ArrayBuffer.t>,
}

Record fields

userVisibleOnly
bool
applicationServerKey
Null.t< ArrayBuffer.t >

pushSubscriptionOptionsInit

type pushSubscriptionOptionsInit = {
mutable userVisibleOnly?: bool,
mutable applicationServerKey?: Null.t<unknown>,
}

Record fields

userVisibleOnly
option< bool >
applicationServerKey
option< Null.t< unknown > >