Re: [w3c/FileAPI] Support `Response` in `URL.createObjectURL` (#97)

@mkruisselbrink 

> I'm not sure why just having a service worker wouldn't work for almost all of those cases. I understood the main issue with a service worker was the run-on-first-load case

There is also missing data, hence why https://bmeck.github.io/node-sw-compat-loader-test/dist/test.js is changing the specifiers from simple things to extra network requests to add more data that is not available in a fetch event. Service workers also don't let you rewrite the contents imports that live in `data:` or `blob:` schemes so you need the HTML change to get a hook to handle those. 

> But that shouldn't really matter for things like code coverage etc (and might be addressed by other issues anyway).

Then lets ignore that case and just talk about code transforms and facades for now.

> you can invent your own custom URLs that you can resolve to whatever you want in your service worker

You can but you get into bad situations quickly, hence why https://github.com/bmeck/esm-http-server has some prefixing going on. Though that starts to leak the mutation into the client and requires the client manually do this for any entry point not coming from inside the SW (through things like people using HTML tags to load ESM).

-- 
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/FileAPI/issues/97#issuecomment-365074630

Received on Monday, 12 February 2018 21:52:00 UTC