handle.read = function () {\r
return this.join("\n");\r
};\r
+ handle.xhr = xhr;\r
handle.write = function (text) {\r
- xhr.open("POST", fileName);\r
- xhr.setRequestHeader("Content-Type" , "application/x-www-form-urlencoded");\r
- xhr.send(text);\r
+ this.xhr.open("POST", fileName);\r
+ this.xhr.setRequestHeader("Content-Type" , "application/x-www-form-urlencoded");\r
+ this.xhr.send(text);\r
return text;\r
};\r
xhr.onreadystatechange = function() {\r
if (fileNames.length !== 0) {\r
fileName = fileNames.shift();\r
f();\r
- } else { //Load End\r
+ } else { //Load End\r
xhr.onreadystatechange = Function.empty; //to solve the problem about a memory leak for IE 8\r
that(handle);\r
text = fileNames = xhr = handle = f = that = void 0;\r