Interface PushSubscription

    This Push API interface provides a subcription's URL endpoint and allows unsubscription from a push service. Available only in secure contexts.

    MDN Reference

    interface PushSubscription {
        endpoint: string;
        expirationTime: number;
        options: PushSubscriptionOptions;
        getKey(name: PushEncryptionKeyName): ArrayBuffer;
        toJSON(): PushSubscriptionJSON;
        unsubscribe(): Promise<boolean>;
    }

    Properties

    endpoint: string
    expirationTime: number

    Methods