mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-22 03:35:31 -05:00
Breaking: new Polyscript Hooks mechanism (#1811)
* Breaking: new Polyscript Hooks mechanism * Added proper smoke test
This commit is contained in:
committed by
GitHub
parent
28d37cdead
commit
e67eb06d8b
@@ -1,9 +1,9 @@
|
||||
// PyScript Error Plugin
|
||||
import { hooks } from "../core.js";
|
||||
|
||||
hooks.onInterpreterReady.add(function override(pyScript) {
|
||||
hooks.main.onReady.add(function override(pyScript) {
|
||||
// be sure this override happens only once
|
||||
hooks.onInterpreterReady.delete(override);
|
||||
hooks.main.onReady.delete(override);
|
||||
|
||||
// trap generic `stderr` to propagate to it regardless
|
||||
const { stderr } = pyScript.io;
|
||||
|
||||
Reference in New Issue
Block a user