File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -185,10 +185,7 @@ export class Tab extends StatefulClass {
185185function injectWindowFill ( client : ScramjetClient , tab : Tab ) {
186186 client . Proxy ( "window.open" , {
187187 apply ( ctx ) {
188- let tab = browser . newTab ( ) ;
189- if ( ctx . args [ 0 ] ) {
190- tab . frame . go ( ctx . args [ 0 ] ) ;
191- }
188+ let tab = browser . newTab ( ctx . args [ 0 ] || new URL ( "about:blank" ) ) ;
192189
193190 // this is a bit jank: we need the global proxy NOW, but it will only load naturally after a few seconds
194191 const realContentWindow = tab . frame . frame . contentWindow ;
@@ -198,7 +195,7 @@ function injectWindowFill(client: ScramjetClient, tab: Tab) {
198195 const newclient = new ctor ( realContentWindow ) ;
199196 newclient . hook ( ) ;
200197
201- ctx . return ( newclient . globalProxy ) ;
198+ ctx . return ( newclient . global ) ;
202199 } ,
203200 } ) ;
204201}
You can’t perform that action at this time.
0 commit comments