MAPG-148 set xhr responseType after xhr open() because it is accepted by all browsers
This commit is contained in:
parent
efccb2dcc5
commit
ce96e15911
@ -2,11 +2,12 @@ var MapGuesser = {
|
||||
httpRequest: function (method, url, callback, data) {
|
||||
var xhr = new XMLHttpRequest();
|
||||
|
||||
xhr.responseType = 'json';
|
||||
xhr.onload = callback;
|
||||
|
||||
xhr.open(method, url, true);
|
||||
|
||||
xhr.responseType = 'json';
|
||||
|
||||
if (method === 'POST') {
|
||||
if (typeof data === 'undefined') {
|
||||
data = new FormData();
|
||||
|
Loading…
Reference in New Issue
Block a user