mo4islona / node-blockly

Blockly for Node.js and Browser via CommonJS module
133 stars 81 forks source link

Update to latest blockly and fix global references #7

Closed benjie closed 7 years ago

benjie commented 7 years ago

This PR is identical to #6 (please read the comments there first) except it has an additional commit giving blockly access to the global scope.

Though trying to guard global is a noble aim, Blockly really wants access to global. There's a whole load of stuff it accesses off of it including eval, setTimeout, atob, JSON etc. We can try and pass each of these through on the that object but I think it'll be a losing battle. I think just giving it access to global directly would be best, so this last commit does that and recompiles.