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
Copy file name to clipboardExpand all lines: docs/README.md
+10-6Lines changed: 10 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,8 @@
1
-
# Polyscript Documentation
1
+
# Polyscript
2
+
3
+
<small><strong><ahref="https://github.com/pyscript/pyscript">PyScript</a> single core to rule them all</strong></small>
4
+
5
+
- - -
2
6
3
7
*[Terminology](#terminology) - what we mean by "_term_" in this document
4
8
*[Bootstrapping core](#bootstrapping-core) - how to enable Polyscript in your page
@@ -14,7 +18,7 @@ This section goal is to avoid confusion around topics discussed in this document
14
18
15
19
<details>
16
20
<summary><strong>Interpreter</strong></summary>
17
-
<div>
21
+
<divmarkdown=1>
18
22
19
23
Also commonly referred as *runtime* or *engine*, we consider an **interpreter** any "_piece of software_" able to parse, understand, and ultimately execute, a *Programming Language* through this project.
20
24
@@ -56,7 +60,7 @@ Custom values for the `type` attribute can also be created which alias (and pote
56
60
57
61
<details>
58
62
<summary><strong>Target</strong></summary>
59
-
<div>
63
+
<divmarkdown=1>
60
64
61
65
When it comes to *strings* or *attributes*, we consider the **target** any valid element's *id* on the page or, in most cases, any valid *CSS* selector.
62
66
@@ -105,7 +109,7 @@ When it comes to the `property` or `field` attached to a `<script>` element thou
105
109
106
110
<details>
107
111
<summary><strong>Env</strong></summary>
108
-
<div>
112
+
<divmarkdown=1>
109
113
110
114
ℹ️ - This is an **advanced feature** that is worth describing but usually it is not needed for most common use cases.
111
115
@@ -202,7 +206,7 @@ These are all special, *script* related features, offered by *polyscript* out of
No matter the interpreter of choice, if there is any way to reach the `document` from such interpreter, its `currentScript` will point at the exact/very-same script that is currently executing the code, even if its `async` attribute is used, mimicking what the standard [document.currentScript](https://developer.mozilla.org/en-US/docs/Web/API/Document/currentScript) offers already, and in an unobtrusive way for the rest of the page, as this property only exists for *synchronous* and blocking scripts that are running, hence never interfering with this *core* logic or vice-versa.
208
212
@@ -227,7 +231,7 @@ Please read the [Terminology](#terminology) **target** dedicated details to know
227
231
228
232
<details>
229
233
<summary><strong>XWorker</strong></summary>
230
-
<div>
234
+
<divmarkdown=1>
231
235
232
236
With or without access to the `document`, every (*non experimental*) interpreter will have defined, either at the global level or after an import (i.e.`from polyscript import XWorker` in *Python* case), a reference to the `XWorker` "_class_" (it's just a *function*!), which goal is to enable off-loading heavy operations on a worker, without blocking the main / UI thread (the current page) and allowing such worker to even reach the `document` or anything else available on the very same main / UI thread.
0 commit comments