[Celerity-users] Loading Dojo from Google CDN

Jari Bakken jari.bakken at gmail.com
Thu Jul 30 10:32:00 EDT 2009


On Wed, Jul 29, 2009 at 7:31 PM, Ashley Moran <ashley.moran at patchspace.co.uk
> wrote:

>
> On 29 Jul 2009, at 17:36, Jari Bakken wrote:
>
>  On Wed, Jul 29, 2009 at 4:58 PM, Ashley Moran <
>> ashley.moran at patchspace.co.uk> wrote:
>>
>> Is there a good way round this asynchronous loading issue?
>>
>>  Have you tried :resynchronize => true? See
>> http://wiki.github.com/jarib/celerity/ajax for details.
>>
>
>
> Hi Jari
>
> Yes, we already use that.  Unfortunately, because it's not a user-invoked
> JavaScript thread (it's on the page load), you have to wait on it
> separately.
>
> Any other ideas?  I'm at a loss...
>
>
Ideas:

1. Subclass com.gargoylesoftware.htmlunit.AjaxController and make it
synchronize requests that matches your criteria.
2. Use Browser#add_checker to call #wait after page loads (perhaps checking
a list of URLs to see if it's needed)
3. Write to the HtmlUnit list and ask for better ideas :)
The best solution is probably #1, here's an example how it might look
(untested):

http://gist.github.com/158714

(Perhaps we should add something to Celerity that does this for you - let
the user provide a lambda that will decide whether or not to process the
call synchronously. API suggestions welcome!)

jb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/celerity-users/attachments/20090730/23716f86/attachment.html>


More information about the Celerity-users mailing list