TWSViewState

class TWSViewState(webContent: WebContent)

A state holder to hold the state for the WebView.

NOTE: This class is a modified version of the original Accompanist WebView state holder. Modifications made include:

  • Added custom error tracking with customErrorsForCurrentRequest.

  • Removed some of the properties that were unused in our implementation.

Constructors

Link copied to clipboard
constructor(webContent: WebContent)

Properties

Link copied to clipboard

The content being loaded by the WebView

Link copied to clipboard

The URL of the most recently visited page in the browsing history. This is updated as the user navigates, including when a page is reloaded. Used in Single Page Applications (SPA) to reflect URL changes.

Link copied to clipboard

A list for errors captured in the last load. Reset when a new page is loaded. Errors could be only from the main page.

Link copied to clipboard

The URL of the initial page that started loading.

Link copied to clipboard

The URL of the last page that started loading. This is updated when a new page load begins.

Link copied to clipboard

Whether the WebView is currently loading resources and loading its main frame (along with progress). See TWSLoadingState

Link copied to clipboard

The title received from the loaded content of the current page

Link copied to clipboard

The saved view state from when the view was destroyed last. To restore state, use the navigator and only call loadUrl if the bundle is null.

Link copied to clipboard
Link copied to clipboard

A list for errors captured in the last load. Reset when a new page is loaded. Errors could be from any resource (iframe, image, etc.), not just for the main page.