Android.Webkit.WebChromeClient.OnJsBeforeUnload Method
Tell the client to display a dialog to confirm navigation away from the current page.

Syntax

[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 (WebView view, string url, string message, JsResult result)

Parameters

view
The WebView that initiated the callback.
url
The url of the page requesting the dialog.
message
Message to be displayed in the window.
result
A JsResult used to send the user's response to javascript.

Returns

Documentation for this section has not yet been entered.

Remarks

Tell the client to display a dialog to confirm navigation away from the current page. This is the result of the onbeforeunload javascript event. If the client returns true, WebView will assume that the client will handle the confirm dialog and call the appropriate JsResult method. If the client returns false, a default value of true will be returned to javascript to accept navigation away from the current page. The default behavior is to return false. Setting the JsResult to true will navigate away from the current page, false will cancel the navigation.

[Android Documentation]

Requirements

Namespace: Android.Webkit
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1