Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    prevent-defaultpublic

    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);

    install

    npm i prevent-default

    Downloadslast 7 days

    45

    version

    1.0.0

    license

    MIT

    repository

    github.com

    last publish

    collaborators

    • avatar