@@ -71,17 +71,21 @@ Each `<script type="m/py">` or `<m/py-script>` may optionally have
71
71
a ` service-worker ` attribute pointing to a locally served file (the
72
72
same way ` mini-coi.js ` needs to be served).
73
73
74
- * You can chose ` mini-coi.js ` itself or * any other custom service worker* ,
75
- as long as it provides either the right headers to enable synchronous
76
- operations via Atomics, or it enables
77
- [ sabayon polyfill events] ( https://github.com/WebReflection/sabayon?tab=readme-ov-file#service-worker ) .
78
- * Alternatively, you can copy and paste the
79
- [ sabayon Service Worker] ( https://raw.githubusercontent.com/WebReflection/sabayon/main/dist/sw.js )
80
- into your local project and point at that in the attribute. This will
81
- not change the original behavior of your project, it will not interfere with
82
- all default or pre-defined headers your application uses already but it will
83
- ** fallback to a (slower but working) synchronous operation** that allows
84
- both ` window ` and ` document ` access in your worker logic.
74
+ Such file needs to orchestrate * coincident* * POST* requests so that:
75
+
76
+ * you can copy and paste the
77
+ [ coincident Service Worker] ( https://cdn.jsdelivr.net/npm/coincident/dist/sw.js )
78
+ into your local project and point at that via the ` service-worker ` attribute.
79
+ This will not change the original behavior of your project, it will not
80
+ interfere with all default or pre-defined headers your application uses
81
+ already but it will
82
+ ** fallback to a (slower but working) synchronous operation**
83
+ that allows both ` window ` and ` document ` access in your worker logic.
84
+ * you can import
85
+ [ coincident listeners] ( https://github.com/WebReflection/coincident/blob/main/src/sabayon/listeners.js )
86
+ in your project and at least add the ` fetc ` one before your listeners.
87
+ It will automatically stop propagation when a request is meant to be handled
88
+ so that the rest of your logic will not be affected or change by any mean.
85
89
86
90
``` html
87
91
<html >
@@ -100,12 +104,12 @@ same way `mini-coi.js` needs to be served).
100
104
101
105
!!! warning
102
106
103
- Using sabayon as the fallback for synchronous operations via Atomics
107
+ Using *coincident* as the fallback for synchronous operations via Atomics
104
108
should be **the last solution to consider**. It is inevitably
105
109
slower than using native Atomics.
106
110
107
- If you must use sabayon , always reduce the amount of synchronous
108
- operations by caching references from the *main* thread.
111
+ If you must use `service-worker` attribute , always reduce the amount of
112
+ synchronous operations by caching references from the *main* thread.
109
113
110
114
```python
111
115
# ❌ THIS IS UNNECESSARILY SLOWER
0 commit comments