passing some argument to the callback function of WinJs xhr
问题 In Windows 8, I am using WinJs.xhr in a loop to download some content, and as it arrives afterward to the "done callback", I would like to pass an argument to retrieve the element who call xhr. for (var k = 0 ; k < 9; k++) { var title = dataArray[k].name; if (title != null) url = monUrl+ title; WinJS.xhr({ url: url, responseType: "responseXML" }) .done(function complete(result) { //I would like to retrieve the right title here for example var dataArray = new Array(); var xml = result