Hello,
Is there a way to define a dojo/method programatically, in a JavaScript function? (Instead of defining it through script type="dojo/method" within a declarative widget, for example.)
Thanks!
Hello,
Is there a way to define a dojo/method programatically, in a JavaScript function? (Instead of defining it through script type="dojo/method" within a declarative widget, for example.)
Thanks!
Just override it directly on a widget. For example, if you wrote dojo/method
for abc
, do it like that:
var myWidget = ...;
myWidget.abc = function(/* args from dojo/method */){
// the body of dojo/method
};