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

Simple fix for error in IE when parsing AWS response #486

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sbiastoch
Copy link

@sbiastoch sbiastoch commented Aug 18, 2019

IE is buggy when using innerHTML to access a node element's content, resulting in undefined. Furthermore children does not work consistently as well, again returning undefined. This two IE bugs cause uploads to fail when using AWS S3 Upload as the response from AWS cannot be parsed correctly.

The workaround replaces all affected occurrences of

  1. children[0] by firstChild.firstChild
  2. innerHTML by textContent (which is also more appropriate as we do not want to parse HTML and is thereby faster)
    Those two functions are very well supported across all browsers as firstChild is part of the ancient DOM-Level 1 specification and textContent is supported since IE9.

This fixes #325 and probably makes PR #462 and #332 unnecessary.

@vrajroham
Copy link
Collaborator

Thanks for your contribution. Will review and merge this soon.

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

Successfully merging this pull request may close these issues.

Error in IE 11 with parsing AWS resposne
2 participants