IJsDialogHandlerOnJSBeforeUnload Method |
Version 67.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:
CefSharp
Assembly:
CefSharp (in CefSharp.dll) Version: 67.0.0.0 (67.0.0.0)
Syntax bool OnJSBeforeUnload(
IWebBrowser chromiumWebBrowser,
IBrowser browser,
string message,
bool isReload,
IJsDialogCallback callback
)
bool OnJSBeforeUnload(
IWebBrowser^ chromiumWebBrowser,
IBrowser^ browser,
String^ message,
bool isReload,
IJsDialogCallback^ callback
)
Parameters
- chromiumWebBrowser
- Type: CefSharpIWebBrowser
the ChromiumWebBrowser 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