dojo how to override dijit class method
问题 I need to override onClick method in the Tree.js. Is there any common way to override dojo/dijit classes methods? 回答1: You could use: dojo.connect(tree, 'onClick', function(item) { /** Your Action **/ }); 回答2: I'm a bit confused, since you were already doing this in the last question you posted. You've got a few choices, depending on what you want to do. Clobbering method stubs In the case of true stubs like onClick , it's potentially as easy as clobbering that method on your widget instance.