subscribe-ui-event
Advanced tools
Comparing version 0.2.6 to 0.2.7
@@ -8,3 +8,5 @@ /** | ||
var rAF = require('raf'); | ||
var getTime = Date.now || /* istanbul ignore next */ function() { | ||
return new Date().getTime(); | ||
}; | ||
function rAFThrottle(func, throttle) { | ||
@@ -17,3 +19,3 @@ var context; | ||
var later = function () { | ||
var now = +new Date; | ||
var now = getTime(); | ||
var remaining = throttle - (now - last); | ||
@@ -20,0 +22,0 @@ |
@@ -80,3 +80,3 @@ /** | ||
} | ||
if (!ee.listeners(eeType, true)) { | ||
if (!ee.listeners(eeType, true) && ehs[eeType]) { | ||
ehs[eeType].remove(); | ||
@@ -83,0 +83,0 @@ ehs[eeType] = undefined; |
{ | ||
"name": "subscribe-ui-event", | ||
"version": "0.2.6", | ||
"version": "0.2.7", | ||
"description": "A single, throttle built-in solution to subscribe to browser UI Events.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
32716
704