WebViewNavigator

@Stable()
class WebViewNavigator(coroutineScope: CoroutineScope)

Allows control over the navigation of a WebView from outside the composable. E.g. for performing a back navigation in response to the user clicking the "up" button in a TopAppBar.

See also

Constructors

WebViewNavigator
Link copied to clipboard
fun WebViewNavigator(coroutineScope: CoroutineScope)

Functions

navigateBack
Link copied to clipboard
fun navigateBack()
Navigates the webview back to the previous page.
navigateForward
Link copied to clipboard
fun navigateForward()
Navigates the webview forward after going back from a page.
reload
Link copied to clipboard
fun reload()
Reloads the current page in the webview.
stopLoading
Link copied to clipboard
fun stopLoading()
Stops the current page load (if one is loading).

Properties

canGoBack
Link copied to clipboard
var canGoBack: Boolean
True when the web view is able to navigate backwards, false otherwise.
canGoForward
Link copied to clipboard
var canGoForward: Boolean
True when the web view is able to navigate forwards, false otherwise.