onClose property
- @SupportedPlatforms.new(platforms: [WindowsPlatform(apiName: 'ICoreWebView2Notification.add_CloseRequested', apiUrl: 'https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2notification?view=webview2-1.0.3595.46#add_closerequested')])
getter/setter pair
Event fired when the notification is closed by the web code, such as through notification.close().
You don't need to call reportClosed since this is coming from the web code.
Officially Supported Platforms/Implementations:
- Windows WebView2 (Official API - ICoreWebView2Notification.add_CloseRequested)
Use the PlatformWebNotificationController.isPropertySupported method to check if this property is supported at runtime.
Implementation
@SupportedPlatforms(
platforms: [
WindowsPlatform(
apiName: 'ICoreWebView2Notification.add_CloseRequested',
apiUrl:
'https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2notification?view=webview2-1.0.3595.46#add_closerequested',
),
],
)
WebNotificationCloseHandler? onClose;