File tree 1 file changed +12
-10
lines changed
packages/signals/signals/src/core/processor
1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -266,7 +266,7 @@ export class IframeSandbox implements SignalSandbox {
266
266
void window . addEventListener ( 'message' , ( e ) => {
267
267
if (
268
268
e . source === this . iframe . contentWindow &&
269
- e . data === 'iframe_ready '
269
+ e . data === 'process_signal_loaded '
270
270
) {
271
271
this . iframe . contentWindow ! . postMessage ( {
272
272
type : 'init' ,
@@ -298,15 +298,6 @@ export class IframeSandbox implements SignalSandbox {
298
298
const runtimeJs = `
299
299
${ processSignalFn ? `window.processSignal = ${ processSignalFn } ` : '' }
300
300
301
- const signalsScript = document.getElementById('edge-fn')
302
- if (typeof processSignal === 'undefined') {
303
- signalsScript.onload = () => {
304
- window.parent.postMessage('iframe_ready')
305
- }
306
- } else {
307
- window.parent.postMessage('iframe_ready')
308
- }
309
-
310
301
class AnalyticsRuntimeProxy {
311
302
constructor() {
312
303
this.calls = new Map();
@@ -366,6 +357,17 @@ export class IframeSandbox implements SignalSandbox {
366
357
event.source.postMessage({ type: 'execution_error', error: err });
367
358
}
368
359
}
360
+
361
+
362
+ const signalsScript = document.getElementById('edge-fn')
363
+ if (typeof processSignal === 'undefined') {
364
+ signalsScript.onload = () => {
365
+ window.parent.postMessage('process_signal_loaded')
366
+ }
367
+ } else {
368
+ window.parent.postMessage('process_signal_loaded')
369
+ }
370
+
369
371
});
370
372
371
373
You can’t perform that action at this time.
0 commit comments