File tree 1 file changed +12
-12
lines changed
packages/signals/signals/src/core/processor 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 {
252
252
export class IframeSandbox implements SignalSandbox {
253
253
private iframe : HTMLIFrameElement
254
254
private iframeReady : Promise < void >
255
- private _resolveReady ! : ( ) => void
256
255
edgeFnUrl : string
257
256
258
257
constructor ( edgeFnUrl : string , processSignalFn ?: string ) {
@@ -263,17 +262,18 @@ export class IframeSandbox implements SignalSandbox {
263
262
this . iframe . style . display = 'none'
264
263
this . iframe . src = 'about:blank'
265
264
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
+ } )
277
277
} )
278
278
279
279
const doc = this . iframe . contentDocument !
You can’t perform that action at this time.
0 commit comments