Skip to content

Commit 1af1391

Browse files
author
Avaer Kazmer
committed
Hack
1 parent 5a0c1bf commit 1af1391

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/WindowVm.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@ class WorkerVm extends EventTarget {
4141
.then(followUrl => new Promise((accept, reject) => {
4242
const src = window.location.origin +
4343
(options.args.options.url.startsWith('data:') ?
44-
`${window.location.origin}/xr-engine-${Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)}.html`
44+
`/xr-engine-${Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)}.html`
4545
:
4646
options.args.options.url.replace(/^[a-z]+:\/\/[a-zA-Z0-9\-\.]+(?::[0-9]+)?/, ''));
47+
console.log('latch src 1', options.args.options.url, src, `${window.location.origin}/xr-engine-${Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5)}.html`);
4748
const dst = `\
4849
<!doctype html>
4950
<html>
@@ -62,6 +63,8 @@ class WorkerVm extends EventTarget {
6263
mc.port1.onmessage = () => {
6364
iframe.src = src;
6465

66+
console.log('latch src 2', src);
67+
6568
iframe.addEventListener('load', () => {
6669
const {queue} = messageChannel.port2.handleMessage;
6770

0 commit comments

Comments
 (0)