Blockly allows for toolbox updates while still in use
workspace.updateToolbox(newTree)where 'newTree' is either a tree of nodes, or a string representation of the toolbox.
-> This could also be helpful with the eventHandler- and main game block, where we only want on block each.
Blockly allows for custom events which could be helpful e.g. for 'achievements' or maximum block sizes
function onFirstComment(event) {
if (event.type == Blockly.Events.CHANGE &&
event.element == 'comment' &&
!event.oldValue && event.newValue) {
alert('Congratulations on creating your first comment!')
workspace.removeChangeListener(onFirstComment);
}
}
workspace.addChangeListener(onFirstComment);aIt is also possible to save nested blocks with more advanced logic
