hyperscript
Advanced tools
Comparing version 1.4.3 to 1.4.4
24
index.js
@@ -54,13 +54,15 @@ var split = require('browser-split') | ||
if(/^on\w+/.test(k)) { | ||
if (e.addEventListener){ | ||
e.addEventListener(k.substring(2), l[k], false) | ||
cleanupFuncs.push(function(){ | ||
e.removeEventListener(k.substring(2), l[k], false) | ||
}) | ||
}else{ | ||
e.attachEvent(k, l[k]) | ||
cleanupFuncs.push(function(){ | ||
e.detachEvent(k, l[k]) | ||
}) | ||
} | ||
(function (k, l) { // capture k, l in the closure | ||
if (e.addEventListener){ | ||
e.addEventListener(k.substring(2), l[k], false) | ||
cleanupFuncs.push(function(){ | ||
e.removeEventListener(k.substring(2), l[k], false) | ||
}) | ||
}else{ | ||
e.attachEvent(k, l[k]) | ||
cleanupFuncs.push(function(){ | ||
e.detachEvent(k, l[k]) | ||
}) | ||
} | ||
})(k, l) | ||
} else { | ||
@@ -67,0 +69,0 @@ // observable |
{ | ||
"name": "hyperscript", | ||
"version": "1.4.3", | ||
"version": "1.4.4", | ||
"homepage": "https://github.com/dominictarr/hyperscript", | ||
@@ -5,0 +5,0 @@ "repository": { |
46303
265