Re: [w3c/ServiceWorker] `<iframe sandbox />` + SW (#1390)

FWIW, I can't get the following setup work in either browser (Chrome 96.0.4664.55 / Firefox 94.0.2 ):

```html
<iframe
  title="frame"
  srcDoc="<script>fetch('/resource').then(res => res.json()).then(console.log)</script>"
  sandbox="allow-same-origin allow-scripts"
></iframe>

<!-- register the worker here... -->
<script>
  navigator.serviceWorker.register('./sw.js')
</script>
```

The `GET /user` request is never propagated to the parent worker (the "fetch" event listener does not get called). I confirm that the worker registration is successful (this surfaces as a part of https://github.com/mswjs/msw/issues/1006, we've got the worker registration thoroughly tested). 

@wanderview, given that you state this should function in Firefox, do you see any mistakes I'm doing with the setup above? 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/1390#issuecomment-979927653

Received on Friday, 26 November 2021 12:02:06 UTC