Dojo on widget load event

I would like to know when the Dojo form widget is parsed or ready so that I can set it up dynamically. I am trying to achieve this with a method dojo.connect(). However, I am not sure which event to listen to. Is it onLoador onStartupor ..?

This is what I did, but it does not work:

dojo.connect(dijit.byId('myWidget'), 'onStartup', function(evt) {
   console.debug("test");
}

note that the part dijit.byId('myWidget')returns the object correctly, so this is not a problem.

+5
source share
4 answers

, (. ), , postCreate

+3

, "", "onStartup" :

dojo.connect(dijit.byId('myWidget'), 'startup', function(evt) {
   console.debug("test");
}
+2

. :

var myCp= registry.byId("myContentPane");
myCp.set("onDownloadEnd", function(){
    console.log("Download complete!");
});
myCp.set("href", "myHtml.html");
+1

All Articles