onReceivedHttpError property

  1. @SupportedPlatforms.new(platforms: [AndroidPlatform(apiName: 'WebViewClient.onReceivedHttpError', apiUrl: 'https://developer.android.com/reference/android/webkit/WebViewClient#onReceivedHttpError(android.webkit.WebView,%20android.webkit.WebResourceRequest,%20android.webkit.WebResourceResponse)', available: '23'), IOSPlatform(apiName: 'WKNavigationDelegate.webView', apiUrl: 'https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455643-webview'), MacOSPlatform(apiName: 'WKNavigationDelegate.webView', apiUrl: 'https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455643-webview'), 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-failed', apiUrl: 'https://wpewebkit.org/reference/stable/wpe-webkit-2.0/signal.WebView.load-failed.html', note: 'HTTP errors are detected during the load-failed signal handling.')])
void Function(T controller, WebResourceRequest request, WebResourceResponse errorResponse)? onReceivedHttpError
final

Event fired when the WebView receives an HTTP error.

request represents the originating request.

errorResponse represents the information about the error occurred.

Officially Supported Platforms/Implementations:

Parameters - Officially Supported Platforms/Implementations:

  • request: all platforms
  • errorResponse: all platforms

Use the PlatformWebViewCreationParams.isPropertySupported method to check if this property is supported at runtime.

Implementation

@SupportedPlatforms(
  platforms: [
    AndroidPlatform(
      apiName: 'WebViewClient.onReceivedHttpError',
      apiUrl:
          'https://developer.android.com/reference/android/webkit/WebViewClient#onReceivedHttpError(android.webkit.WebView,%20android.webkit.WebResourceRequest,%20android.webkit.WebResourceResponse)',
      available: '23',
    ),
    IOSPlatform(
      apiName: 'WKNavigationDelegate.webView',
      apiUrl:
          'https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455643-webview',
    ),
    MacOSPlatform(
      apiName: 'WKNavigationDelegate.webView',
      apiUrl:
          'https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455643-webview',
    ),
    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-failed',
      apiUrl:
          'https://wpewebkit.org/reference/stable/wpe-webkit-2.0/signal.WebView.load-failed.html',
      note:
          'HTTP errors are detected during the load-failed signal handling.',
    ),
  ],
)
final void Function(
  T controller,
  WebResourceRequest request,
  WebResourceResponse errorResponse,
)?
onReceivedHttpError;