D
D
Denis Denis2015-11-08 14:50:04
JavaScript
Denis Denis, 2015-11-08 14:50:04

Is there a document.onload event?

document.onload = function () {
console.log('do');
};
the result is null.
This event is not fired but only DOMContentLoaded is fired?
In the properties, why does the handler not work then?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Inwork277, 2015-11-08
@golovewkin

stackoverflow.com/questions/588040/window-onload-v...
stackoverflow.com/questions/5135638/why-does-windo...

N
Nazar Mokrinsky, 2015-11-08
@nazarpc

Maybe because the event has already fired when you are just going to catch it?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question