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
| onReady |(Wrap, Element) => void |`onReady(wrap, element) {}`| If defined, it is invoked before any other hook to signal that the element is going to execute the code. |
495
-
| onBeforeRun |(Wrap, Element) => void |`onBeforeRun(wrap, element) {}`| If defined, it is invoked before any other hook to signal that the element is going to execute the code. |
496
-
| onBeforeRunAsync |(Wrap, Element) => void |`onBeforeRunAsync(wrap, element) {}`| Same as `onBeforeRun` except it's the one used whenever the script is `async`. |
497
-
| codeBeforeRun |() => string |`codeBeforeRun: () => 'print("before")'`| If defined, prepend some code to evaluate right before the rest of the code gets executed. |
498
-
| codeBeforeRunAsync |() => string |`codeBeforeRunAsync: () => 'print("before")'`| Same as `codeBeforeRun` except it's the one used whenever the script is `async`. |
499
-
| codeAfterRun |() => string |`codeAfterRun: () => 'print("after")'`| If defined, append some code to evaluate right after the rest of the code already executed. |
500
-
| codeAfterRunAsync |() => string |`codeAfterRunAsync: () => 'print("after")'`| Same as `codeAfterRun` except it's the one used whenever the script is `async`. |
501
-
| onAfterRun |(Wrap, Element) => void |`onAfterRun(wrap, element) {}`| If defined, it is invoked after the foreign code has been executed already. |
502
-
| onAfterRunAsync |(Wrap, Element) => void |`onAfterRunAsync(wrap, element) {}`| Same as `onAfterRun` except it's the one used whenever the script is `async`. |
503
-
| onWorker |(Wrap?, XWorker) => void |`onWorker(wrap = null, xworker) {}`| If defined, whenever a script or tag with a `worker` attribute is processed it gets triggered on the main thread, to allow to expose possible `xworker` features before the code gets executed within the worker thread. The `wrap` reference is most of the time `null` unless an explicit `XWorker` call has been initialized manually and/or there is an interpreter on the main thread (*very advanced use case*). Please **note** this is the only hook that doesn't exist in the *worker* counter list of hooks. |
| onReady |`onReady(wrap:Wrap, el:Element) {}`| If defined, it is invoked before any other hook to signal that the element is going to execute the code. |
495
+
| onBeforeRun |`onBeforeRun(wrap:Wrap, el:Element) {}`| If defined, it is invoked before any other hook to signal that the element is going to execute the code. |
496
+
| onBeforeRunAsync |`onBeforeRunAsync(wrap:Wrap, el:Element) {}`| Same as `onBeforeRun` except it's the one used whenever the script is `async`. |
497
+
| codeBeforeRun |`codeBeforeRun: () => 'print("before")'`| If defined, prepend some code to evaluate right before the rest of the code gets executed. |
498
+
| codeBeforeRunAsync |`codeBeforeRunAsync: () => 'print("before")'`| Same as `codeBeforeRun` except it's the one used whenever the script is `async`. |
499
+
| codeAfterRun |`codeAfterRun: () => 'print("after")'`| If defined, append some code to evaluate right after the rest of the code already executed. |
500
+
| codeAfterRunAsync |`codeAfterRunAsync: () => 'print("after")'`| Same as `codeAfterRun` except it's the one used whenever the script is `async`. |
501
+
| onAfterRun |`onAfterRun(wrap:Wrap, el:Element) {}`| If defined, it is invoked after the foreign code has been executed already. |
502
+
| onAfterRunAsync |`onAfterRunAsync(wrap:Wrap, el:Element) {}`| Same as `onAfterRun` except it's the one used whenever the script is `async`. |
503
+
| onWorker |`onWorker(wrap = null, xworker) {}`| If defined, whenever a script or tag with a `worker` attribute is processed it gets triggered on the main thread, to allow to expose possible `xworker` features before the code gets executed within the worker thread. The `wrap` reference is most of the time `null` unless an explicit `XWorker` call has been initialized manually and/or there is an interpreter on the main thread (*very advanced use case*). Please **note** this is the only hook that doesn't exist in the *worker* counter list of hooks. |
504
504
505
505
### Worker Hooks
506
506
@@ -545,17 +545,17 @@ At the same time, as the worker doesn't have any `element` strictly related, as
545
545
546
546
As summary, this is the list of all possible, yet **optional** hooks, a custom type can define for **worker**:
| onReady |(Wrap, XWorker) => void |`onReady(wrap, xworker) {}`| If defined, it is invoked before any other hook to signal that the xworker is going to execute the code. |
551
-
| onBeforeRun |(Wrap, XWorker) => void |`onBeforeRun(wrap, xworker) {}`| If defined, it is invoked before any other hook to signal that the xworker is going to execute the code. |
552
-
| onBeforeRunAsync |(Wrap, XWorker) => void |`onBeforeRunAsync(wrap, xworker) {}`| Same as `onBeforeRun` except it's the one used whenever the worker script is `async`. |
553
-
| codeBeforeRun |() => string |`codeBeforeRun: () => 'print("before")'`| If defined, prepend some code to evaluate right before the rest of the code gets executed. |
554
-
| codeBeforeRunAsync |() => string |`codeBeforeRunAsync: () => 'print("before")'`| Same as `codeBeforeRun` except it's the one used whenever the worker script is `async`. |
555
-
| codeAfterRun |() => string |`codeAfterRun: () => 'print("after")'`| If defined, append some code to evaluate right after the rest of the code already executed. |
556
-
| codeAfterRunAsync |() => string |`codeAfterRunAsync: () => 'print("after")'`| Same as `codeAfterRun` except it's the one used whenever the worker script is `async`. |
557
-
| onAfterRun |(Wrap, XWorker) => void |`onAfterRun(wrap, xworker) {}`| If defined, it is invoked after the foreign code has been executed already. |
558
-
| onAfterRunAsync |(Wrap, XWorker) => void |`onAfterRunAsync(wrap, xworker) {}`| Same as `onAfterRun` except it's the one used whenever the worker script is `async`. |
| onReady |`onReady(wrap:Wrap, xw:XWorker) {}`| If defined, it is invoked before any other hook to signal that the xworker is going to execute the code. |
551
+
| onBeforeRun |`onBeforeRun(wrap:Wrap, xw:XWorker) {}`| If defined, it is invoked before any other hook to signal that the xworker is going to execute the code. |
552
+
| onBeforeRunAsync |`onBeforeRunAsync(wrap:Wrap, xw:XWorker) {}`| Same as `onBeforeRun` except it's the one used whenever the worker script is `async`. |
553
+
| codeBeforeRun |`codeBeforeRun: () => 'print("before")'`| If defined, prepend some code to evaluate right before the rest of the code gets executed. |
554
+
| codeBeforeRunAsync |`codeBeforeRunAsync: () => 'print("before")'`| Same as `codeBeforeRun` except it's the one used whenever the worker script is `async`. |
555
+
| codeAfterRun |`codeAfterRun: () => 'print("after")'`| If defined, append some code to evaluate right after the rest of the code already executed. |
556
+
| codeAfterRunAsync |`codeAfterRunAsync: () => 'print("after")'`| Same as `codeAfterRun` except it's the one used whenever the worker script is `async`. |
557
+
| onAfterRun |`onAfterRun(wrap:Wrap, xw:XWorker) {}`| If defined, it is invoked after the foreign code has been executed already. |
558
+
| onAfterRunAsync |`onAfterRunAsync(wrap:Wrap, xw:XWorker) {}`| Same as `onAfterRun` except it's the one used whenever the worker script is `async`. |
0 commit comments