onUpdateVisitedHistory method
- @SupportedPlatforms.new(platforms: [AndroidPlatform(apiName: 'WebViewClient.doUpdateVisitedHistory', apiUrl: 'https://developer.android.com/reference/android/webkit/WebViewClient#doUpdateVisitedHistory(android.webkit.WebView,%20java.lang.String,%20boolean)'), IOSPlatform(), MacOSPlatform(), WindowsPlatform(apiName: 'ICoreWebView2.add_HistoryChanged', apiUrl: 'https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2?view=webview2-1.0.2210.55#add_historychanged')])
Event fired when the host application updates its visited links database.
This event is also fired when the navigation state of the WebView changes through the usage of
javascript History API functions (pushState(), replaceState()) and onpopstate event
or, also, when the javascript window.location changes without reloading the webview (for example appending or modifying a hash to the url).
url represents the url being visited.
isReload indicates if this url is being reloaded.
Officially Supported Platforms/Implementations:
- Android WebView (Official API - WebViewClient.doUpdateVisitedHistory)
- iOS WKWebView
- macOS WKWebView
- Windows WebView2 (Official API - ICoreWebView2.add_HistoryChanged)
Parameters - Officially Supported Platforms/Implementations:
url: all platformsisReload:- Android WebView
Use the PlatformInAppBrowserEvents.isMethodSupported method to check if this method is supported at runtime.
Implementation
@SupportedPlatforms(
platforms: [
AndroidPlatform(
apiName: 'WebViewClient.doUpdateVisitedHistory',
apiUrl:
'https://developer.android.com/reference/android/webkit/WebViewClient#doUpdateVisitedHistory(android.webkit.WebView,%20java.lang.String,%20boolean)',
),
IOSPlatform(),
MacOSPlatform(),
WindowsPlatform(
apiName: 'ICoreWebView2.add_HistoryChanged',
apiUrl:
'https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2?view=webview2-1.0.2210.55#add_historychanged',
),
],
)
void onUpdateVisitedHistory(
WebUri? url,
@SupportedPlatforms(platforms: [AndroidPlatform()]) bool? isReload,
) {}