diff --git a/pyp5js/templates/pyodide/target_sketch.js.template b/pyp5js/templates/pyodide/target_sketch.js.template index ff87ebc9..6d45b7d9 100644 --- a/pyp5js/templates/pyodide/target_sketch.js.template +++ b/pyp5js/templates/pyodide/target_sketch.js.template @@ -1659,7 +1659,7 @@ async function main() { print(sys.version) `)); window.runSketchCode = (code) => { - userCode = code; + let userCode = code; runCode(); } diff --git a/pyp5js/templates/transcrypt/target_sketch.py.template b/pyp5js/templates/transcrypt/target_sketch.py.template index 9a538c0a..18c9ae38 100644 --- a/pyp5js/templates/transcrypt/target_sketch.py.template +++ b/pyp5js/templates/transcrypt/target_sketch.py.template @@ -28,6 +28,7 @@ windowResized = None {{ sketch_content }} +# TODO deprecate event_functions dict event_functions = { "deviceMoved": deviceMoved, "deviceTurned": deviceTurned,