Re: [whatwg/fetch] preload, destinations, and module scripts (#486)

> Yes; we just added service worker in the last year or so. The future of the web is long.

Any new top-level execution goal will likely use the same principles of a module graph at this point. If it is possible to unify on a module parse goal that distinguishes binary formats by header bytes (like wasm and ast binaries, and any future specs), then combinations can be avoided where the binary header space would become the new "version space" of web-based parse goals. If this route isn't taken, then any spec work should be designed to prepare for a much much larger combinatorial explosion here.

So I'd argue this doesn't have to be the case if we can follow the first path above.

> We have a serious conflict here between destinations as they're used in fetch (both classic and module scripts go through as="script"; both classic and module workers go through as="worker"; etc.)

Ah, I wasn't aware of this, but of course it seems a result of the process. Would it be too late at this point to alter the destination names of module scripts to go through "modulescript" and "moduleworker" etc? Or would there be other concerns with such a change?

> The hard parts are unrelated to recursive vs. not, but about fetch destinations, credentials modes, preload cache vs. module map, effect of document mutations, etc.

I will try to understand the fetch spec concerns a little better here. Perhaps it might help to start considering what issues might arise here to do with credentials modes that are unique to modules and not to `importScripts` (effectively the existing pattern we have here)?

As you know I'm arguing for preload cache over module map. Document mutation details seem to be fleshed out in the preload spec as well, so naively I would just assume reusing the terminology for things such as these would be beneficial.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/486#issuecomment-324742540

Received on Thursday, 24 August 2017 20:06:58 UTC