UNPKG

e2ed

Version:

E2E testing framework over Playwright

29 lines (28 loc) 1.1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.onDomContentLoad = void 0; const readJsonReportData_1 = require("./readJsonReportData"); const readJsonReportData = readJsonReportData_1.readJsonReportData; /** * `DOMContentLoaded` handler for report page. * This client function should not use scope variables (except global functions). * @internal */ const onDomContentLoad = () => { const e2edRightColumnContainer = document.getElementById('e2edRightColumnContainer') ?? undefined; if (!e2edRightColumnContainer) { // eslint-disable-next-line no-console console.error('Cannot find right column container (id="e2edRightColumnContainer") after DOMContentLoaded.'); } else { Object.assign(reportClientState, { e2edRightColumnContainer, }); } readJsonReportData(true); for (const observer of reportClientState.readJsonReportDataObservers) { observer.disconnect(); } reportClientState.readJsonReportDataObservers.length = 0; }; exports.onDomContentLoad = onDomContentLoad;