Reputation: 1
elemental2.dom.PushSubscription (v2.25, July 2019) has endpoint but not p256dh and auth keys, anyone know how to access these?
Any help greatly appreciated.
Phil.
Upvotes: 0
Views: 97
Reputation: 1578
You can do this, but note that this is not included in elemental2 because it is a Firefox-only method (actually looks like it is already supported in most browsers, although here said that it is Firefox-only).
{
PushSubscription subscription = …;
FirefoxPushSubscription firefoxPushSubscription = Js.cast(subscription);
}
@JsType(isNative = true, name = "PushSubscription", namespace = JsPackage.GLOBAL)
public static class FirefoxPushSubscription extends PushSubscription {
public native ArrayBuffer getKey(String name);
}
Upvotes: 0