mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-19 18:27:29 -05:00
* Updated polyscript to bring in latest MicroPython * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
35 lines
1.2 KiB
HTML
35 lines
1.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
|
<title>PyScript Custom Package</title>
|
|
<style>
|
|
body {
|
|
font-family: system-ui, sans-serif;
|
|
}
|
|
</style>
|
|
<script>
|
|
const track = ({ detail }) => {
|
|
if (/^(Loading|Loaded)/.test(detail)) {
|
|
const state = RegExp.$1;
|
|
const what = detail.slice(state.length + 1);
|
|
if (state === 'Loading') console.time(what);
|
|
else console.timeEnd(what);
|
|
}
|
|
};
|
|
addEventListener("py:progress", track);
|
|
addEventListener("mpy:progress", track);
|
|
</script>
|
|
<!-- PyScript (locally) -->
|
|
<link rel="stylesheet" href="../../../dist/core.css">
|
|
<script type="module" src="../../../dist/core.js"></script>
|
|
</head>
|
|
<body>
|
|
<div>loading ...</div>
|
|
<script type="py" config="./package.toml">
|
|
import custom_package
|
|
</script>
|
|
</body>
|
|
</html>
|