File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed
Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -273,15 +273,6 @@ <h3>Examples</h3>
273273 xrEngine . addEventListener ( 'canvas' , e => {
274274 const canvas = e . data ;
275275 document . getElementById ( 'iframe-wrapper' ) . appendChild ( canvas ) ;
276-
277- const { u} = parseQuery ( window . location . search ) ;
278- if ( u ) {
279- setTimeout ( ( ) => {
280- _unloadLink ( 0 ) ;
281- _unloadLink ( 0 ) ;
282- _loadLink ( { href : u , innerText : 'URL' } ) ;
283- } ) ;
284- }
285276 } ) ;
286277 xrEngine . addEventListener ( 'message' , e => {
287278 const { data} = e ;
@@ -302,6 +293,14 @@ <h3>Examples</h3>
302293 }
303294 } ) ;
304295
296+ const { u} = parseQuery ( window . location . search ) ;
297+ if ( u ) {
298+ while ( tabs . childNodes . length > 0 ) {
299+ _unloadLink ( 0 ) ;
300+ }
301+ _loadLink ( { href : u , innerText : 'URL' } ) ;
302+ }
303+
305304 let result ;
306305 if ( navigator . xr ) {
307306 try {
You can’t perform that action at this time.
0 commit comments