mirror of
https://github.com/pyscript/pyscript.git
synced 2026-02-18 13:00:39 -05:00
[next] Bring in the good old PyScript display (#1628)
This commit is contained in:
committed by
GitHub
parent
27c91e9703
commit
84dcde188b
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user