Merged in bugfix/MAPG-148-fix-xmlhttp-responsetype-error (pull request #118)
MAPG-148 set xhr responseType after xhr open() because it is accepted by all browsers
This commit is contained in:
commit
43775c8f4f
@ -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