Skip to content

Commit

Permalink
moved dojo.ready calls in base to dojo/ready module; added feature to…
Browse files Browse the repository at this point in the history
… load parser as per #12907; fixes #12907; refs #13113

git-svn-id: http://svn.dojotoolkit.org/src/dojo/trunk@25467 560b804f-0ae3-0310-86f3-f6aa0a117693
  • Loading branch information
rcgill committed Jun 8, 2011
1 parent e04e4f6 commit c8a6b71
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
9 changes: 0 additions & 9 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,5 @@ define([
}
}

// dojoConfig.addOnLoad is deprecated; use require.ready
has.add("dojo-config-addOnLoad", 1);
if(has("dojo-config-addOnLoad")){
var addOnLoad= dojo.config.addOnLoad;
if(addOnLoad){
dojo.ready(dojo.isArray(addOnLoad) ? dojo.hitch.apply(dojo, addOnLoad) : addOnLoad);
}
}

return dojo;
});
17 changes: 17 additions & 0 deletions ready.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,22 @@ define(["./_base/kernel", "./has", "require", "./domReady", "./_base/lang"], fun
}
});

has.add("dojo-config-addOnLoad", 1);
if(has("dojo-config-addOnLoad")){
var addOnLoad= dojo.config.addOnLoad;
if(addOnLoad){
dojo.ready(dojo.isArray(addOnLoad) ? dojo.hitch.apply(dojo, addOnLoad) : addOnLoad);
}
}

if(has("dojo-sync-loader") && dojo.config.parseOnLoad && !dojo.isAsync){
ready(99, function(){
if(!dojo.parser){
dojo.deprecated("Add explicit dojo.require('dojo.parser');", "", "2.0");
dojo.require("dojo.parser");
}
});
}

return ready;
});

0 comments on commit c8a6b71

Please sign in to comment.