Re:Headless Chrome is coming soon
by onion2k on Sunday June 05, 2016 @04:34AM
(#11840142)
There are a few events that get fired during a page load. DOMCotentLoaded is fired when the page and all its assets are loaded, so that's usually considered the point at which it's finished loading. With modern JS based pages that sometimes isn't enough though, so new browsers have documentRequestIdleCallback which fires a callback when the browser isn't busy, which is quite useful.
[ Parent
| on HN ]
Are you not confusing DOMContentLoaded with window.load?
DCL doesn't wait for assets last time I checked, it only waits until the page is parsed and a tree has been created.
.load waits for assets
https://developer.mozilla.org/en-US/docs/Web/Events/DOMConte...