Made callback optional for ajax requests

This commit is contained in:
Timothy Warren 2011-06-28 08:00:12 -04:00
parent 5055bce0fc
commit 0fca7435f7

13
kis.js
View File

@ -63,6 +63,11 @@
},
_do: function(url, data, callback, isPost)
{
if(typeof callback === "undefined")
{
callback = function(){};
}
var request = this._req();
var type = (isPost) ? "POST" : "GET";
@ -259,7 +264,7 @@
*
* Event api wrapper
*/
(function(){
(function(){
var attach, remove, add_remove, e;
if(document.addEventListener)
@ -433,12 +438,6 @@
var cName = (cs.length > 1) ? cs.join(" ") : cs[0];
//Check if trim method exists
if(cName.trim)
{
cName = cName.trim();
}
if(typeof sel.className !== "undefined")
{
sel.className = cName;