[webkit-dev] setTimeout and Safari

Simon Fraser simon.fraser at apple.com
Wed Oct 6 17:54:19 PDT 2010


Why do you need to know if there are no more pending setTimeouts?

Simon

On Oct 6, 2010, at 5:52 PM, Steve Conover wrote:

> Hoping someone on -dev might have an idea about this...
> 
> -Steve
> 
> 
> ---------- Forwarded message ----------
> From: Steve Conover <sconover at gmail.com>
> Date: Tue, Sep 28, 2010 at 11:19 PM
> Subject: Re: setTimeout and Safari
> To: webkit-help at lists.webkit.org
> 
> 
> Actually I am discovering what one might describe as a "normal"
> problem here...how to know when the setTimeout's are done firing.  The
> ideal would that I could somehow drill into the dom implementation and
> ask whether any setTimeout events are waiting to fire (and stop
> polling if the queue length is zero).
> 
> I'm sure that's way off in terms of how this is actually implemented.
> Does such a thing exist?  Could someone please point me to the
> relevant sourcecode?
> 
> Regards,
> Steve
> 
> On Tue, Sep 28, 2010 at 10:36 PM, Steve Conover <sconover at gmail.com> wrote:
>> Sigh.  Please disregard.  After an hour of troubleshooting, I sent
>> this email, and two minutes later realized the problem was bad js
>> (blush).
>> 
>> On Tue, Sep 28, 2010 at 10:22 PM, Steve Conover <sconover at gmail.com> wrote:
>>> I hope this is the right place to be asking this question.
>>> 
>>> I'm using the cocoa api, and am able to load a web page in a WebView.
>>> However I have some javascript in the page that uses setTimeout to
>>> cause a function to fire 100ms into the future - but the page loads
>>> and ignores the setTimeout's.
>>> 
>>> How do I get my setTimeout's to fire?  I suspect this has something to
>>> do with the Run Loop, but my experiments so far with various parts of
>>> the Run Loop api have been failures.
>>> 
>>> Regards,
>>> Steve
>>> 
>> 
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev



More information about the webkit-dev mailing list