[whatwg/fetch] Request destination for SVG documents (#1012)

It's unclear what `destination` value should be used for SVG documents and different browsers seem to be doing different things, at least when it comes to CSP.

https://svg-discrimination.glitch.me/csp.html is loading fine in Chrome and Safari (as long as `img-src: 'self'` is there), but the SVG is blocked in Firefox.

At the same time, because SVG document resources are internally represented differently than images in Chromium, an `as` value of "image" for preloads is a [mismatch for SVG documents](https://bugs.chromium.org/p/chromium/issues/detail?id=1065069).

Looking at [Fetching the document](https://www.w3.org/TR/SVG2/linking.html#processingURL-fetch) over in SVG-land doesn't mention `destination` at all.

We should decide what the destination be, and then align spec and implementations on it.
My personal vote would be for a brand new destination (e.g. "svg" or "svg-document"), to make it easier to explain to developers which CSP or `as` values control these loads.

-- 
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/1012

Received on Friday, 27 March 2020 10:14:13 UTC