From a1e3085437cb4ffd932dfd991ada88d4b0e1c85b Mon Sep 17 00:00:00 2001 From: slhx agent Date: Tue, 2 Jun 2026 01:56:10 +0200 Subject: [PATCH] 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 --- examples/kanban.md | 12 +++--------- slhx-test/tests/examples_contract.rs | 1 + 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/examples/kanban.md b/examples/kanban.md index 1760347..35507ad 100644 --- a/examples/kanban.md +++ b/examples/kanban.md @@ -285,15 +285,9 @@ Initial SSR: ``` -Runtime attachment: - -```js -root.addEventListener("submit", dispatch) -root.addEventListener("click", dispatch) -root.addEventListener("pointerdown", dispatch) -root.addEventListener("pointermove", dispatch) -root.addEventListener("pointerup", dispatch) -``` +Runtime attachment: `/slhx.js` installs delegated root listeners for forms, +clicks, and pointer/drag events. App authors keep composing generated resources; +they do not attach per-node listeners or write selector glue. No framework download. No VDOM. No hydration. No game loop. diff --git a/slhx-test/tests/examples_contract.rs b/slhx-test/tests/examples_contract.rs index 155311f..76955f4 100644 --- a/slhx-test/tests/examples_contract.rs +++ b/slhx-test/tests/examples_contract.rs @@ -117,6 +117,7 @@ fn canonical_example_docs_do_not_teach_low_level_plumbing() { "render_html(", "SafeHtml::trusted", ".render(&", + "addEventListener(", ]; let mut failures = Vec::new(); scan_examples(&examples, &mut |path, text| {