Interface PushSubscription
interface PushSubscription {
endpoint: string;
expirationTime: number;
options: PushSubscriptionOptions;
getKey(name: PushEncryptionKeyName): ArrayBuffer;
toJSON(): PushSubscriptionJSON;
unsubscribe(): Promise<boolean>;
}
endpoint: string;
expirationTime: number;
options: PushSubscriptionOptions;
getKey(name: PushEncryptionKeyName): ArrayBuffer;
toJSON(): PushSubscriptionJSON;
unsubscribe(): Promise<boolean>;
}
Index
Properties
Methods
Properties
Readonly
endpoint
endpoint: string
Readonly
expirationTime
expirationTime : number
Readonly
options
Methods
getKey
- get
Key (name): ArrayBuffer Parameters
- name: PushEncryptionKeyName
Returns ArrayBuffer
toJSON
- toJSON(): PushSubscriptionJSON
Returns PushSubscriptionJSON
This Push API interface provides a subcription's URL endpoint and allows unsubscription from a push service. Available only in secure contexts.
MDN Reference