wrap-prevent-default
Wrap an event handler so that it will e.preventDefault() for you when available. (i.e. also works if you call it directly)
var prevDflt = ; var handler = ; //attach it to the onclick handler somehow... (library and framework agnostic)// i.e. <a onclick="handler" ...>...//when it's clicked it will preventDefault() //you can also call it directly and it'll still work;
this
works as you would expect.- All arguments are passed on to your handler as you would expect.
License
MIT