##// END OF EJS Templates
hgweb: rename an instance of XMLHttpRequest to xhr in mercurial.js...
av6 -
r35160:018aac6d default
parent child Browse files
Show More
@@ -297,12 +297,12 b' function format(str, replacements) {'
297 297 }
298 298
299 299 function makeRequest(url, method, onstart, onsuccess, onerror, oncomplete) {
300 xfr = new XMLHttpRequest();
301 xfr.onreadystatechange = function() {
302 if (xfr.readyState === 4) {
300 xhr = new XMLHttpRequest();
301 xhr.onreadystatechange = function() {
302 if (xhr.readyState === 4) {
303 303 try {
304 if (xfr.status === 200) {
305 onsuccess(xfr.responseText);
304 if (xhr.status === 200) {
305 onsuccess(xhr.responseText);
306 306 } else {
307 307 throw 'server error';
308 308 }
@@ -314,11 +314,11 b' function makeRequest(url, method, onstar'
314 314 }
315 315 };
316 316
317 xfr.open(method, url);
318 xfr.overrideMimeType("text/xhtml; charset=" + document.characterSet.toLowerCase());
319 xfr.send();
317 xhr.open(method, url);
318 xhr.overrideMimeType("text/xhtml; charset=" + document.characterSet.toLowerCase());
319 xhr.send();
320 320 onstart();
321 return xfr;
321 return xhr;
322 322 }
323 323
324 324 function removeByClassName(className) {
General Comments 0
You need to be logged in to leave comments. Login now