Removed IE 8 support, slimmed event module, updated README

This commit is contained in:
Timothy Warren 2011-06-28 20:38:47 -04:00
parent 0fca7435f7
commit ae0ca88cc2
2 changed files with 19 additions and 39 deletions

View File

@ -4,7 +4,7 @@ A Minimal, Modular Javascript library for Modern browsers.
Aims to be fast, small, and easily split into individual modules.
Browser support: IE8+, Latest versions of Firefox, Chrome, Safari, Opera
Browser support: IE9+, Latest versions of Firefox, Chrome, Safari, Opera
## Basic Use: ##

52
kis.js
View File

@ -57,9 +57,9 @@
var ajax = {
_req: function()
{
return (window.XMLHttpRequest)
return (typeof window.XMLHttpRequest === "function")
? new XMLHttpRequest()
: new ActiveXObject("Microsoft.XMLHTTP");
: false;
},
_do: function(url, data, callback, isPost)
{
@ -267,42 +267,22 @@
(function(){
var attach, remove, add_remove, e;
if(document.addEventListener)
{
attach = function(sel, event, callback)
{
if(sel.addEventListener)
{
sel.addEventListener(event, callback, false);
}
};
remove = function(sel, event, callback)
{
if(sel.removeEventListener)
{
sel.removeEventListener(event, callback, false);
}
};
}
else
{
attach = function(sel, event, callback)
{
if(sel.attachEvent)
{
sel.attachEvent("on"+event, callback);
}
};
attach = function(sel, event, callback)
{
if(typeof sel.addEventListener === "function")
{
sel.addEventListener(event, callback, false);
}
};
remove = function(sel, event, callback)
{
if(sel.detachEvent)
{
sel.detachEvent("on"+event, callback);
}
};
}
remove = function(sel, event, callback)
{
if(typeof sel.removeEventListener === "function")
{
sel.removeEventListener(event, callback, false);
}
};
add_remove = function (sel, event, callback, add)
{