In chrome's Developer tool, the blue vertical line labeled "DOMContent event fired", and the red line labed "load event fired". Does "DOMContent event fired" means the browser begin to execute the inline javascript? And "load event fired" means it fire "onload" event?

- 32,904
- 11
- 98
- 167

- 271
- 1
- 3
- 3
-
Possible duplicate of [Difference between DOMContentLoaded and Load events](https://stackoverflow.com/questions/2414750/difference-between-domcontentloaded-and-load-events) – Parth Chavda Jul 03 '17 at 06:01
3 Answers
"DOMContent Event" is from webkit (which chrome relies on) and is equivelant to DOMContentLoaded msdn mdn.
The DOMContentLoaded event fires when parsing of the current page is complete; the load (onload) event fires when all files have finished loading from all resources, including ads and images. DOMContentLoaded is a great event to use to hookup UI functionality to complex web pages.
See the demo here, related question.

- 19,134
- 9
- 53
- 73
The DOMContentLoaded event is fired when the document has been completely loaded and parsed, without waiting for stylesheets, images, and subframes to finish loading (the load event can be used to detect a fully-loaded page).
The DOMContentLoaded event is fired when the document has been completely loaded and parsed, without waiting for stylesheets, images, and subframes to finish loading (the load event can be used to detect a fully-loaded page).

- 1
- 1

- 1,819
- 1
- 23
- 30