Comparing version 0.0.4 to 0.0.5
11
index.js
@@ -24,3 +24,3 @@ /** | ||
var prefix = "", _addEventListener, _removeEventListener, onwheel, support; | ||
var prefix = "", _addEventListener, _removeEventListener, support; | ||
@@ -37,3 +37,3 @@ detectEventModel(typeof window !== 'undefined' && window, | ||
} | ||
}; | ||
} | ||
@@ -47,8 +47,8 @@ function removeWheelListener( elem, callback, useCapture ) { | ||
} | ||
}; | ||
} | ||
function _addWheelListener( elem, eventName, callback, useCapture ) { | ||
// TODO: in theory this anonymous function may result in incorrect | ||
// unsubscription in some browsers. But in practice, I don't think we should | ||
// worry too much about it (those browsers are on the way out) | ||
function _addWheelListener( elem, eventName, callback, useCapture ) { | ||
elem[ _addEventListener ]( prefix + eventName, support == "wheel" ? callback : function( originalEvent ) { | ||
@@ -65,3 +65,4 @@ !originalEvent && ( originalEvent = window.event ); | ||
deltaX: 0, | ||
delatZ: 0, | ||
deltaY: 0, | ||
deltaZ: 0, | ||
clientX: originalEvent.clientX, | ||
@@ -68,0 +69,0 @@ clientY: originalEvent.clientY, |
{ | ||
"name": "wheel", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Mouse wheel event unified for all browsers", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7112
109