Skip to content

Commit ae2fafa

Browse files
committed
Minor edits.
1 parent 7f57512 commit ae2fafa

File tree

1 file changed

+22
-13
lines changed

1 file changed

+22
-13
lines changed

docs/faq.md

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -684,19 +684,28 @@ done"` message is written to the browser's console.
684684

685685
#### m/py:progress
686686

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/).
700709

701710
### Packaging pointers
702711

0 commit comments

Comments
 (0)