From be465c6a1c35e2e1a02c5bcd9759f57df16d8cc4 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Fri, 15 Mar 2024 16:27:07 +0100 Subject: [PATCH] fix(trace-viewer): allow Chrome extension fallback in SW (#29954) https://github.com/microsoft/playwright/issues/29144 --- packages/trace-viewer/src/sw.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/trace-viewer/src/sw.ts b/packages/trace-viewer/src/sw.ts index 2334887fa5..2b4de9c201 100644 --- a/packages/trace-viewer/src/sw.ts +++ b/packages/trace-viewer/src/sw.ts @@ -68,6 +68,10 @@ async function loadTrace(traceUrl: string, traceFileName: string | null, clientI // @ts-ignore async function doFetch(event: FetchEvent): Promise { + // In order to make Accessibility Insights for Web work. + if (event.request.url.startsWith('chrome-extension://')) + return fetch(event.request); + const request = event.request; const client = await self.clients.get(event.clientId);