mirror of
https://github.com/pyscript/pyscript.git
synced 2026-02-18 04:01:10 -05:00
@pyscript/core deprecation (#1607)
This commit is contained in:
committed by
GitHub
parent
f0e69cbc36
commit
26e7a54f1f
@@ -1,28 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
||||
</head>
|
||||
<body>
|
||||
<div>See console ➡️</div>
|
||||
<script type="micropython">
|
||||
from xworker import XWorker
|
||||
|
||||
def handle_error(event):
|
||||
print("Python")
|
||||
print(event.data.message)
|
||||
|
||||
w = XWorker('./error.py')
|
||||
w.onerror = handle_error
|
||||
</script>
|
||||
<script type="module">
|
||||
import { XWorker } from "../core.js";
|
||||
|
||||
const w = new XWorker("./error.py", { type: "micropython" });
|
||||
w.onerror = ({ data: error }) => {
|
||||
console.log('JS', error);
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user