Add web front-end and fix API issues
This commit is contained in:
1 parent
45ca4de0ad
commit
a7524412f0
2571 files changed
+86998
-5
No files matched your search
+26
@@ -0,0 +1,26 @@
|
||||
export function getXHRResponse(xhr) {
|
||||
switch (xhr.responseType) {
|
||||
case 'json': {
|
||||
if ('response' in xhr) {
|
||||
return xhr.response;
|
||||
}
|
||||
else {
|
||||
const ieXHR = xhr;
|
||||
return JSON.parse(ieXHR.responseText);
|
||||
}
|
||||
}
|
||||
case 'document':
|
||||
return xhr.responseXML;
|
||||
case 'text':
|
||||
default: {
|
||||
if ('response' in xhr) {
|
||||
return xhr.response;
|
||||
}
|
||||
else {
|
||||
const ieXHR = xhr;
|
||||
return ieXHR.responseText;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=getXHRResponse.js.map
|
||||
Reference in new issue
Block a user