onContentLoading property

  1. @SupportedPlatforms.new(platforms: [WindowsPlatform(apiName: 'ICoreWebView2.add_ContentLoading', apiUrl: 'https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2?view=webview2-1.0.2210.55#add_contentloading')])
void Function(T controller, WebUri? url)? onContentLoading
final

Called when the WebView is about to load content for the current navigation.

This fires before any content is loaded (including scripts added with addScriptToExecuteOnDocumentCreated), after onLoadStart and before onDOMContentLoaded.

This event does not fire for same-page navigations such as fragment changes or history.pushState.

url represents the URL corresponding to the page navigation that triggered this callback.

Officially Supported Platforms/Implementations:

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: [
    WindowsPlatform(
      apiName: 'ICoreWebView2.add_ContentLoading',
      apiUrl:
          'https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2?view=webview2-1.0.2210.55#add_contentloading',
    ),
  ],
)
final void Function(T controller, WebUri? url)? onContentLoading;