Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IE8 compatibility #9

Closed
mpetazzoni opened this issue Aug 21, 2013 · 2 comments
Closed

IE8 compatibility #9

mpetazzoni opened this issue Aug 21, 2013 · 2 comments
Assignees

Comments

@mpetazzoni
Copy link
Owner

On IE8 the XML isn't loaded into the responseXML object of the XMLHttpRequest but in response with the content type set to text/xml. The loading handler should be changed to something like this:

req.onreadystatechange = function() {
  if (req.readyState != 4) return;
  if (req.status == 200) {
      if (req.responseXML) {
          cb(req.responseXML, options);
      } else {
          try{
              var parser = new DOMParser();
              cb(parser.parseFromString(req.response, "text/xml"), options);
          } catch (e) {
              console.log(e);
          }
      }
  }
};
@ghost ghost assigned mpetazzoni Aug 21, 2013
@seyfro
Copy link

seyfro commented Aug 22, 2013

Hi,
please also follow the discussion here: http://www.wpquestions.com/question/show/id/8754
I had to fork your code as I implemented a php proxy to load gpx files from external domains to overcome cross-domain limitations - not all code for fixing IE8 might be usable out of the box.
best,
Robert

@mpetazzoni
Copy link
Owner Author

Sorry, I'll be closing this now after 10+ years, as hopefully no one in their right mind is still using IE8 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants