The defination is : onload is most often used within the element to execute a script once a web page has completely loaded all content (including images, script files, CSS files, etc.).
But i am confused with the "completely loaded". There are macro-task queue and micro-task queue in an event loop. I wonder how browser fire the load event in more details.
I suppose that it might be fired when the last task queue is finished according to my experiments. But i dont know where can i find a Standard or related information, or should i read source code of webcore or V8 to find the answer?