dojo.stopEvent¶
Prevents propagation and clobbers the default action of the passed event. The same as calling event.preventDefault()
and event.stopPropagation()
on some passed event.
Dojo 1.7 (AMD)¶
require(["dojo/ready", "dojo/dom", "dojo/_base/connect", "dojo/_base/event"], function(ready, dom, connect, event){
ready(function(){
var node = dom.byId("delete");
connect.connect(node, "onclick", function(e){
event.stop(e); // prevents default link execution
// some code custom execution
});
});
});
<a href="/delete" id="delete">Delete</a>