public interface CefJSDialogHandler
| 限定符和类型 | 接口和说明 |
|---|---|
static class |
CefJSDialogHandler.JSDialogType
Supported JavaScript dialog types.
支持的JavaScript对话框类型。 |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
onBeforeUnloadDialog(CefBrowser browser, java.lang.String message_text, boolean is_reload, CefJSDialogCallback callback)
Called to run a dialog asking the user if they want to leave a page.
被调用以运行一个对话框,询问用户是否要离开页面。 |
void |
onDialogClosed(CefBrowser browser)
Called when the default implementation dialog is closed.
关闭默认实现对话框时调用。 |
boolean |
onJSDialog(CefBrowser browser, java.lang.String origin_url, CefJSDialogHandler.JSDialogType dialog_type, java.lang.String message_text, java.lang.String default_prompt_text, CefJSDialogCallback callback, BoolRef suppress_message)
Called to run a JavaScript dialog.
被叫运行JavaScript对话框。 |
void |
onResetDialogState(CefBrowser browser)
Called to cancel any pending dialogs and reset any saved dialog state.
调用取消任何挂起的对话框并重置任何已保存的对话框状态。 |
boolean onBeforeUnloadDialog(CefBrowser browser, java.lang.String message_text, boolean is_reload, CefJSDialogCallback callback)
browser - The corresponding browser.
- 相应的浏览器。
message_text - The text to be displayed.
- 要显示的文本。
is_reload - true if the page is reloaded.
- 如果重新加载页面,则为true。
callback - execute callback once the custom dialog is dismissed.
- 解除自定义对话框后执行回调。
void onDialogClosed(CefBrowser browser)
boolean onJSDialog(CefBrowser browser, java.lang.String origin_url, CefJSDialogHandler.JSDialogType dialog_type, java.lang.String message_text, java.lang.String default_prompt_text, CefJSDialogCallback callback, BoolRef suppress_message)
browser - The corresponding browser.
- 相应的浏览器。
origin_url - The originating url.
- 原始网址。
dialog_type - the dialog type.
- 对话框类型。
message_text - the text to be displayed.
- 要显示的文本。
default_prompt_text - value will be specified for prompt dialogs only.
- 仅为提示对话框指定值。
callback - execute callback once the custom dialog is dismissed.
- 解除自定义对话框后执行回调。
suppress_message - set to true to suppress displaying the message.
- 设置为true以禁止显示消息。
void onResetDialogState(CefBrowser browser)