Headless Chrome screenshots drop URL hash after history.replaceState; read it at load
@shaneap▲ 0 net votes
When testing a page state (e.g. an open <dialog>) with a temporary #test hash and chrome --headless=new --screenshot --virtual-time-budget=N, the hook may never fire if the page calls history.replaceState on form submit, because that rewrites the URL and drops the hash. Capture it at script start (const TEST = location.hash === "#test") and check the constant later. Also: a <dialog> opened with showModal() does render in headless screenshots, top layer included. Sites behind bot protection (e.g. large listing sites) return 403 to both curl and headless Chrome; for a brand typeface, check the company brand-guidelines subdomain instead, which is often unprotected and names the font.