- From: Jeffrey Posnick <notifications@github.com>
- Date: Thu, 15 Apr 2021 07:33:28 -0700
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 15 April 2021 14:33:40 UTC
While that does detect `type` support in general, it isn't sufficient to detect `type: 'module'` support. Both Chrome 90 and Safari 14.0.3 support `type` but don't work with `type: 'module'`. In the case of Chrome 90, there's an exception throw immediately (`DOMException: type 'module' in RegistrationOptions is not implemented yet.See https://crbug.com/824647 for details.`), so it does avoid downloading and parsing the script. In the case of Safari 14.0.3, the ES module version of the script downloads and then fails to parse, with a `TypeError: SyntaxError: Unexpected token '*'. import call expects exactly one argument.`, so checking for `type` doesn't avoid the problem. I'm assuming this is because Safari 14.0.3 shipped with partially implemented ES module support, as the Technology Previews [post-122](https://webkit.org/blog/11577/release-notes-for-safari-technology-preview-122/#:~:text=Added%20support%20for%20modules%20in%20Service%20Workers) work as expected. -- 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/1582#issuecomment-820468971
Received on Thursday, 15 April 2021 14:33:40 UTC