interface ICoreWebView2Experimental22

Note

This reference is no longer being maintained. For the latest API reference, see WebView2 API Reference.

Note

This an experimental API that is shipped with our prerelease SDK. See WebView2 release notes.

interface ICoreWebView2Experimental22
  : public IUnknown

This is the ICoreWebView2Experimental22 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 N/A
WebView2 Win32 Prerelease 1.0.1988

Members

add_NotificationReceived

Adds an event handler for the NotificationReceived event.

public HRESULT add_NotificationReceived(ICoreWebView2ExperimentalNotificationReceivedEventHandler * 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)