Files
pyscript/pyscript.sw/test/index.html
Andrea Giammarchi b5a0cd4057 [sw] Added a first version of the PyScript Service Worker (#1621)
* Added a first version of the PyScript Service Worker

* Fix typo as suggested

Co-authored-by: Fabio Pliger <fpliger@users.noreply.github.com>

---------

Co-authored-by: Fabio Pliger <fpliger@users.noreply.github.com>
2023-08-08 10:57:26 +02:00

22 lines
724 B
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<style>body { font-family: sans-serif; }</style>
<script src="../pyscript.sw.js" handler="./test.py" config="./test.toml"></script>
<script type="module">
// this is just to show some progress
const span = document.querySelector('span');
let i = 0;
(function dot() {
span.textContent = '.'.repeat(++i % 6);
setTimeout(dot, 300);
}());
</script>
</head>
<body>
Loading PyScript Service Worker <span></span>
</body>
</html>