On Wed, Sep 9, 2009 at 11:10 PM, Aaron Boodman <[email protected]> wrote:
> On Wed, Sep 9, 2009 at 9:00 PM, Trevor Bramble<[email protected]> 
> wrote:
>> function refreshTimeline(){
>>        setTimeout("$('#primary_nav>li.active>a').click();",60000);
>>        refreshTimeline();
>> }
>> refreshTimeline();
>
> This is going to infinitely recurse. You need to delay the call to
> refreshTimeline as well. Unfortunately, doing the obvious thing --
> moving refreshTimeline into the string passed to setTimeout() isn't
> going to work because of isolated worlds [1].
>
> So you're going to need the other form of setTimeout that takes a
> function [2]. Inside the function, you can put the code you have now,
> plus a call to call refreshTimeline() again.

It's interesting that this code sample uses the string form of
setTimeout to inject script into the main world.  Are we sure we want
to change that to compile the string argument in the isolated world?

Adam

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Chromium-extensions" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/chromium-extensions?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to