开发者

dojo:how to know whether a event handler is bound to a particular dom element

开发者 https://www.devze.com 2023-03-16 01:14 出处:网络
Say for example i have clickHandler a function, then i do dojo.connect(开发者_如何学JAVAdomEl,\'click\',clickHandler).

Say for example i have clickHandler a function, then i do

dojo.connect(开发者_如何学JAVAdomEl,'click',clickHandler).

Is there any wayto check whether clickHandler is used as a click event handler for domEl using dojo?


Yes. For example:

var clickHandler = function(evt) {
    var domEl = evt.target;
    // Now domEl is dom node where the click ocurred
    ...
}
0

精彩评论

暂无评论...
验证码 换一张
取 消