Interface PushManager
interface PushManager {
getSubscription(): Promise<PushSubscription>;
permissionState(
options?: PushSubscriptionOptionsInit,
): Promise<PermissionState>;
subscribe(options?: PushSubscriptionOptionsInit): Promise<PushSubscription>;
}
getSubscription(): Promise<PushSubscription>;
permissionState(
options?: PushSubscriptionOptionsInit,
): Promise<PermissionState>;
subscribe(options?: PushSubscriptionOptionsInit): Promise<PushSubscription>;
}
Index
Methods
getSubscription
- getSubscription(): Promise<PushSubscription>
Returns Promise<PushSubscription>
permissionState
- permissionState(options?: PushSubscriptionOptionsInit): Promise<PermissionState>
Parameters
Optional
options: PushSubscriptionOptionsInit
Returns Promise<PermissionState>
subscribe
- subscribe(options?: PushSubscriptionOptionsInit): Promise<PushSubscription>
Parameters
Optional
options: PushSubscriptionOptionsInit
Returns Promise<PushSubscription>
This Push API interface provides a way to receive notifications from third-party servers as well as request URLs for push notifications. Available only in secure contexts.
MDN Reference