dialog namespace
Functions
Function | Description |
|---|---|
Wrapper to window.alert() that app developers may override via setAlert to provide alternatives to the modal browser window. | |
Wrapper to window.confirm() that app developers may override via setConfirm to provide alternatives to the modal browser window. | |
Wrapper to window.prompt() that app developers may override via setPrompt to provide alternatives to the modal browser window. Built-in browser prompts are often used for better text input experience on mobile device. We strongly recommend testing mobile when overriding this. | |
Sets the function to be run when Blockly.dialog.alert() is called. | |
Sets the function to be run when Blockly.dialog.confirm() is called. | |
Sets the function to be run when Blockly.dialog.prompt() is called. **Important**: When overridding this, be aware that non-native prompt experiences may require managing ephemeral focus in FocusManager. This isn't needed for the native window prompt because it prevents focus from being changed while open. | |
Sets the function to be run when Blockly.dialog.toast() is called. | |
Displays a temporary notification atop the workspace. Blockly provides a default toast implementation, but developers may provide their own via setToast. For simple appearance customization, CSS should be sufficient. |