WebViewRequest

sealed interface WebViewRequest<T>

Use this to access the webview from the extension. There are 3 types of requests:

  • Headers - Used to intercept requests made by the webview and get the headers

  • Cookie - Used to get the cookies stored in the webview

  • Evaluate - Used to evaluate javascript in the webview

The extension can implement all of the sub-interfaces, and the onStop methods will be called in this order of Headers, Cookie, Evaluate.

The initialUrl is the URL to be loaded in the webview. The stopUrlRegex is the regex to match the URL when the request is assumed to be complete.

Inheritors

Types

Link copied to clipboard
interface Cookie<T> : WebViewRequest<T>

If you want to get the cookies stored in the webview, use this.

Link copied to clipboard
interface Evaluate<T> : WebViewRequest<T>

If you want to evaluate javascript in the webview, use this.

Link copied to clipboard
interface Headers<T> : WebViewRequest<T>

If you want to get the headers from all requests made by the webview, use this.

Properties

Link copied to clipboard
open val dontCache: Boolean

If you want to disable caching of the webview data, set this to true.

Link copied to clipboard

The initial URL to be loaded in the webview.

Link copied to clipboard
open val maxTimeout: Long

The maximum time to wait for data to be returned from the webview. This is in milliseconds.

Link copied to clipboard
abstract val stopUrlRegex: <Error class: unknown class>

The regex to match the URL when the request is assumed to be complete. Checks on all requests made by the webview.