Merge pull request #1084 from lightpanda-io/slotchange
Some checks failed
e2e-test / zig build release (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
e2e-test / cdp-and-hyperfine-bench (push) Has been cancelled
e2e-test / perf-fmt (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / browser fetch (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled

Dispatch slotchange event
This commit is contained in:
Karl Seguin
2025-09-24 09:23:28 +08:00
committed by GitHub
7 changed files with 343 additions and 18 deletions

View File

@@ -109,9 +109,11 @@
}
testing._status = 'ok';
const script_id = testing._captured?.script_id || document.currentScript.id;
testing._executed_scripts.add(script_id);
_registerErrorCallback();
if (testing._captured || document.currentScript) {
const script_id = testing._captured?.script_id || document.currentScript.id;
testing._executed_scripts.add(script_id);
_registerErrorCallback();
}
}
// We want to attach an onError callback to each <script>, so that we can