[next] Bring in the good old PyScript display (#1628)

This commit is contained in:
Andrea Giammarchi
2023-08-09 16:28:06 +02:00
committed by GitHub
parent 27c91e9703
commit 84dcde188b
10 changed files with 209 additions and 26 deletions

View File

@@ -6,10 +6,6 @@
<title>PyScript Next</title>
<link rel="stylesheet" href="../core.css" />
<!-- the worker attribute -->
<script type="module" src="../core.js"></script>
<script type="py" worker="./worker.py" config="./config.json"></script>
<!-- the PyWorker approach -->
<script type="module">
import { PyWorker } from '../core.js';
@@ -17,8 +13,12 @@
// the type is overwritten as "pyodide" in PyScript as the module
// lives in that env too
</script>
<!-- the worker attribute -->
<script type="py" worker="./worker.py" config="./config.json"></script>
<!-- this is only to test the non-blocking behavior -->
<script>
// this is only to test non-blocking nature/bootstrap
addEventListener('DOMContentLoaded', () => {
const div = document.body.appendChild(
document.createElement('div')
@@ -31,4 +31,7 @@
});
</script>
</head>
<body>
<div id="test"></div>
</body>
</html>