Github user jasongin commented on a diff in the pull request:

    https://github.com/apache/cordova-plugin-file/pull/177#discussion_r58922573
  
    --- Diff: www/FileWriter.js ---
    @@ -107,8 +108,29 @@ FileWriter.prototype.write = function(data) {
             var fileReader = new FileReader();
             fileReader.onload = function() {
                 // Call this method again, with the arraybuffer as argument
    -            FileWriter.prototype.write.call(that, this.result);
    +            FileWriter.prototype.write.call(that, this.result, true /* 
isPendingBlobReadResult */);
             };
    +        fileReader.onerror = function (evt) {
    +            // DONE state
    +            that.readyState = FileWriter.DONE;
    +
    +            // Save error
    +            that.error = evt.target.error;
    --- End diff --
    
    I think **evt.target** here is the same as **this** in the callback, and 
they both refer to the FileReader instance, right? It's a bit confusing that 
you use **evt.target** here, but **this** is used in the **onload** callback. 
(I can't actually find documentation that says **this** in a FileReader 
callback is set to the FileReader, though it seems like a reasonable 
assumption.)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org

Reply via email to