Home | History | Annotate | Download | only in webapp

Lines Matching defs:xhr

173       var xhr = new XMLHttpRequest;
174 this.pendingXhrs_[id] = xhr;
175 xhr.open(method, url, true, user, password);
180 xhr.setRequestHeader(header, headers[header]);
183 xhr.onreadystatechange = this.onReadyStateChange_.bind(this, id);
184 xhr.send(data);
193 var xhr = this.pendingXhrs_[id]
194 if (!xhr) {
199 xhr.abort();
208 * Return a "copy" of an XHR object suitable for postMessage. Specifically,
211 * @param {XMLHttpRequest} xhr The XHR to serialize.
214 function sanitizeXhr_(xhr) {
217 readyState: xhr.readyState,
218 response: xhr.response,
219 responseText: xhr.responseText,
220 responseType: xhr.responseType,
221 responseXML: xhr.responseXML,
222 status: xhr.status,
223 statusText: xhr.statusText,
224 withCredentials: xhr.withCredentials
230 * @param {number} id The unique ID of the XHR for which the state has changed.
234 var xhr = this.pendingXhrs_[id];
235 if (!xhr) {
238 console.error('Unexpected callback for xhr', id);
244 'xhr': sanitizeXhr_(xhr)
247 if (xhr.readyState == 4) {