I'd like to wrap Prototype Ajax.Request in order to simulate AJAX latency. I mean, using a closure and Prototype's delay() facility, but apparently there is something wrong with my code
/*
* Purpose: simulate AJAX latency when developing on localhost
* What's wrong?
*/
Ajax.Request = (function(original) {
return function(url, options) {
return original.delay(1, url, options);
};
}) (Ajax.Request);