/* catcrafts.net Copyright (C) 2026 Catcrafts The source code of this website is made available for viewing purposes only. No permission is granted to copy, modify, distribute, or create derivative works. */ export module Catcrafts:Views; import Crafter.Graphics; import std; using namespace Crafter; export namespace Catcrafts { // Builds the persistent page chrome (header /
/ footer) // under . Owns the root element for the page's lifetime so its // children don't get yanked out of the DOM. Must be called from main() // — the Crafter.Graphics Dom bridge is only safe to use after wasm // instantiation hands control to user code. void InitializePage(); // Per-render scratch ref to the
content container created by // InitializePage(). Looking it up fresh on every call costs one // document.getElementById; in return we don't have to thread a long-lived // reference across module boundaries. inline Dom::HtmlElementPtr MainContent() { return Dom::HtmlElementPtr("main"); } }