javascript CORS onerror handler javascript CORS onerror handler google-chrome google-chrome

javascript CORS onerror handler


Works for me in Firefox 20 and Chrome supports cross-origin error reporting as of version 30.

You can see that indeed the browsers do send an Origin: header because the <script> tag has a crossorigin attribute, and the error is properly reported because the server responds with Access-Control-Allow-Origin: *.