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 | Add an event handler for the NotificationReceived event for non-persistent notifications. |
remove_NotificationReceived | Remove 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
Add an event handler for the NotificationReceived
event for non-persistent notifications.
public HRESULT add_NotificationReceived(ICoreWebView2ExperimentalNotificationReceivedEventHandler * eventHandler, EventRegistrationToken * token)
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
Remove an event handler previously added with add_NotificationReceived
.
public HRESULT remove_NotificationReceived(EventRegistrationToken token)
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈