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 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應