Use $.queueTask in $.ready.

This commit is contained in:
Nicolas Stepien 2012-08-27 03:07:18 +02:00
parent f57ef16bb7
commit 320ae65b36
2 changed files with 2 additions and 9 deletions

View File

@ -313,11 +313,7 @@
ready: function(fc) {
var cb;
if (/interactive|complete/.test(d.readyState)) {
try {
fc();
} finally {
return;
}
$.queueTask(fc);
}
cb = function() {
$.off(d, 'DOMContentLoaded', cb);

View File

@ -263,10 +263,7 @@ $.extend $,
d.getElementById id
ready: (fc) ->
if /interactive|complete/.test d.readyState
try
fc()
finally
return
$.queueTask fc
cb = ->
$.off d, 'DOMContentLoaded', cb
fc()