Skip to content

Commit 08d5497

Browse files
provide callbacks
1 parent 3c1df60 commit 08d5497

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

index.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<style>
88
.flex {
99
display: flex;
10+
flex: 1;
1011
}
1112

1213
.flex.row {
@@ -30,7 +31,7 @@
3031

3132
<body>
3233
<h1>Schemascii Playground</h1>
33-
<div class="flex row" style="width: 100%">
34+
<div class="flex row">
3435
<div class="flex column">
3536
<div class="flex row">
3637
<p style="flex: 1">Schemascii Source</p>
@@ -59,13 +60,14 @@ <h1>Schemascii Playground</h1>
5960
try {
6061
info("Loading Python... ");
6162
pyodide = await loadPyodide({ stdout: info, stderr: error });
62-
info("done\nINstalling micropip...");
63-
await pyodide.loadPackage("micropip");
63+
info("done\nInstalling micropip...");
64+
await pyodide.loadPackage("micropip", { errorCallback: error, messgaeCallback: info });
6465
info("done\nFetching current Schemascii version... ");
6566
var pyproject_toml = await fetch("pyproject.toml").then(x => x.text());
6667
var ver = /version = "([\d.]+)"/.exec(pyproject_toml)[1];
6768
info(`${ver}\nInstalling schemascii-${ver} ... `);
68-
await pyodide.pyimport("micropip").install(`https://dragoncoder047.github.io/schemascii/dist/schemascii-${ver}-py3-none-any.whl`);
69+
await pyodide.pyimport("micropip", { errorCallback: error, messgaeCallback: info })
70+
.install(`https://dragoncoder047.github.io/schemascii/dist/schemascii-${ver}-py3-none-any.whl`);
6971
schemascii = pyodide.pyimport("schemascii");
7072
await setup();
7173
console.textContent = "ready\n";

0 commit comments

Comments
 (0)