There's some hacky stuff going on but basically it's able to take the code that should have gone right after, and then put it inside a function() {...} block to delay it
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hi! You could try what we implement for the
delay
block: https://github.com/espruino/EspruinoWebIDE/blob/gh-pages/blockly/blockly_espruino.js#L442There's some hacky stuff going on but basically it's able to take the code that should have gone right after, and then put it inside a
function() {...}
block to delay it