WebChromeClient.OnJsBeforeUnload(WebView, String, String, JsResult) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Notify the host application that the web page wants to confirm navigation
from JavaScript onbeforeunload.
[Android.Runtime.Register("onJsBeforeUnload", "(Landroid/webkit/WebView;Ljava/lang/String;Ljava/lang/String;Landroid/webkit/JsResult;)Z", "GetOnJsBeforeUnload_Landroid_webkit_WebView_Ljava_lang_String_Ljava_lang_String_Landroid_webkit_JsResult_Handler")]
public virtual bool OnJsBeforeUnload (Android.Webkit.WebView? view, string? url, string? message, Android.Webkit.JsResult? result);
[<Android.Runtime.Register("onJsBeforeUnload", "(Landroid/webkit/WebView;Ljava/lang/String;Ljava/lang/String;Landroid/webkit/JsResult;)Z", "GetOnJsBeforeUnload_Landroid_webkit_WebView_Ljava_lang_String_Ljava_lang_String_Landroid_webkit_JsResult_Handler")>]
abstract member OnJsBeforeUnload : Android.Webkit.WebView * string * string * Android.Webkit.JsResult -> bool
override this.OnJsBeforeUnload : Android.Webkit.WebView * string * string * Android.Webkit.JsResult -> bool
Parameters
- view
- WebView
The WebView that initiated the callback.
- url
- String
The url of the page requesting the dialog.
- message
- String
Message to be displayed in the window.
- result
- JsResult
A JsResult used to send the user's response to javascript.
Returns
boolean true if the request is handled or ignored.
false if WebView needs to show the default dialog.
- Attributes
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.