All pastes #110302 Raw Edit

Unnamed

public text v1 · immutable
·published 2006-08-01 15:02 UTC
rendered paste body
function AjaxWorker(remoteTarget, customRequestHandler) {
	this.sendRequest = sendRequest;
	this.createRequestObject = createRequestObject;

	this.remoteTarget = remoteTarget;
	this.customRequestHandler = customRequestHandler;
	this.request = createRequestObject();
	
	this.requestHandler = function() { 
		if(this.request.readyState == 4) {
			this.custumRequestHandler();
		}
	};
}