QHTML7 is a native JavaScript implementation of the QHTML language: a declarative way to describe HTML, CSS, component structure, runtime properties, signals, layout, and browser-facing behavior in one readable source format.
Language design, specifications, and tests created by humans; implementation by ChatGPT 5.6 Codex.
What’s New
No more WebAssembly – too clunky and slow.
While it would have been nice to have a clean assembly based library, it was much too slow and over-complicated. So, QHTML7 now ships as a native JavaScript runtime. The earlier WebAssembly backing system was accurate, but large QHTML scripts had too much startup and interaction lag under WASM, and the distributable package was larger than necessary. The runtime was redesigned as native JavaScript while retaining the QHTMLDomTree object model, the QHTML node classes, and the QHTML7 syntax shortcuts used by the WASM version.
The runtime still treats QHTML as the model. Parsed source becomes a QHTMLDomTree; mounted DOM elements point back to their QHTML node objects; and editing tools can continue using .toQHTML(), .fromQHTML(), .toJSON(), .fromJSON(), and .toHTML().
Scope is intentionally component-centered:
this resolves to the nearest parent q-component instance in QHTML functions, signal handlers, property handlers, animations, and event blocks. It does not become the current q-property-animation, q-style, q-painter, or other helper object.
Rendered DOM nodes are still the browser output. QHTML helpers resolve back to the DOM element when browser work is needed, so DOM APIs such as this.querySelector(...), this.setAttribute(...), and CSS shortcut assignments remain direct and predictable.
Properties flow top-down through the QHTML context. Local objects and local properties can overshadow ancestor names for that branch and its descendants.
Named objects are passed by reference to their direct descendants. Parent objects themselves are not copied into child scope as ordinary names; use parent() / parentComponent() on mounted DOM helpers, or .parent() / .qhtmlParent on QHTML node objects.
Useful local entry points:
Dev gallery: https://qhtml.github.io/qhtml7/test/demo.html