A coworker suggested that a better, modern (dojo 1.9.2) way to do this is:
define([
"dojo/dom",
"dojo/on"
], function (dom, on) {
return {
init: function(current, data) {
var self = this;
dojo.addOnLoad( function() {
on(dom.byId('locale'), "change", function(evt) {
alert(self.locale.value);
dojo.stopEvent(evt);
});
});
},
No comments:
Post a Comment