Table of Contents
WebView.Close Method 

Closes this WebView.

Syntax
 public void Close(
   bool force
);

Parameters

force
Set to true to force close.
Remarks

The following sequence of events happens after Close is called:

  • The current page's onbeforeunload handler is called. If this handler returns a string, then event JSDialog is fired with DialogType set to JSDialogType.BeforeUnload;
  • Inside the handler, you may display your custom message box and call JSDialogEventArgs.OK to proceed closing this WebView, or JSDialogEventArgs.Cancel to cancel the operation. If you do not call either, the default unload message box is displayed;
  • If closing is confirmed in the step above, the WebView is destroyed and Closed event is fired;

See Also