src/core.js
function Ajax(method, url, sendData) {
	DOMEventListener.call(this);
	
	/**
	 * Request object.
	 *
	 * @access protected
	 * @type {XMLHttpRequest}
	 */
	this._request = new Ajax.XHRSystem();

	/**
	 * Method of the request.
	 *
	 * @access protected 
	 * @type {String}
	 */
	this._method = method;

	/**
	 * Address of request.
	 *
	 * @access protected
	 * @type {String}
	 */
	this._url = url;

	/**
	 * Data to send.
	 *
	 * @access protected
	 * @type {(Object|String)}
	 */
	this._sendData = sendData;
	
	/**
	 * The content type of sending data.
	 * 
	 * @access public
	 * @type {String}
	 */
	this.contentType = "application/binary";

	/**
	 * Context conatiner.
	 * @access private
	 */
	var self = this;
	
	/**
	 * Override onload of XMLHTTPRequest.
	 * Convert callback function into `Event`.
	 */
	this._request.onload = function (event) {
		self.dispatchEvent(
			new Ajax.Event(Ajax.Event.LOAD, {
				response: self._request.response,
				responseText: self._request.responseText,
				responseType: self._request.responseType,
				responseURL: self._request.responseURL,
				responseXML: self._request.responseXML,
				status: self._request.status,
				lengthComputable: event.lengthComputable,
				loaded: event.loaded,
				total: event.total
			})
			);
	};
	
	/**
	 * Override onprogress of XMLHTTPRequest.
	 * Convert callback function into `Event`.
	 */
	this._request.onprogress = function (event) {
		self.dispatchEvent(
			new Ajax.Event(Ajax.Event.PROGRESS, {
				lengthComputable: event.lengthComputable,
				loaded: event.loaded,
				total: event.total
			})
			);
	};
}
function Ajax(method, url, sendData) {
	DOMEventListener.call(this);
	
	/**
	 * Request object.
	 *
	 * @access protected
	 * @type {XMLHttpRequest}
	 */
	this._request = new Ajax.XHRSystem();

	/**
	 * Method of the request.
	 *
	 * @access protected 
	 * @type {String}
	 */
	this._method = method;

	/**
	 * Address of request.
	 *
	 * @access protected
	 * @type {String}
	 */
	this._url = url;

	/**
	 * Data to send.
	 *
	 * @access protected
	 * @type {(Object|String)}
	 */
	this._sendData = sendData;
	
	/**
	 * The content type of sending data.
	 * 
	 * @access public
	 * @type {String}
	 */
	this.contentType = "application/binary";

	/**
	 * Context conatiner.
	 * @access private
	 */
	var self = this;
	
	/**
	 * Override onload of XMLHTTPRequest.
	 * Convert callback function into `Event`.
	 */
	this._request.onload = function (event) {
		self.dispatchEvent(
			new Ajax.Event(Ajax.Event.LOAD, {
				response: self._request.response,
				responseText: self._request.responseText,
				responseType: self._request.responseType,
				responseURL: self._request.responseURL,
				responseXML: self._request.responseXML,
				status: self._request.status,
				lengthComputable: event.lengthComputable,
				loaded: event.loaded,
				total: event.total
			})
			);
	};
	
	/**
	 * Override onprogress of XMLHTTPRequest.
	 * Convert callback function into `Event`.
	 */
	this._request.onprogress = function (event) {
		self.dispatchEvent(
			new Ajax.Event(Ajax.Event.PROGRESS, {
				lengthComputable: event.lengthComputable,
				loaded: event.loaded,
				total: event.total
			})
			);
	};
}
function Ajax ( method , url , sendData ) { DOMEventListener . call ( this ) ; /**
	 * Request object.
	 *
	 * @access protected
	 * @type {XMLHttpRequest}
	 */ this . _request = new Ajax . XHRSystem ( ) ; /**
	 * Method of the request.
	 *
	 * @access protected 
	 * @type {String}
	 */ this . _method = method ; /**
	 * Address of request.
	 *
	 * @access protected
	 * @type {String}
	 */ this . _url = url ; /**
	 * Data to send.
	 *
	 * @access protected
	 * @type {(Object|String)}
	 */ this . _sendData = sendData ; /**
	 * The content type of sending data.
	 * 
	 * @access public
	 * @type {String}
	 */ this . contentType = "application/binary" ; /**
	 * Context conatiner.
	 * @access private
	 */ var self = this ; /**
	 * Override onload of XMLHTTPRequest.
	 * Convert callback function into `Event`.
	 */ this . _request . onload = function ( event ) { self . dispatchEvent ( new Ajax . Event ( Ajax . Event . LOAD , { response : self . _request . response , responseText : self . _request . responseText , responseType : self . _request . responseType , responseURL : self . _request . responseURL , responseXML : self . _request . responseXML , status : self . _request . status , lengthComputable : event . lengthComputable , loaded : event . loaded , total : event . total } ) ) ; } ; /**
	 * Override onprogress of XMLHTTPRequest.
	 * Convert callback function into `Event`.
	 */ this . _request . onprogress = function ( event ) { self . dispatchEvent ( new Ajax . Event ( Ajax . Event . PROGRESS , { lengthComputable : event . lengthComputable , loaded : event . loaded , total : event . total } ) ) ; } ; }
Asynchronous JavaScript and XML.
Wrapper to equalize and simplify the usage for AJAX calls.

@constructor
@param {String}          method   - Type of request (get, post, put, ...).
@param {String}          url      - Request address.
@param {(Object|String)} sendData - Data to send.
Asynchronous JavaScript and XML . Wrapper to equalize and simplify the usage for AJAX calls .