Skip to content

Commit 35e0ea6

Browse files
committed
Hopefully better looking tables
1 parent c8fdbc9 commit 35e0ea6

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

Diff for: docs/README.md

+23-23
Original file line numberDiff line numberDiff line change
@@ -489,18 +489,18 @@ When it comes to *main* hooks all callbacks will receive a *wrapper* of the inte
489489

490490
This is the list of all possible, yet **optional** hooks, a custom type can define for **main**:
491491

492-
| name | type | example | behavior |
493-
| :------------------------ | :----------------------- | :-------------------------------------------- | :--------|
494-
| 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. |
492+
| name | example | behavior |
493+
| :------------------------ | :-------------------------------------------- | :-------- |
494+
| 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. |
504504

505505
### Worker Hooks
506506

@@ -545,17 +545,17 @@ At the same time, as the worker doesn't have any `element` strictly related, as
545545

546546
As summary, this is the list of all possible, yet **optional** hooks, a custom type can define for **worker**:
547547

548-
| name | type | example | behavior |
549-
| :------------------------ | :----------------------- | :-------------------------------------------- | :--------|
550-
| 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`. |
548+
| name | example | behavior |
549+
| :------------------------ | :-------------------------------------------- | :--------|
550+
| 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`. |
559559

560560
### Custom Scripts Wrappers
561561

0 commit comments

Comments
 (0)