[webkit-qt] How to know if page is using java script timer

Carter, Nathan NCARTER at bentley.edu
Tue Apr 13 08:34:42 PDT 2010

No, one cannot expect the loadFinished() signal to be able to predict whether scripts that have timeouts pending will be modifying the page, nor if they do, whether they will ever stop modifying it.  For instance, on a page on which a script uses a timeout to keep a visual counter/clock constantly updating, you would not want the loadFinished() signal to delay forever just because the script-generated clock runs forever.

Perhaps, Tarandeep, you can traverse the DOM to detect locations that are waiting for an image?  Does your situation make that possible, or can you not detect those locations that are still waiting for scripts to place images there?


On Apr 13, 2010, at 11:26 AM, tonikitoo (Antonio Gomes) wrote:

> Hum, if that is the case I think it can be even considered a bug. See
> QWebPage documentation online
> "The loadStarted() signal is emitted when the page begins to load.The
> loadProgress() signal, on the other hand, is emitted whenever an
> element of the web page completes loading, such as an embedded image,
> a script, etc. Finally, the loadFinished() signal is emitted when the
> page has loaded completely. Its argument, either true or false,
> indicates whether or not the load operation succeeded."
> source: http://doc.trolltech.com/main-snapshot/qwebpage.html
> On Mon, Apr 12, 2010 at 1:14 PM, Tarandeep Singh <tarandeep at gmail.com> wrote:
>> Hi,
>> I am trying to load a page using QWebPage. The page uses javascript delay to
>> delay loading of the images (I guess webkit would create Timer objects to
>> handle this delay).
>> What I am trying to do is, once the page is loaded (including all the
>> images) get its DOM. I am connecting to the signal loadFinished() of the
>> webpage. However, this signal is generated as soon as the page is loaded
>> (the images are not yet loaded).
>> Is there a way, I can find out that the page that I am trying to load is
>> using timers and hence wait for them to send signal?
>> Thanks,
>> Tarandeep
>> _______________________________________________
>> webkit-qt mailing list
>> webkit-qt at lists.webkit.org
>> http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt
> -- 
> --Antonio Gomes
> _______________________________________________
> webkit-qt mailing list
> webkit-qt at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt

More information about the webkit-qt mailing list