UNPKG

e2ed

Version:

E2E testing framework over Playwright

28 lines (27 loc) 1.07 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.onDomContentLoad = onDomContentLoad; 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 */ function onDomContentLoad() { const e2edRightColumnContainer = document.getElementById('e2edRightColumnContainer') ?? undefined; if (e2edRightColumnContainer === undefined) { // 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; }