Skip to content
This repository was archived by the owner on Sep 21, 2023. It is now read-only.

Commit 11736d0

Browse files
committed
Minor tidy-ups.
1 parent 3b3242b commit 11736d0

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,16 +105,16 @@ The story of PyScript's execution is roughly as follows:
105105
plugin registered a `py-plugin-registered` event is dispatched, containing
106106
the (potentially changed) `config`, and a reference to the newly registered
107107
plugin.
108-
3. When `py-runtime-loaded` is dispatched the `config` is frozen and two things
109-
happen:
108+
3. When `py-runtime-loaded` is dispatched two things happen:
110109
* The runtime is instantiated / started. Once complete the `py-runtime-ready`
111110
event is dispatched.
112-
* All registered plugins have their `start` function called.
111+
* All registered plugins have their `start` function called and a
112+
`py-plugin-started` event is dispatched for each plugin.
113113
4. When the `py-runtime-ready` event is dispatched all plugins have their
114114
`onRuntimeReady` function called with the `config` and `runtime` objects.
115115
5. Any plugins registered after the runtime is ready immediately have their
116116
`configure`, `start` and `onRuntimeReady` functions called, with the
117-
`py-plugin-registered` event being dispatched.
117+
`py-plugin-registered` and `py-plugin-started` events being dispatched.
118118

119119
That's it!
120120

@@ -227,7 +227,7 @@ Then in your HTML file:
227227
```
228228

229229
A good example of a plugin is the built-in plugin for the `<py-script>` tag
230-
found in `pyscript.js` (search for pyScriptTag).
230+
found in `pyscript.js` (search for the object assigned to `pyScriptTag`).
231231

232232
## Runtimes
233233

pyscript.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,17 @@ const main = function() {
3333
3434
* Keep the bare minimum of state.
3535
* Load and process any configuration from the page.
36-
* Provide a mechanism for PyScriptPlugin based plugins to be registered,
37-
configured and then started.
36+
* Provide a mechanism for plugins to be registered, configured and then
37+
started.
3838
* Load and start the Python runtime.
3939
* Dispatch the following events to signal various changes in state or the
4040
completion of tasks (such as starting the runtime).
4141
- "py-configured", when configuration is processed.
4242
- "py-plugin-registered", when a plugin is registered.
43+
- "py-plugin-started", when a plugin is started.
4344
- "py-runtime-loaded", when the runtime has been downloaded.
4445
- "py-runtime-ready", when the runtime is ready to process Python.
45-
* Define, configure and start the built-in PyScript plugins (e.g. the
46+
* Define, configure and start built-in PyScript plugins (e.g. the
4647
<py-script> tag).
4748
**************************************************************************/
4849

@@ -338,11 +339,6 @@ const main = function() {
338339
}
339340
}
340341

341-
// An object to represent the PyScript platform in the browser. What is
342-
// eventually returned from the main() function.
343-
const PyScript = {
344-
}
345-
346342
// Default configuration settings for PyScript. These may be overridden by
347343
// the app.loadConfig function.
348344
const config = {

0 commit comments

Comments
 (0)