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
+22-13Lines changed: 22 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -684,19 +684,28 @@ done"` message is written to the browser's console.
684
684
685
685
#### m/py:progress
686
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/
687
+
The `py:progress` or `mpy:progress` event triggers on the main thread *during*
688
+
interpreter bootstrap (no matter if your code is running on main or in a
689
+
worker).
690
+
691
+
The received `event.detail` is a string that indicates operations between
692
+
`Loading {what}` and `Loaded {what}`. So, the first event would be, for
693
+
example, `Loading Pyodide` and the last one per each bootstrap would be
694
+
`Loaded Pyodide`.
695
+
696
+
In between all operations are `event.detail`s, such as:
697
+
698
+
*`Loading files` and `Loaded files`, when `[files]` is found in the optional
699
+
config
700
+
*`Loading fetch` and `Loaded fetch`, when `[fetch]` is found in the optional
701
+
config
702
+
*`Loading JS modules` and `Loaded JS modules`, when `[js_modules.main]` or
703
+
`[js_modules.worker]` is found in the optional config
704
+
* finally, all optional packages handled via *micropip* or *mip* will also
705
+
trigger various `Loading ...` and `Loaded ...` events so that users can see
706
+
what is going on while PyScript is bootstrapping
707
+
708
+
An example of this listener applied to a dialog can be [found in here](https://agiammarchi.pyscriptapps.com/kmeans-in-panel-copy/v1/).
0 commit comments