interface ICoreWebView2_24

interface ICoreWebView2_24
  : public ICoreWebView2_23

This is the ICoreWebView2_24 interface that manages WebView2 Web Notification functionality.

Summary

Members Descriptions
add_NotificationReceived Adds an event handler for the NotificationReceived event.
remove_NotificationReceived Removes an event handler previously added with add_NotificationReceived.

Applies to

Product Introduced
WebView2 Win32 1.0.2739.15
WebView2 Win32 Prerelease 1.0.2730

Members

add_NotificationReceived

Adds an event handler for the NotificationReceived event.

public HRESULT add_NotificationReceived(ICoreWebView2NotificationReceivedEventHandler * eventHandler, EventRegistrationToken * token)

Add an event handler for the NotificationReceived event for non-persistent notifications.

If a deferral is not taken on the event args, the subsequent scripts after the DOM notification creation call (i.e. Notification()) are blocked until the event handler returns. If a deferral is taken, the scripts are blocked until the deferral is completed.

remove_NotificationReceived

Removes an event handler previously added with add_NotificationReceived.

public HRESULT remove_NotificationReceived(EventRegistrationToken token)