Dela via


WebChromeClient.OnCloseWindow(WebView) Method

Definition

Notify the host application to close the given WebView and remove it from the view system if necessary.

[Android.Runtime.Register("onCloseWindow", "(Landroid/webkit/WebView;)V", "GetOnCloseWindow_Landroid_webkit_WebView_Handler")]
public virtual void OnCloseWindow (Android.Webkit.WebView? window);
[<Android.Runtime.Register("onCloseWindow", "(Landroid/webkit/WebView;)V", "GetOnCloseWindow_Landroid_webkit_WebView_Handler")>]
abstract member OnCloseWindow : Android.Webkit.WebView -> unit
override this.OnCloseWindow : Android.Webkit.WebView -> unit

Parameters

window
WebView

The WebView that needs to be closed.

Attributes

Remarks

Notify the host application to close the given WebView and remove it from the view system if necessary. At this point, WebCore has stopped any loading in this window and has removed any cross-scripting ability in javascript.

As with #onCreateWindow, the application should ensure that any URL or security indicator displayed is updated so that the user can tell that the page they were interacting with has been closed.

Java documentation for android.webkit.WebChromeClient.onCloseWindow(android.webkit.WebView).

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.

Applies to