JsDialogHandlerOnBeforeUnloadDialog Method |
Version 130.1.90
Called to run a dialog asking the user if they want to leave a page. Return false to use the default dialog implementation.
Return true if the application will use a custom dialog or if the callback has been executed immediately.
Custom dialogs may be either modal or modeless. If a custom dialog is used the application must execute callback
once the custom dialog is dismissed.
Namespace: CefSharp.HandlerAssembly: CefSharp (in CefSharp.dll) Version: 129.0.110.0 (129.0.110.0)
Syntax protected virtual bool OnBeforeUnloadDialog(
IWebBrowser chromiumWebBrowser,
IBrowser browser,
string messageText,
bool isReload,
IJsDialogCallback callback
)
protected:
virtual bool OnBeforeUnloadDialog(
IWebBrowser^ chromiumWebBrowser,
IBrowser^ browser,
String^ messageText,
bool isReload,
IJsDialogCallback^ callback
)
Parameters
- chromiumWebBrowser IWebBrowser
- the ChromiumWebBrowser control
- browser IBrowser
- the browser object
- messageText String
- message text (optional)
- isReload Boolean
- indicates a page reload
- callback IJsDialogCallback
- Callback can be executed inline or in an async fashion
Return Value
BooleanReturn false to use the default dialog implementation otherwise return true to handle with your own custom implementation.
See Also