// E2E harness bootstrap — external file because the app's CSP blocks inline scripts. // Runs after calc-math.js + calculators.js (all three have `defer`, so execution // is in document order once parsing completes). (async function bootstrap() { try { const host = document.getElementById('calculators-tab'); const html = await fetch('/components/calculators.html').then(r => r.text()); host.innerHTML = html; document.dispatchEvent(new CustomEvent('tabChanged', { detail: { tab: 'calculators' } })); window.__harnessReady = true; } catch (e) { console.error('[e2e-harness] bootstrap failed:', e); window.__harnessError = String(e); } })();