onLoadStop property
- @SupportedPlatforms.new(platforms: [AndroidPlatform(apiName: 'WebViewClient.onPageFinished', apiUrl: 'https://developer.android.com/reference/android/webkit/WebViewClient#onPageFinished(android.webkit.WebView,%20java.lang.String)'), IOSPlatform(apiName: 'WKNavigationDelegate.webView', apiUrl: 'https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455629-webview'), MacOSPlatform(apiName: 'WKNavigationDelegate.webView', apiUrl: 'https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455629-webview'), WebPlatform(apiName: 'Window.onload', apiUrl: 'https://developer.mozilla.org/en-US/docs/Web/API/Window/load_event', note: "If the current iframe location isn't accessible because of the browser's same-origin policy, the [url] parameter will be null."), WindowsPlatform(apiName: 'ICoreWebView2.add_NavigationCompleted', apiUrl: 'https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/iwebview2webview?view=webview2-0.8.355#add_navigationcompleted'), LinuxPlatform(apiName: 'WebKitWebView::load-changed', apiUrl: 'https://wpewebkit.org/reference/stable/wpe-webkit-2.0/signal.WebView.load-changed.html', note: 'Fired when WebKitLoadEvent is WEBKIT_LOAD_FINISHED.')])
final
Event fired when the WebView finishes loading an url.
Officially Supported Platforms/Implementations:
- Android WebView (Official API - WebViewClient.onPageFinished)
- iOS WKWebView (Official API - WKNavigationDelegate.webView)
- macOS WKWebView (Official API - WKNavigationDelegate.webView)
- Web <iframe> but requires same origin (Official API - Window.onload):
- If the current iframe location isn't accessible because of the browser's same-origin policy, the
urlparameter will be null.
- If the current iframe location isn't accessible because of the browser's same-origin policy, the
- Windows WebView2 (Official API - ICoreWebView2.add_NavigationCompleted)
- Linux WPE WebKit (Official API - WebKitWebView::load-changed):
- Fired when WebKitLoadEvent is WEBKIT_LOAD_FINISHED.
Parameters - Officially Supported Platforms/Implementations:
url: all platforms
Use the PlatformWebViewCreationParams.isPropertySupported method to check if this property is supported at runtime.
Implementation
@SupportedPlatforms(
platforms: [
AndroidPlatform(
apiName: 'WebViewClient.onPageFinished',
apiUrl:
'https://developer.android.com/reference/android/webkit/WebViewClient#onPageFinished(android.webkit.WebView,%20java.lang.String)',
),
IOSPlatform(
apiName: 'WKNavigationDelegate.webView',
apiUrl:
'https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455629-webview',
),
MacOSPlatform(
apiName: 'WKNavigationDelegate.webView',
apiUrl:
'https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455629-webview',
),
WebPlatform(
apiName: 'Window.onload',
apiUrl:
'https://developer.mozilla.org/en-US/docs/Web/API/Window/load_event',
note:
"If the current iframe location isn't accessible because of the browser's same-origin policy, the [url] parameter will be null.",
),
WindowsPlatform(
apiName: 'ICoreWebView2.add_NavigationCompleted',
apiUrl:
'https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/iwebview2webview?view=webview2-0.8.355#add_navigationcompleted',
),
LinuxPlatform(
apiName: 'WebKitWebView::load-changed',
apiUrl:
'https://wpewebkit.org/reference/stable/wpe-webkit-2.0/signal.WebView.load-changed.html',
note: 'Fired when WebKitLoadEvent is WEBKIT_LOAD_FINISHED.',
),
],
)
final void Function(T controller, WebUri? url)? onLoadStop;