Aah, you are right, my bad, it was ment as a definition: var myfunc = function... instead of calling it.
On Nov 10, 5:23 pm, Aaron Newton <[email protected]> wrote: > but your example also calls it after it. > > On Tue, Nov 10, 2009 at 5:20 AM, electronbender > <[email protected]>wrote: > > > > > > > I am calling myfunc inside the onload function. > > > On Nov 10, 1:44 pm, batman42ca <[email protected]> wrote: > > > Asset is asynchronous. This means that when you call myfunc(foo) > > > outside the call to Asset.javascript, there is no guarantee that > > > file1.js has loaded yet. > > > > When you call myfunc() inside the onload() function, that is where > > > it's guaranteed that file1.js has been loaded.
