Hi,

> But I don't understand the drawback. If the loaded scripts are evaluated as
> soon as they are loaded, before calling the callback in $.getScript AFAIK,
> there should be no problem, except that getScript does not support library
> registration, so there is a risk for looping indefinitely.

$.getScript() is assynchonous. That means, that it returns before the script 
is loaded.

---- myscript.js
$.getScript('anotherscript.js', function() {
        alert('test');
});
----

$getScript('myscript.js', function() {
        // anotherscript.js has not been loaded here and the alertbox is not yet
        // there.
});

That is why JSAN loads the scripts synchronously and why jsPax needs slightly 
modified scripts so that it can load them assynchonously.

Christof

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to