javascript - Simulate AJAX latency with a wrapping closure -


I prototype ajax to simulate AJAX latency I want to wrap the request. I mean, using the feature of closure and delay of prototype (), but apparently there is something wrong with my code

  / * * Objective: AJAX while developing on a local host Simulation of procrastination * What's wrong? * / Ajax.Request = (function (original) {return function (url, options) {returning original (1, url, options)}}}}) (ajax request);  

This worked for me (prototype 1.6.1):

< Previous> Ajax request. Protopp Start = Ajax. request. Start Prototype IR; Ajax.Request.prototype.initialize = function ($ super, url, options) {come back. Start (stop). Disley (2, $ super, url, options); };

I believe that the method signing for Ajax.Request.prototype.in initialize is different in the old version of the prototype (i.e. the $ super parameter) .

However this will update it for all Ajax requests.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -