File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed
packages/signals/signals/src/core/processor Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -252,7 +252,6 @@ export class NoopSandbox implements SignalSandbox {
252252export class IframeSandbox implements SignalSandbox {
253253 private iframe : HTMLIFrameElement
254254 private iframeReady : Promise < void >
255- private _resolveReady ! : ( ) => void
256255 edgeFnUrl : string
257256
258257 constructor ( edgeFnUrl : string , processSignalFn ?: string ) {
@@ -263,17 +262,18 @@ export class IframeSandbox implements SignalSandbox {
263262 this . iframe . style . display = 'none'
264263 this . iframe . src = 'about:blank'
265264 document . body . appendChild ( this . iframe )
266- this . iframeReady = new Promise ( ( res ) => {
267- this . _resolveReady = res
268- } )
269-
270- void window . addEventListener ( 'message' , ( e ) => {
271- if ( e . source === this . iframe . contentWindow && e . data === 'iframe_ready' ) {
272- this . iframe . contentWindow ! . postMessage ( {
273- type : 'init' ,
274- } )
275- this . _resolveReady ( )
276- }
265+ this . iframeReady = new Promise ( ( resolve ) => {
266+ void window . addEventListener ( 'message' , ( e ) => {
267+ if (
268+ e . source === this . iframe . contentWindow &&
269+ e . data === 'iframe_ready'
270+ ) {
271+ this . iframe . contentWindow ! . postMessage ( {
272+ type : 'init' ,
273+ } )
274+ resolve ( )
275+ }
276+ } )
277277 } )
278278
279279 const doc = this . iframe . contentDocument !
You can’t perform that action at this time.
0 commit comments