File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 114114 if ( last . src ) {
115115 last . addEventListener ( "load" , finish ) ;
116116 } else {
117- var id = Math . floor ( Math . random ( ) * 0xffffff ) , fin ;
117+ var id = Math . floor ( Math . random ( ) * 0xffffff ) ;
118118 this . callbacks [ id ] = function ( ) { delete sandbox . callbacks [ id ] ; finish ( ) ; } ;
119- scriptTags . push ( fin = document . createElement ( "script" ) ) ;
120- fin . innerText = "__sandbox.callbacks[" + id + "]();" ;
119+ var fin = doc . createElement ( "script" ) ;
120+ fin . text = "__sandbox.callbacks[" + id + "]();" ;
121+ scriptTags . push ( fin ) ;
121122 }
122123 scriptTags . forEach ( function ( tag ) { doc . body . appendChild ( tag ) ; } ) ;
123124 } else {
178179 } ;
179180 } ,
180181 resizeFrame : function ( ) {
181- this . frame . style . height = Math . max ( 80 , Math . min ( this . win . document . body . scrollHeight + 10 , 500 ) ) + "px" ;
182+ this . frame . style . height = Math . max ( 80 , Math . min ( this . win . document . body . scrollHeight + 20 , 500 ) ) + "px" ;
182183 var box = this . frame . getBoundingClientRect ( ) ;
183184 if ( box . bottom > box . top && box . top >= 0 && box . top < window . innerHeight && box . bottom > window . innerHeight )
184185 window . scrollBy ( 0 , Math . min ( box . top , box . bottom - window . innerHeight ) ) ;
You can’t perform that action at this time.
0 commit comments