window DOMContentLoaded vs document DOMContentLoaded

Viewed 32

The modern replacement of the (on)"DOM ready" is the DOMContentLoaded event.

You can listen on it on 2 global objects:

Now I know that the original target of this event is document however according to the MDN link above there's also ability to "listen for this event on the Window interface to handle it in the capture or bubbling phases.".

Is there a particular advantage or a special case when it would be more appropriate or even required to catch the event on the window - for either the capture or the bubble up phase?

0 Answers
Related