IJsDialogHandlerOnJSBeforeUnload Method |
Version 51.0.0
When leaving the page a Javascript dialog is displayed asking for user confirmation.
Returning True allows you to implement a custom dialog or programatically handle.
To cancel the unload return True and set allowUnload to False.
Namespace: CefSharpAssembly: CefSharp (in CefSharp.dll) Version: 51.0.0.0 (51.0.0.0)
Syntax bool OnJSBeforeUnload(
IWebBrowser browserControl,
IBrowser browser,
string message,
bool isReload,
IJsDialogCallback callback
)
bool OnJSBeforeUnload(
IWebBrowser^ browserControl,
IBrowser^ browser,
String^ message,
bool isReload,
IJsDialogCallback^ callback
)
Parameters
- browserControl
- Type: CefSharpIWebBrowser
the browser control - browser
- Type: CefSharpIBrowser
the browser object - message
- Type: SystemString
message (optional) - isReload
- Type: SystemBoolean
indicates a page reload - callback
- Type: CefSharpIJsDialogCallback
Callback can be executed inline or in an async fashion
Return Value
Type:
BooleanReturn false to use the default dialog implementation otherwise return true to handle
See Also