Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
wheel-indicator
Advanced tools
Generates event when user makes new movement (like a touchstart
on a touchscreen).
<script src="wheel-indicator.js"></script>
or if you use build system:
var WheelIndicator = require('wheel-indicator');
var indicator = new WheelIndicator({
elem: document.querySelector('.element'),
callback: function(e){
console.log(e.direction) // "up" or "down"
}
});
//The method call
indicator.getOption('preventMouse'); // true
Field | Type | Default value | Mutable (by setOptions() ) | Description |
---|---|---|---|---|
elem | Object (dom node) | document | No | Dom node to listen wheel event on. |
callback | Function | - | Yes | The callback, which will be triggered on gesture. Gets for the first argument a native wheel event object, extended by direction property, taking value 'up' or 'down' . |
preventMouse | Bool | true | Yes | Disables mouse wheel working. In other words apply preventDefault() to wheel event. |
| Method | Description |
| ------- | ------- | ---------------------------------------- |
| turnOff()
| Turn off callback triggering |
| turnOn()
| Turn on callback trigerring |
| setOptions( options )
| Sets the mutable options. The only argument must be Object
. |
| getOption( 'option' )
| Returns option value. The only argument must be String
. |
| destroy( )
| Removes event listener. |
FAQs
normalizes an inertial mousewheel
We found that wheel-indicator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.