onUpdateVisitedHistory property
- @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(), WebPlatform(), 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'), LinuxPlatform(note: 'Tracked via load-changed signal and History API JavaScript events.')], parameterPlatforms: {'isReload' : [AndroidPlatform()]})
final
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
- Web <iframe> but requires same origin
- Windows WebView2 (Official API - ICoreWebView2.add_HistoryChanged)
- Linux WPE WebKit:
- Tracked via load-changed signal and History API JavaScript events.
Parameters - Officially Supported Platforms/Implementations:
url: all platformsisReload:- Android WebView
Use the PlatformWebViewCreationParams.isPropertySupported method to check if this property 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(),
WebPlatform(),
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',
),
LinuxPlatform(
note:
'Tracked via load-changed signal and History API JavaScript events.',
),
],
parameterPlatforms: {
'isReload': [AndroidPlatform()],
},
)
final void Function(T controller, WebUri? url, bool? isReload)?
onUpdateVisitedHistory;