ShouldOverrideUrlLoadingEvent

Give the host application a chance to take control when a URL is about to be loaded in the current WebView. If a WebViewClient is not provided, by default WebView will ask Activity Manager to choose the proper handler for the URL. If a WebViewClient is provided, returning true causes the current WebView to abort loading the URL, while returning false causes the WebView to continue loading the URL as usual.

Note: Do not call WebView.loadUrl with the request's URL and then return true. This unnecessarily cancels the current load and starts a new load with the same URL. The correct way to continue loading a given URL is to simply return false, without calling WebView.loadUrl.

Note: This method is not called for POST requests.

Note: This method may be called for subframes and with non-HTTP(S) schemes; calling WebView.loadUrl with such a URL will fail.

Constructors

Link copied to clipboard
constructor(view: WebView, request: WebResourceRequest)

Properties

Link copied to clipboard
Link copied to clipboard

Object containing the details of the request.

Link copied to clipboard

The WebView that is initiating the callback.

Functions

Link copied to clipboard