Interface PushManager

    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

    interface PushManager {
        getSubscription(): Promise<PushSubscription>;
        permissionState(
            options?: PushSubscriptionOptionsInit,
        ): Promise<PermissionState>;
        subscribe(options?: PushSubscriptionOptionsInit): Promise<PushSubscription>;
    }

    Methods