Removed IE 8 support, slimmed event module, updated README
This commit is contained in:
parent
0fca7435f7
commit
ae0ca88cc2
@ -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: ##
|
||||
|
||||
|
30
kis.js
30
kis.js
@ -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,11 +267,10 @@
|
||||
(function(){
|
||||
var attach, remove, add_remove, e;
|
||||
|
||||
if(document.addEventListener)
|
||||
{
|
||||
|
||||
attach = function(sel, event, callback)
|
||||
{
|
||||
if(sel.addEventListener)
|
||||
if(typeof sel.addEventListener === "function")
|
||||
{
|
||||
sel.addEventListener(event, callback, false);
|
||||
}
|
||||
@ -279,30 +278,11 @@
|
||||
|
||||
remove = function(sel, event, callback)
|
||||
{
|
||||
if(sel.removeEventListener)
|
||||
if(typeof sel.removeEventListener === "function")
|
||||
{
|
||||
sel.removeEventListener(event, callback, false);
|
||||
}
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
attach = function(sel, event, callback)
|
||||
{
|
||||
if(sel.attachEvent)
|
||||
{
|
||||
sel.attachEvent("on"+event, callback);
|
||||
}
|
||||
};
|
||||
|
||||
remove = function(sel, event, callback)
|
||||
{
|
||||
if(sel.detachEvent)
|
||||
{
|
||||
sel.detachEvent("on"+event, callback);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
add_remove = function (sel, event, callback, add)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user