mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-19 18:27:29 -05:00
[next] Add mpy as custom type with PyScript magic attached (#1728)
This commit is contained in:
committed by
GitHub
parent
8f3c36deea
commit
ad0dde3f17
23
pyscript.core/test/mpy.html
Normal file
23
pyscript.core/test/mpy.html
Normal file
@@ -0,0 +1,23 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>PyScript Next</title>
|
||||
<script>
|
||||
addEventListener("mpy:ready", console.log);
|
||||
</script>
|
||||
<link rel="stylesheet" href="../dist/core.css">
|
||||
<script type="module" src="../dist/core.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="mpy">
|
||||
from pyscript import display
|
||||
display("Hello", "M-PyScript Next", append=False)
|
||||
</script>
|
||||
<mpy-script worker>
|
||||
from pyscript import display
|
||||
display("Hello", "M-PyScript Next Worker", append=False)
|
||||
</mpy-script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user