mirror of
https://github.com/pyscript/pyscript.git
synced 2026-02-13 16:00:37 -05:00
committed by
GitHub
parent
d7084f7f55
commit
30c6c830ae
19
pyscript.core/test/code-a-part.html
Normal file
19
pyscript.core/test/code-a-part.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="stylesheet" href="../dist/core.css">
|
||||
<script type="module">
|
||||
import { hooks } from "../dist/core.js";
|
||||
hooks.main.codeBeforeRun.add('print(0)');
|
||||
hooks.main.codeAfterRun.add('print(2)');
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="py">
|
||||
# raise an error instead to see it on line 1
|
||||
print(1)
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user