AnsweredAssumed Answered

dojo/on versus dojo.connect

Question asked by s.mendleresri-de-esridist Employee on Oct 24, 2012
Latest reply on May 23, 2013 by DSwingley-esristaff
Hi,

when i try to substitute

dojo.connect(map, "onLoad) function(){
  // do something;
};

with

require(["dojo/on"], function(on){
    on(map, "onLoad", function(){
      // do something;
    });
});

Dojo throws an error:
Target must be an event emitter

Any ideas?

Regards
Stephan

Outcomes