I want to delay a prepared method call (prepared= all parameters already set) for execution. Example:
I have a textfield with the following listener method:
var storedRequest = null;
function doAjaxRequest() {
//if there is no request at this moment, do the request
//otherwise: store the request and do nothing
}
//will be executed after a request is done
function callbackAjaxRequestComplete() {
//is storedRequest != null --> Execute that request (the last one)
}
So, is there a possiblity to store a PREPARED method call for execution?
var preparedMethod = method.bind(null, param1, param2, param3 /*, ... etc */);Function.prototype.bind[docs]