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
filereader fix and form data change #86
Conversation
reject(reader.error) | ||
} | ||
reader.readAsText(blob) | ||
var reader = new FileReaderSync() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think anyone has implemented FileReaderSync
yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm.. gecko has had it for a while now. oh right, i completely forgot this code is shared by window :/
// FileReader is not available on Workers in Firefox, but FileReaderSync | ||
// is. | ||
var reader | ||
if (typeof FileReaderSync !== "undefined") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't you check for FileReader first instead, to use the async version when both are available ?
I'm not sure why the travis build failed. I won't be able to fix this until next week, so feel free to steal. |
reader.onerror = function() { | ||
reject(reader.error) | ||
var reader | ||
if (typeof FileReaderSync !== "undefined") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should use single quotes (in both places) to fix the JSHInt warnings which are making the build fail
Thanks @nikhilm. I was able to cherry pick these changes into master with the linting tests fixed. |
No description provided.