Browse files

Added removeEventListener

  • Loading branch information...
1 parent 27209e8 commit e8cdc83b6a8b602ae43e7ddb2625fc7d5797f2aa @josher19 josher19 committed Dec 19, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 function-patterns/init-time-branching.html
View
5 function-patterns/init-time-branching.html
@@ -36,6 +36,9 @@
utils.addListener = function (el, type, fn) {
el.addEventListener(type, fn, false);
};
+ utils.removeListener = function(el, type, fn) {
+ el.removeEventListener(type, fn, false);
+ };
} else if (typeof document.attachEvent !== 'undefined') { // IE
utils.addListener = function (el, type, fn) {
el.attachEvent('on' + type, fn);
@@ -57,4 +60,4 @@
// http://shop.oreilly.com/product/9780596806767.do?sortby=publicationDate
</script>
</body>
-</html>
+</html>

0 comments on commit e8cdc83

Please sign in to comment.