File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
packages/app/src/sandbox/status-screen Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,11 @@ let iframeReference = null;
1818
1919function changeText ( text : string ) {
2020 if ( iframeReference ) {
21- if ( iframeReference . contentDocument ) {
21+ if (
22+ iframeReference . contentDocument &&
23+ iframeReference . contentDocument . getElementsByClassName ( 'text' ) &&
24+ iframeReference . contentDocument . getElementsByClassName ( 'text' ) . item ( 0 )
25+ ) {
2226 iframeReference . contentDocument
2327 . getElementsByClassName ( 'text' )
2428 . item ( 0 ) . textContent = text ;
Original file line number Diff line number Diff line change @@ -30,9 +30,9 @@ function createIframe() {
3030 if ( iframe . contentDocument ) {
3131 resolve ( iframe ) ;
3232 } else {
33- document . getElementById ( 'frame' ) . addEventListener ( 'load' , ( ) => {
33+ document . getElementById ( 'frame' ) . onload = ( ) => {
3434 resolve ( iframe ) ;
35- } ) ;
35+ } ;
3636 }
3737 } ) ;
3838}
You can’t perform that action at this time.
0 commit comments