From 870aa79668c429238b94199c47a8494afa221608 Mon Sep 17 00:00:00 2001 From: Bendik Aagaard Lynghaug Date: Tue, 8 Sep 2026 16:56:54 +0200 Subject: [PATCH] test+docs: full-app browser integration test and the isomorphic counter example The integration test runs the counter through the real browser path in happy-dom: start(), store events, raf-batched morph, DOM click handlers, emit coalescing. examples/counter is the Phase 2 exit criterion: one app module mounted zero-build in a browser via import map and string-rendered by node examples/counter/render.js. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_014NgfSjHE11oFpoSnLVKLXd --- docs/v8.md | 27 +++++++-- examples/counter/app.js | 35 +++++++++++ examples/counter/index.html | 31 ++++++++++ examples/counter/render.js | 5 ++ .../core/test/browser-integration.test.js | 59 +++++++++++++++++++ 5 files changed, 152 insertions(+), 5 deletions(-) create mode 100644 examples/counter/app.js create mode 100644 examples/counter/index.html create mode 100644 examples/counter/render.js create mode 100644 packages/core/test/browser-integration.test.js diff --git a/docs/v8.md b/docs/v8.md index 7f4b272..d0dc40e 100644 --- a/docs/v8.md +++ b/docs/v8.md @@ -19,17 +19,34 @@ everything new lives under `packages/`. - `packages/html` — `@choojs/html`: the rendering package. - `server.js` — server-side tagged template (← nanohtml 1.10.0 server, transform branches removed; pure runtime) + - `browser.js` — runtime-only cached template tag: each template literal + is parsed once (WeakMap keyed on its strings array) into a