11:40
<jgraham>
Is it possible to tell from a Fetch request whether the request was initiated by the parser or by script execution?
11:41
<jgraham>
(other things initiating the request are of course possible, but the question is about the difference between <img src=foo> and img=document.createElement("img"); img.src = "foo"; document.body.appendChlld(img))
12:09
<Domenic>
(other things initiating the request are of course possible, but the question is about the difference between <img src=foo> and img=document.createElement("img"); img.src = "foo"; document.body.appendChlld(img))
https://fetch.spec.whatwg.org/#concept-request-parser-metadata seems to fit the bill
12:10
<Domenic>
Hmm only used for scripts it looks like
12:10
<Domenic>
Because that's all CSP needs
12:39
<jgraham>
I had indeed missed that one, but indeed it doesn't seem to work without setting the flag on all element initiated fetches.