mirror of
https://github.com/google/blockly.git
synced 2026-01-04 23:50:12 +01:00
Add STATEMENT_SUFFIX
Also remove need to manually indent INFINITE_LOOP_TRAP. This is a breaking change for Python users of this property. However, very few users of this property exist, given that the existing code breaks if the block ID has a $ in it (also fixed in this PR).
This commit is contained in:
@@ -516,7 +516,7 @@ Code.initLanguage = function() {
|
||||
* Just a quick and dirty eval. Catch infinite loops.
|
||||
*/
|
||||
Code.runJS = function() {
|
||||
Blockly.JavaScript.INFINITE_LOOP_TRAP = ' checkTimeout();\n';
|
||||
Blockly.JavaScript.INFINITE_LOOP_TRAP = 'checkTimeout();\n';
|
||||
var timeouts = 0;
|
||||
var checkTimeout = function() {
|
||||
if (timeouts++ > 1000000) {
|
||||
|
||||
Reference in New Issue
Block a user