Home | History | Annotate | Download | only in profviz

Lines Matching defs:xhr

137     var xhr = new XMLHttpRequest();
138 xhr.open('GET', url, false);
139 xhr.send(null);
140 return xhr.responseText;
1209 var xhr = new XMLHttpRequest();
1210 xhr.open('HEAD', url, false);
1211 xhr.send(null);
1212 if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status);
1213 var datalength = Number(xhr.getResponseHeader("Content-length"));
1215 var hasByteServing = (header = xhr.getResponseHeader("Accept-Ranges")) && header === "bytes";
1223 var xhr = new XMLHttpRequest();
1224 xhr.open('GET', url, false);
1225 if (datalength !== chunkSize) xhr.setRequestHeader("Range", "bytes=" + from + "-" + to);
1227 if (typeof Uint8Array != 'undefined') xhr.responseType = 'arraybuffer';
1228 if (xhr.overrideMimeType) {
1229 xhr.overrideMimeType('text/plain; charset=x-user-defined');
1231 xhr.send(null);
1232 if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status);
1233 if (xhr.response !== undefined) {
1234 return new Uint8Array(xhr.response || []);
1236 return intArrayFromString(xhr.responseText || '', true);
2109 for (var i = 0; i < size; i++) { // LazyUint8Array from sync binary XHR
4295 var xhr = new XMLHttpRequest();
4296 xhr.open('GET', url, true);
4297 xhr.responseType = 'arraybuffer';
4298 xhr.onload = function() {
4299 if (xhr.status == 200 || (xhr.status == 0 && xhr.response)) { // file URLs can return 0
4300 onload(xhr.response);
4305 xhr.onerror = onerror;
4306 xhr.send(null);