Solved QWebEnginePage: when is loadFinished() signaled?
-
I'm trying to create a headless render engine, which serializes whenever loadFinished() is signaled. Because of this, I'd like to understand the details of loadFinished().
There are many definitions of being "finished" when rendering a page, including:
- DOM has been downloaded
- DOM has been downloaded, resources specified in the original DOM (as opposed to other scripts or iframes) have been rendered into the page (as used in phantomjs http://phantomjs.org/api/webpage/handler/on-load-finished.html)
- The global javascript variable "window" fires the "load" event (see https://developer.mozilla.org/en-US/Add-ons/Code_snippets/On_page_load)
For QWebEnginePage, is it correct to assume loadFinished() is signaled the same as #2? If not, can anyone share their insights as to what conditions must be filled for loadFinished() to signal?
Many thanks!
-
I got a reply from the web engine mailing list, and turns out the answer is when both conditions 2 & 3 are met. Documentation: https://code.google.com/p/chromium/codesearch#chromium/src/content/public/browser/web_contents_observer.h&q=file:web_contents_observer.h function:DidFinishLoad&sq=package:chromium&l=197