Lines 158-198javascript
158 innerHTML: "", id, style: {}, classList: { toggle: () => {}, add: () => {}, remove: () => {}, contains: () => false },
159 addEventListener: function() {}, appendChild() {}, querySelectorAll: () => [], querySelector: () => null,
160 getBoundingClientRect: () => ({}), dataset: { state: "include" },
161 lastElementChild: null, children: { length: 0 },
162 removeChild: function() {}, textContent: "",
165 getElementById: (id) => _els[id] || (_els[id] = _fakeEl(id)),
166 createElement: () => ({ className: "", innerHTML: "", style: {}, appendChild() {}, classList: { add: () => {}, remove: () => {}, contains: () => false }, dataset: {} }),
167 querySelectorAll: () => [],
170 const Number = Number;
172 const String = String;
177 const fullScript = stubs + "\n" + m2[1];
179 new Function(fullScript)();
180 console.log(" OK Module script executes (DOM-stubbed, empty JSON)");
LowEval
Package source references a known benign dynamic code generation pattern.
tests/full-check/full-check.mjsView on unpkg · L178 182 if (e instanceof SyntaxError) {
183 console.error(" FAIL SyntaxError: " + e.message);
186 console.log(" OK no syntax error (stub runtime: " + e.message + ")");
191console.log(allOk && shapeOk ? "\nALL HTML CHECKS PASSED" : "\nSOME CHECKS FAILED");
193// ---------- 5. Final re-parse ----------
194jiti(`${ROOT}/extensions/toolset/usage-report.ts`);
195console.log("\n=== FINAL RE-PARSE ===");
198process.exit(allOk && shapeOk ? 0 : 1);