setTimeout, async script loading, and head.js
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 |
From: Aaron Gibralter <aaron.gibral...@gmail.com>
Date: Mon, 7 Feb 2011 09:01:58 -0800 (PST)
Local: Mon, Feb 7 2011 12:01 pm
Subject: setTimeout, async script loading, and head.js
Is there anyway to test scripts that load other scripts asynchronously with head.js(...)? script 1: // ... head.js("/path/to/script2.js", "/path/to/script3.js", callback); // ... I want to test the functionality in the callback function, but it depends on having script2 and script3 loaded.
You must Sign in before you can post messages.
You do not have the permission required to post.
|
 |
From: Steven Parkes <smpar...@smparkes.net>
Date: Mon, 7 Feb 2011 09:17:41 -0800
Local: Mon, Feb 7 2011 12:17 pm
Subject: Re: [johnson-talk] setTimeout, async script loading, and head.js
On Feb 7, 2011, at 9:01 AM, Aaron Gibralter wrote: > Is there anyway to test scripts that load other scripts asynchronously with head.js(...)? > script 1: > // ... > head.js("/path/to/script2.js", "/path/to/script3.js", callback); > // ... > I want to test the functionality in the callback function, but it depends on having script2 and script3 loaded.
You could try something like envjs ( https://github.com/smparkes/env-js) or try to pull the timer code from there. setTimeout is part of the browser environment, not part of javascript.
You must Sign in before you can post messages.
You do not have the permission required to post.
|
 |
From: Aaron Gibralter <aaron.gibral...@gmail.com>
Date: Mon, 7 Feb 2011 13:21:58 -0500
Local: Mon, Feb 7 2011 1:21 pm
Subject: Re: [johnson-talk] setTimeout, async script loading, and head.js
But doesn't Johnson already use Envjs? Shouldn't Johnson load env.js's setTimeout code? On Mon, Feb 7, 2011 at 12:17 PM, Steven Parkes <smpar...@smparkes.net>wrote:
> On Feb 7, 2011, at 9:01 AM, Aaron Gibralter wrote: > > Is there anyway to test scripts that load other scripts asynchronously > with head.js(...)? > > script 1: > > // ... > > head.js("/path/to/script2.js", "/path/to/script3.js", callback); > > // ... > > I want to test the functionality in the callback function, but it depends > on having script2 and script3 loaded. > You could try something like envjs (https://github.com/smparkes/env-js) or > try to pull the timer code from there. > setTimeout is part of the browser environment, not part of javascript.
You must Sign in before you can post messages.
You do not have the permission required to post.
|
 |
From: Aaron Gibralter <aaron.gibral...@gmail.com>
Date: Mon, 7 Feb 2011 13:28:53 -0500
Local: Mon, Feb 7 2011 1:28 pm
Subject: Re: [johnson-talk] setTimeout, async script loading, and head.js
Ohh sorry, I'm thinking about Harmony... Harmony combines johnson and envjs... On Mon, Feb 7, 2011 at 1:21 PM, Aaron Gibralter <aaron.gibral...@gmail.com>wrote:
> But doesn't Johnson already use Envjs? Shouldn't Johnson load env.js's > setTimeout code? > On Mon, Feb 7, 2011 at 12:17 PM, Steven Parkes <smpar...@smparkes.net>wrote: >> On Feb 7, 2011, at 9:01 AM, Aaron Gibralter wrote: >> > Is there anyway to test scripts that load other scripts asynchronously >> with head.js(...)? >> > script 1: >> > // ... >> > head.js("/path/to/script2.js", "/path/to/script3.js", callback); >> > // ... >> > I want to test the functionality in the callback function, but it >> depends on having script2 and script3 loaded. >> You could try something like envjs (https://github.com/smparkes/env-js) >> or try to pull the timer code from there. >> setTimeout is part of the browser environment, not part of javascript.
You must Sign in before you can post messages.
You do not have the permission required to post.
|
|
|