docs(kanban): describe delegated runtime attachment
Replace the north-star walkthrough's listener snippet with prose and guard example docs against teaching addEventListener glue. req: examples/003 req: runtime/001
This commit is contained in:
+3
-9
@@ -285,15 +285,9 @@ Initial SSR:
|
|||||||
<!-- the app shell loads /slhx.js and any bootstrap state -->
|
<!-- the app shell loads /slhx.js and any bootstrap state -->
|
||||||
```
|
```
|
||||||
|
|
||||||
Runtime attachment:
|
Runtime attachment: `/slhx.js` installs delegated root listeners for forms,
|
||||||
|
clicks, and pointer/drag events. App authors keep composing generated resources;
|
||||||
```js
|
they do not attach per-node listeners or write selector glue.
|
||||||
root.addEventListener("submit", dispatch)
|
|
||||||
root.addEventListener("click", dispatch)
|
|
||||||
root.addEventListener("pointerdown", dispatch)
|
|
||||||
root.addEventListener("pointermove", dispatch)
|
|
||||||
root.addEventListener("pointerup", dispatch)
|
|
||||||
```
|
|
||||||
|
|
||||||
No framework download. No VDOM. No hydration. No game loop.
|
No framework download. No VDOM. No hydration. No game loop.
|
||||||
|
|
||||||
|
|||||||
@@ -117,6 +117,7 @@ fn canonical_example_docs_do_not_teach_low_level_plumbing() {
|
|||||||
"render_html(",
|
"render_html(",
|
||||||
"SafeHtml::trusted",
|
"SafeHtml::trusted",
|
||||||
".render(&",
|
".render(&",
|
||||||
|
"addEventListener(",
|
||||||
];
|
];
|
||||||
let mut failures = Vec::new();
|
let mut failures = Vec::new();
|
||||||
scan_examples(&examples, &mut |path, text| {
|
scan_examples(&examples, &mut |path, text| {
|
||||||
|
|||||||
Reference in New Issue
Block a user