onWindowBlur property
- @SupportedPlatforms.new(platforms: [AndroidPlatform(), IOSPlatform(), MacOSPlatform(), WebPlatform(apiName: 'Window.onblur', apiUrl: 'https://developer.mozilla.org/en-US/docs/Web/API/Window/blur_event')])
final
Event fired when the JavaScript window object of the WebView has lost focus.
This is the result of the blur JavaScript event applied to the window object.
Officially Supported Platforms/Implementations:
- Android WebView
- iOS WKWebView
- macOS WKWebView
- Web <iframe> but requires same origin (Official API - Window.onblur)
Use the PlatformWebViewCreationParams.isPropertySupported method to check if this property is supported at runtime.
Implementation
@SupportedPlatforms(
platforms: [
AndroidPlatform(),
IOSPlatform(),
MacOSPlatform(),
WebPlatform(
apiName: 'Window.onblur',
apiUrl:
'https://developer.mozilla.org/en-US/docs/Web/API/Window/blur_event',
),
],
)
final void Function(T controller)? onWindowBlur;