Table of Contents

Class PushEvent

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll

The PushEvent interface of the Push API represents a push message that has been received. This event is sent to the global scope of a ServiceWorker. It contains the information sent from an application server to a PushSubscription.

[Value("PushEvent")]
public class PushEvent : ExtendableEvent
Inheritance
PushEvent
Inherited Members

Remarks

Constructors

PushEvent()

public PushEvent()

PushEvent(string, PushEventInit)

The PushEvent() constructor creates a new
PushEvent object. Note that this constructor is exposed only to a
service worker context.

public PushEvent(string type, PushEventInit eventInitDict = null)

Parameters

type string
eventInitDict PushEventInit

Remarks

Properties

Data

The data read-only property of the PushEvent interface returns a reference to a PushMessageData object containing data sent to the PushSubscription.

[Value("data")]
public PushMessageData? Data { get; }

Property Value

PushMessageData

A PushMessageData object or null if no data member is passed when the event instance initialized.

Remarks