Skip to main content

Function: setPrompt()

function setPrompt(promptFunction?): void;

Defined in: packages/blockly/core/dialog.ts:137

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.

Parameters​

ParameterTypeDefault valueDescription
promptFunction(message, defaultValue, callback) => voiddefaultPromptThe function to be run, or undefined to restore the default implementation.

Returns​

void

See​

Blockly.dialog.prompt