Move alert/confirm/prompt to a new file, dialog.js (#5457)

* Migrate prompt/alert/confirm to dedicated module

* Update core/blockly.js to pass through calls to prompt/alert/confirm to core/dialog.js

* Update calls to Blockly.prompt/alert/confirm to dialog.prompt/alert/confirm

* Fix typo and errant redeclaration of Blockly.prompt

* Clarify JSDoc on customizing Blockly.dialog.alert/confirm/prompt
This commit is contained in:
Aaron Dodson
2021-09-14 08:19:53 -07:00
committed by GitHub
parent ff9320f8d9
commit ce8e7921a2
12 changed files with 174 additions and 60 deletions

View File

@@ -375,7 +375,7 @@ Code.checkAllGeneratorFunctionsDefined = function(generator) {
if (!valid) {
var msg = 'The generator code for the following blocks not specified for ' +
generator.name_ + ':\n - ' + missingBlockGenerators.join('\n - ');
Blockly.alert(msg); // Assuming synchronous. No callback.
Blockly.dialog.alert(msg); // Assuming synchronous. No callback.
}
return valid;
};