/** * DOM-tree sanitizer — the live-tree companion to the pure-string * `content/sanitizer/HTMLSanitizer`. Used where a whole fragment of * untrusted HTML becomes live DOM: today the snapshot viewer, which mounts * server-fetched snapshot HTML in the editor realm (PM session JWT). * * POLICY NOTE — this deliberately diverges from the inline `SAFE_TAGS` * allowlist (see PHASES.md Phase 4): a snapshot is a full captured page, so * structural elements (`div`/`p`/`h1`/`nav`/`table`/…) must survive for the * page to render at all. What is enforced instead: * - executable/embedding elements are REMOVED outright * - every `on*` handler attribute (and `srcdoc`) is dropped * - URL-bearing attributes must pass `sanitizeUrl` * - inline `style` keeps any property (layout fidelity) but value-level * dangers are dropped via `sanitizeCssDeclarations` * * CONTINUOUS DEVELOPMENT: like SAFE_STYLE_PROPS, these sets grow (or * tighten) deliberately as real snapshots surface gaps — extend REMOVE_TAGS * rather than trusting a new embedding surface, add hostile cases to * sanitize-element.test.ts, and keep the WP/edge ports in sync if they ever * grow a snapshot feature. */ /** * Sanitize a live element tree in place (root included). */ export declare function sanitizeElement(root: Element): void; /** * Best-effort sanitization of a copied `