prevent-default
v1.0.0
Published
Prevent-default decorator for DOM listeners
Downloads
70
Maintainers
Readme
prevent-default
A prevent-default decorator for DOM listeners
Example
var listener = preventDefault(function(ev) {
alert("Default prevented! "+ev.defaultPrevented);
});
document.getElementsByTagName('body')[0].addEventListener("click", listener);