-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathmodules.html
More file actions
60 lines (47 loc) · 1.88 KB
/
modules.html
File metadata and controls
60 lines (47 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Polyscript JS Modules</title>
<style>#main-map, #worker-map { height: 320px; } h3 { margin-bottom: 0; }</style>
<script type="module" src="../dist/index.js"></script>
</head>
<body>
<h3>Main</h3>
<script type="micropython" config="./modules.toml">
from polyscript.js_modules import random_js
print(random_js.default)
from polyscript import js_modules
print(js_modules.random_js.default)
from polyscript.js_modules.random_js import default as value
print(value)
</script>
<script type="pyodide" config="./modules.toml">
from polyscript.js_modules import random_js
print(random_js.default)
from polyscript import js_modules
print(js_modules.random_js.default)
from polyscript.js_modules.random_js import default as value
print(value)
</script>
<hr>
<h3>Worker</h3>
<script type="micropython" config="./modules.toml" worker>
from polyscript.js_modules import random_js
print(random_js.default)
from polyscript import js_modules
print(js_modules.random_js.default)
from polyscript.js_modules.random_js import default as value
print(value)
</script>
<script type="pyodide" config="./modules.toml" worker>
from polyscript.js_modules import random_js
print(random_js.default)
from polyscript import js_modules
print(js_modules.random_js.default)
from polyscript.js_modules.random_js import default as value
print(value)
</script>
</body>
</html>