Skip to content
master
Go to file
Code
This branch is 2 commits ahead of yields:master.

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

prevent

CircleCI Codecov

Cross-browser preventDefault

Installation

$ npm install @segment/prevent-default

Example

anchor.onclick = require('prevent');
anchor.onclick = function(e){
  if (something) return require('prevent')(e);
};

API

prevent(e)

Prevent the given e, if the argument is omitted, the method will fallback to window.event.

About

Cross browser prevent default, because microsoft is awesome.

Resources

License

Packages

No packages published
You can’t perform that action at this time.