I was under the impression that the first paint occurs after DOMContentLoaded event has been fired. Especially, because I thought that in order for the first paint to happen the render tree is needed, which it is dependent on DOM construction. Also, I am aware that DOMContentLoaded event is fired when DOM construction completes. Until now, I thought that the order was:
- domInteractive
- deferred scripts execution
- DOMContentLoaded
- first paint
- load event
But then I came across this thread: "Why First Paint is happening before DOMContentLoaded" where people experience a different order. Unfortunately, I can't understand what am I missing out.
I am trying with tests to reproduce the first paint occurring before DCL event, although I believe this behaviour is against theory. If someone could help me out with a working example, it would be perfect!
Thank you in advance!