// lib/dom-dump-script.ts — the rendered-DOM dump script design-review evaluates // in the page before handing the result to the design detector. // // Pure module: no I/O, no imports from scripts/. Consumers: // scripts/resolvers/design.ts renders it once as a fenced JS block (Phase 3) // test/fixtures/*.dom.html captured by running it through the browse engine // test/impeccable-fixtures.test.ts pins that the committed dump came from THIS script // // Contract (one script, two engines): // - An IIFE expression: Aside's `pg.evaluate(...)` and `$B eval ` both // wrap an expression, and every `aside repl '...'` body is a single-quoted // bash string, so the text contains NO single-quote characters and no `${`. // - Works on a CLONE of document.documentElement, never the live page. // - Inlines only the stylesheets a owns (inline