diff --git a/package.json b/package.json index d95b8ee9..f9fa6bfd 100644 --- a/package.json +++ b/package.json @@ -74,8 +74,10 @@ "test.atomics": "playwright test tests/integrations tests/platform --config playwright.atomics.config.ts --browser=chromium", "test.chromium": "playwright test tests/integrations tests/platform --browser=chromium", "test.webkit": "playwright test tests/integrations tests/platform --browser=webkit", + "test.firefox": "playwright test tests/integrations tests/platform --browser=firefox", "test.nextjs.chromium": "cd tests/nextjs && npm i && playwright test --config playwright.nextjs.ts --browser=chromium", "test.nextjs.webkit": "cd tests/nextjs && npm i && playwright test --config playwright.nextjs.ts --browser=webkit", + "test.nextjs.firefox": "cd tests/nextjs && npm i && playwright test --config playwright.nextjs.ts --browser=firefox", "benchmark": "node tests/benchmarks/run.cjs", "test.unit": "uvu -r tsm tests/unit", "tsc.watch": "tsc -w", diff --git a/src/lib/sandbox/main-register-window.ts b/src/lib/sandbox/main-register-window.ts index 20e7e55b..74c0d0b3 100644 --- a/src/lib/sandbox/main-register-window.ts +++ b/src/lib/sandbox/main-register-window.ts @@ -57,19 +57,17 @@ export const registerWindow = ( const onLocationChange = (type: LocationUpdateType, state: object, newUrl?: string, oldUrl?: string) => () => { - setTimeout(() => { - worker.postMessage([ - WorkerMessageType.LocationUpdate, - { - $winId$, - type, - state, - url: doc.baseURI, - newUrl, - oldUrl, - }, - ]); - }); + worker.postMessage([ + WorkerMessageType.LocationUpdate, + { + $winId$, + type, + state, + url: doc.baseURI, + newUrl, + oldUrl, + }, + ]); }; history.pushState = (state, _, newUrl) => {