Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -7,17 +7,16 @@ load_js="""src='https://cdn.jsdelivr.net/npm/phaser@3.11.0/dist/phaser.js'
|
|
7 |
game_js="""
|
8 |
|
9 |
|
10 |
-
const script = document.createElement("script");
|
11 |
-
script.onload = () => console.log("module loaded") ;
|
12 |
-
script.type="module";
|
13 |
-
script.src = "https://cdn.jsdelivr.net/npm/phaser@3.11.0/dist/phaser.js";
|
14 |
-
document.head.appendChild(script)
|
15 |
-
|
16 |
async () => {
|
17 |
// set testFn() function on globalThis, so you html onlclick can access it
|
18 |
globalThis.testFn = () => {
|
19 |
|
20 |
-
|
|
|
|
|
|
|
|
|
|
|
21 |
var config = {
|
22 |
type: Phaser.AUTO,
|
23 |
width: 800,
|
|
|
7 |
game_js="""
|
8 |
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
async () => {
|
11 |
// set testFn() function on globalThis, so you html onlclick can access it
|
12 |
globalThis.testFn = () => {
|
13 |
|
14 |
+
const script = document.createElement("script");
|
15 |
+
script.onload = () => console.log("module loaded") ;
|
16 |
+
script.type="module";
|
17 |
+
script.src = "https://cdn.jsdelivr.net/npm/phaser@3.11.0/dist/phaser.js";
|
18 |
+
document.head.appendChild(script)
|
19 |
+
|
20 |
var config = {
|
21 |
type: Phaser.AUTO,
|
22 |
width: 800,
|