Home | History | Annotate | Download | only in webapp

Lines Matching defs:xhr

209       var xhr = new XMLHttpRequest;
210 this.pendingXhrs_[id] = xhr;
211 xhr.open(method, url, true, user, password);
216 xhr.setRequestHeader(header, headers[header]);
219 xhr.onreadystatechange = this.onReadyStateChange_.bind(this, id);
220 xhr.send(data);
229 var xhr = this.pendingXhrs_[id]
230 if (!xhr) {
235 xhr.abort();
244 * Return a "copy" of an XHR object suitable for postMessage. Specifically,
247 * @param {XMLHttpRequest} xhr The XHR to serialize.
250 function sanitizeXhr_(xhr) {
253 readyState: xhr.readyState,
254 response: xhr.response,
255 responseText: xhr.responseText,
256 responseType: xhr.responseType,
257 responseXML: xhr.responseXML,
258 status: xhr.status,
259 statusText: xhr.statusText,
260 withCredentials: xhr.withCredentials
266 * @param {number} id The unique ID of the XHR for which the state has changed.
270 var xhr = this.pendingXhrs_[id];
271 if (!xhr) {
274 console.error('Unexpected callback for xhr', id);
280 'xhr': sanitizeXhr_(xhr)
283 if (xhr.readyState == 4) {