Interface CefriumBrowser.JsDialogHandler
- Enclosing class:
CefriumBrowser
public static interface CefriumBrowser.JsDialogHandler
Handles page JS dialogs (alert/confirm/prompt). Return true if handled
(you MUST call the callback); return false to use the default Android
AlertDialog. Without a handler set, the default AlertDialog is shown.
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanonBeforeUnloadDialog(String message, boolean isReload, CefriumBrowser.JsDialogCallback callback) Abeforeunload"Leave site?" prompt for a dirty form.default voidA JS dialog was closed.default voidThe dialog state was reset (e.g.booleanonJsDialog(int type, String message, String defaultPromptText, CefriumBrowser.JsDialogCallback callback)
-
Method Details
-
onJsDialog
boolean onJsDialog(int type, String message, String defaultPromptText, CefriumBrowser.JsDialogCallback callback) -
onBeforeUnloadDialog
default boolean onBeforeUnloadDialog(String message, boolean isReload, CefriumBrowser.JsDialogCallback callback) Abeforeunload"Leave site?" prompt for a dirty form. Return true if handled (you MUST call the callback: success = leave). Default returns false (the load proceeds).userInputis unused. -
onDialogResetState
default void onDialogResetState()The dialog state was reset (e.g. before a new navigation). -
onDialogClosed
default void onDialogClosed()A JS dialog was closed.
-