In addition to $uses, which is pretty slick, there's a mootools dependency loader coming out this week. In both cases, it's a best practice to pass in a function callback. MooTools does this with effects, chaining, ajax, etc.
On Tue, Sep 29, 2009 at 8:24 AM, Thierry bela nanga <[email protected]>wrote: > simply great! > > On Tue, Sep 29, 2009 at 4:14 PM, csuwldcat <[email protected]> wrote: > >> >> I made a really light weight one, check it out: >> http://blog.citycrawler.com/?p=47 >> >> On Sep 29, 7:49 am, pradador <[email protected]> wrote: >> > First off, I'm trying to implement a feature where scripts are >> > dynamically included into the page as needed. The code looks something >> > like thishttp://pastie.org/634998and here is the actual >> > implementation I'm using it in: >> http://lighterjs.code.pradador.com/browser/trunk/Lighter.js >> > >> > So my question is, is there any way to tell the loadScript function to >> > callback the function that called it in the first place? As it stands >> > right now, I have to pass in the function I want to call as a callback >> > for the load event. I remember the arguments.caller and callee >> > references but I believe these were deprecated. Is there any cross- >> > browser way to achieve this? >> > > > > -- > http://tbela99.blogspot.com/ > > fax : (+33) 08 26 51 94 51 >
