The following refactoring of this makes circumstances such that the whole of the HTML page using this module must load before the code will run. I think domReady! needs to be the last module dependency listed in the define array.
define(["dojo/dom", "dojo/domReady!"], function(dom){
return {
myThing: function(id){
var node = dom.byId(id);
node.innerHTML = "Tom!"
}
};
});
No comments:
Post a Comment