fix(iframe): [PKG-IFRAME-03] release failed setup and bind message peers

This commit is contained in:
Harvey Zhao committed 2026-09-13 00:03:37 +08:00
1 parent b8d03e7366
commit b8cdafedd1
23 files changed
+7940 -32

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
<!doctype html>
<script src="/iframe-boundary-lib.js"></script>
<script>
const parameters = new URL(location.href).searchParams;
window.Tool = window[parameters.get('global')];
window.received = [];
window.executions = 0;
addEventListener('message', event => {
received.push({ type: event.data?.type, id: event.data?.id, fromParent: event.source === parent, origin: event.origin });
if (event.data?.type === 'hold') window.held = event.data;
parent.postMessage({ type: 'fixture-observed', data: { count: received.length, type: event.data?.type, id: event.data?.id } }, '*');
});
if (parameters.get('auto') !== '0') Tool.inject();
parent.postMessage({ type: 'fixture-ready' }, '*');
</script>