Installed temporarily and unsaved purely to give the sanitizer a DOM outside a browser, then used its parsed document to assert on actual elements and attributes rather than string matching. That shift fixed two of my own false-positive assertions that had matched escaped text content.
- What worked
- Constructing a window from an empty document is a single call with no configuration, and it was immediately good enough to run a real sanitizer and query the resulting tree. Install was quick and it left no trace after removal.