@@ -42,9 +42,10 @@ on a web worker, the exact same sequence of steps takes place:
4242 callback found in test frameworks.
4343
4444PyScript's interpreters can run their code either * synchronously* or
45- * asynchronously* . No matter, the very same sequence is guaranteed to run in
46- order in both cases, the only difference being the naming convention used to
47- reference synchronous or asynchronous lifecycle hooks.
45+ * asynchronously* (** note** , the default is asynchronously). No matter, the very
46+ same sequence is guaranteed to run in order in both cases, the only difference
47+ being the naming convention used to reference synchronous or asynchronous
48+ lifecycle hooks.
4849
4950### Hooks
5051
@@ -99,7 +100,7 @@ For example, this will work because all references are contained within the
99100registered function:
100101
101102``` js
102- import { hooks } from " https://pyscript.net/releases/2024.8.1 /core.js" ;
103+ import { hooks } from " https://pyscript.net/releases/2024.8.2 /core.js" ;
103104
104105hooks .worker .onReady .add (() => {
105106 // NOT suggested, just an example!
@@ -113,7 +114,7 @@ hooks.worker.onReady.add(() => {
113114However, due to the outer reference to the variable ` i ` , this will fail:
114115
115116``` js
116- import { hooks } from " https://pyscript.net/releases/2024.8.1 /core.js" ;
117+ import { hooks } from " https://pyscript.net/releases/2024.8.2 /core.js" ;
117118
118119// NO NO NO NO NO! ☠️
119120let i = 0 ;
@@ -146,7 +147,7 @@ the page.
146147
147148``` js title="log.js - a plugin that simply logs to the console."
148149// import the hooks from PyScript first...
149- import { hooks } from " https://pyscript.net/releases/2024.8.1 /core.js" ;
150+ import { hooks } from " https://pyscript.net/releases/2024.8.2 /core.js" ;
150151
151152// The `hooks.main` attribute defines plugins that run on the main thread.
152153hooks .main .onReady .add ((wrap , element ) => {
@@ -196,8 +197,8 @@ hooks.worker.onAfterRun.add(() => {
196197 <!-- JS plugins should be available before PyScript bootstraps -->
197198 <script type =" module" src =" ./log.js" ></script >
198199 <!-- PyScript -->
199- <link rel =" stylesheet" href =" https://pyscript.net/releases/2024.8.1 /core.css" >
200- <script type =" module" src =" https://pyscript.net/releases/2024.8.1 /core.js" ></script >
200+ <link rel =" stylesheet" href =" https://pyscript.net/releases/2024.8.2 /core.css" >
201+ <script type =" module" src =" https://pyscript.net/releases/2024.8.2 /core.js" ></script >
201202 </head >
202203 <body >
203204 <script type =" mpy" >
0 commit comments