Thanks for contributing an answer to Stack Overflow! We have solved and debated this issue in 2008 last time. The DOMContentLoaded event happens on the document object. Why does my JavaScript code receive a "No 'Access-Control-Allow-Origin' header is present on the requested resource" error, while Postman does not? How to check whether the background image is loaded or not using JavaScript ? When the browser processes an HTML-document and comes across a