import { escapeHtml, page, withRun } from "../../lib/fixtures.mjs"; export default { id: "tabs", routes: ["/tabs", "/tabs/child"], render({ pathname, runId }) { if (pathname === "/tabs") { return page({ title: "Tab Lab", body: `

Tab Lab

Keep this original tab open while visiting the child page in a new tab.

Child URL: ${escapeHtml(withRun("/tabs/child", runId))}

`, }); } return page({ title: "Child Tab", body: `

Child Tab

TAB-29

`, script: `document.querySelector("#mark-child").addEventListener("click", () => { document.querySelector("#child-status").hidden = false; browserEval.send("tabs.child_marked"); });`, }); }, };