Skip to content

Commit

Permalink
Main call shouldn't use async statement
Browse files Browse the repository at this point in the history
  • Loading branch information
berinhard committed Nov 1, 2021
1 parent 7f33220 commit f6c8536
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions pyp5js/http/templates/view_sketch.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@

<script src="/static/js/p5/p5.js"></script>
{% if live_run %}
<script src="/static/js/pyodide/pyodide_v0.18.1.js" async></script>
<script src="/static/js/pyodide/pyodide_v0.18.1.js"></script>
{% endif %}
{% endblock %}

Expand Down Expand Up @@ -171,7 +171,6 @@
{% endif %}
}
}

});
</script>

Expand Down
5 changes: 2 additions & 3 deletions pyp5js/templates/pyodide/target_sketch.js.template
Original file line number Diff line number Diff line change
Expand Up @@ -1692,6 +1692,5 @@ async function main() {
runCode();
};

document.addEventListener('DOMContentLoaded', async function() {
await main()
}, false);
// async method
main();

0 comments on commit f6c8536

Please sign in to comment.