You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/faq.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -682,6 +682,22 @@ done"` message is written to the browser's console.
682
682
</script>
683
683
```
684
684
685
+
#### m/py:progress
686
+
687
+
The `py:progress` or `mpy:progress` event triggers on the main thread *during* interpreter bootstrap, being this either on *main* or *worker*.
688
+
689
+
Following previous work around progress events from *micropip*, the received `event.detail` will be a string that confine operations between `Loading {what}` and `Loaded {what}`, where the first event would hence be `Loading Pyodide` and the last one per each bootstrap would be `Loaded Pyodide`.
690
+
691
+
In between all operations will be forwarded as `event.detail`, such as:
692
+
693
+
*`Loading files` and `Loaded files`, when `[files]` is found in the optional config
694
+
*`Loading fetch` and `Loaded fetch`, when `[fetch]` is found in the optional config
695
+
*`Loading JS modules` and `Loaded JS modules`, when `[js_modules.main]` or `[js_modules.worker]`
696
+
is found in the optional config
697
+
* finally, all optional packages handled via *micropip* or *mip* will also trigger various `Loading ...` and `Loaded ...` events so that users can actually see what is going on while the *app* is bootstrapping
698
+
699
+
An example of this listener applied to a dialog cna be found in here: https://agiammarchi.pyscriptapps.com/kmeans-in-panel-copy/v1/
700
+
685
701
### Packaging pointers
686
702
687
703
Applications need third party packages and [PyScript can be configured to
0 commit comments