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

Bug: Preloading images causes XMLHttpRequest TypeError. #136

Closed
dannycampa opened this issue Feb 20, 2015 · 2 comments
Closed

Bug: Preloading images causes XMLHttpRequest TypeError. #136

dannycampa opened this issue Feb 20, 2015 · 2 comments

Comments

@dannycampa
Copy link

Hello,

First I'd like to say your plugin saves our people a lot of time.

I'm having an issue with 0.6.17 when I try to preload some PNG images.

Uncaught InvalidStateError: Failed to read the 'responseText' property from 'XMLHttpRequest': The value is only accessible if the object's 'responseType' is '' or 'text' (was 'arraybuffer').

Over on line 298:

readBody = function() {
    if ('responseText' in xhr) {
      response.text = xhr.responseText;
    }
    if ('responseXML' in xhr) {
      response.xml = xhr.responseXML;
    }
    if ('response' in xhr) {
      response.data = xhr.response;
    }
  };

I'm assuming you just need to add a condition inside to look for an arraybuffer instead of text.

Please let me know if this is enough information for you to take care of this. If you need to see it in action I'll need to set up a staging area for you to see it. I rolled back to 0.6.15 on my production site to resolve the issue for now.

Thanks again for your work!

@jpillora
Copy link
Owner

Thanks for the bug report, will take a look into it soon

On Saturday, February 21, 2015, dannycampa notifications@github.com wrote:

Hello,

First I'd like to say your plugin saves our people a lot of time.

I'm having an issue with 0.6.17 when I try to preload some PNG images.

Uncaught InvalidStateError: Failed to read the 'responseText' property from 'XMLHttpRequest': The value is only accessible if the object's 'responseType' is '' or 'text' (was 'arraybuffer').

Over on line 298:

readBody = function() {
if ('responseText' in xhr) {
response.text = xhr.responseText;
}
if ('responseXML' in xhr) {
response.xml = xhr.responseXML;
}
if ('response' in xhr) {
response.data = xhr.response;
}
};

I'm assuming you just need to add a condition inside to look for an
arraybuffer instead of text.

Please let me know if this is enough information for you to take care of
this. If you need to see it in action I'll need to set up a staging area
for you to see it. I rolled back to 0.6.15 on my production site to resolve
the issue for now.

Thanks again for your work!


Reply to this email directly or view it on GitHub
#136.

@jpillora
Copy link
Owner

Merging across from XHook into XDomain now...

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