From 72500234b58cef951ffeef3a15c93c02a3018d20 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Tue, 5 Jul 2011 19:23:47 -0400 Subject: [PATCH] Removed support module. Typeof construct does not work reliably enough, and workarounds have been added to the event module --- kis.js | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/kis.js b/kis.js index e309a2e..e86512e 100644 --- a/kis.js +++ b/kis.js @@ -52,23 +52,6 @@ }; window.$ = $; - - /** - * Support - * - * Module for browser feature detection - */ - (function (){ - - var support = { - attachEvent: typeof window.attachEvent === "function", - addEventListener: typeof window.addEventListener === "function", - querySelector: typeof document.querySelectorAll === "function" - }; - - $_.support = support; - - }()); /** * Ajax @@ -291,17 +274,14 @@ * Event object * * Event api wrapper - * Requires Support module */ (function (){ - var attach, remove, add_remove, e, support; - - support = $_.support; + var attach, remove, add_remove, e; // Define the proper attach and remove functions // based on browser support - if(support.addEventListener === true) + if(typeof document.addEventListener !== "undefined") { attach = function (sel, event, callback) {