If I inject a script programmatically like this:
((global, url) => {
let s = document.createElement('script')
s.src = url
global.document.body.appendChild(s)
})(window, 'https://example.com')
The request will go through just fine and the script will be inserted with the response to the request to "https://example.com" ... but if I try to make an explicit fetch request to the same URL I get a CORS error? Why is that happening?