mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-21 03:05:38 -05:00
Fixed issues around XWorker context (#1556)
This commit is contained in:
committed by
GitHub
parent
f6dfc5361e
commit
3b7099cd3d
@@ -8,10 +8,14 @@
|
||||
<script type="module">
|
||||
// how would PyScript plugins add their own behavior?
|
||||
import { hooks } from "@pyscript/element";
|
||||
|
||||
let counter = 0;
|
||||
hooks.onBeforeRun.add((pyodide, { localName }) => {
|
||||
// console.log(++counter, 'elements so far', localName, pyodide);
|
||||
});
|
||||
|
||||
hooks.codeBeforeRunWorker.add('print("codeBeforeRunWorker")');
|
||||
hooks.codeAfterRunWorker.add('print("codeAfterRunWorker")');
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Reference in New Issue
Block a user