Opening this so we can discuss a generic api for both Drupal 6 and 7 for implementing script-loaders.

Comments

jcisio’s picture

What I discussed with alexweber is to have a simple API for JS loader, currently a JSloader.load() and a JSloader.ready event. JSloader.load() loads scripts in parallel (and non-blocking) but executes them in the correct order (as there are only 2 scripts that we're sure that we can execute them in parallel: jQuery & drupal.js, so we don't care).

All JS loaders support these two functionalities, what we needs is just a 100-byte abstraction layer for each JS loader.

As the author of labjs.module, but I keep in mind this API when developing the module and try to looking for other functionality what we might need. Of course, at the same time, to fix any compatibility problem (sadly recently I haven't had enough time to take care of that module, but it will be fixed in the next 1 or 2 weeks).

vacilando’s picture

Subscribing.

Fidelix’s picture

Subscribing...
Is there going to be a D6 version of this module?