Open AnmAtAnm opened 7 years ago
Would this mean for example you could eventually run the blocks "live" and therefore highlight the current block as you step through the code?
In context of BlockFactory this just means providing a bit of protection if you load someone else's blocks. The JS-Interpreter can be used to do block highlighting in apps that use Blockly, and this is how it's used in Blockly Games.
Ah ok missed the block factory part. Got excited with ideas - thanks for clearing that up.
@starfishmod Stay excited! Check out this demo of the stepping behavior you suggested: https://blockly-demo.appspot.com/static/demos/interpreter/step-execution.html
That's awesome and exactly what I was thinking about - It's like having a built in debugger :) Actually I wonder if you could add breakpoints and then step through the code? :)
Great work! I'm going to have a play with this tonight
On 15 August 2017 at 03:26, Andrew n marshall notifications@github.com wrote:
@starfishmod https://github.com/starfishmod Stay excited. Check out this demo of the stepping behavior you suggested: https://blockly-demo.appspot.com/static/demos/interpreter/ step-execution.html
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/google/blockly/issues/1269#issuecomment-322253604, or mute the thread https://github.com/notifications/unsubscribe-auth/AAs6k6zMzYEYeHjUcpNq6wVy_mFk8KE6ks5sYINHgaJpZM4OxUQH .
-- Regards
Andrew
BlockFactory supports inputting JavaScript block definitions into the UI via the "Manual JavaScript" setting, but currently the code is
eval()
ed to realize the preview block. Replace the raweval()
usage with JS-Interpreter to avoid running arbitrary code in the context of the rest of BlockFactory.PR #1235 only enables the "Manual JavaScript" option when running in a
file://
URL context.