I think the question of when a page is fully loaded is a bit hard to get perfect... as lots of pages do stuff after they've loaded that won't really impact the presentation... but there is no way to know that the JS programs won't make further changes :-/. That said, Dave Moore put in some code to try to histogram some interesting durations. Take a look at:
chrome/trunk/src/chrome/renderer/render_view.cc: around line 2830. Search for the text "Renderer2.RequestToFinish" That seems to include a very educated guess at what "finished" is, as it times the interval from the request until he thought the page load was very complete. You might look around at related code and see if you can identify an interesting point/hook for your purposes. Hope that helps, Jim On Sun, Jun 7, 2009 at 10:45 PM, Mohamed Mansour <[email protected]>wrote: > Hi chromium, > I have been working on some feature (automatic printing) where it requires > the page to be fully loaded before I bring up the printer dialog and print. > The printer dialog (native to windows) blocks the UI so the page being > loaded is still white, hence it prints a white page. After the I press 'ok' > on print dialog, the white page fully renders correctly. > > My question is this, how can I ensure all the page elements are finished > loading? There seems to be no asynchronous event I could use to wait till a > page has been fully loaded. Any ideas? > > -- Mohamed Mansour > > > > --~--~---------~--~----~------------~-------~--~----~ Chromium Developers mailing list: [email protected] View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~----------~----~----~----~------~----~------~--~---
