You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/03/27 10:17:06 UTC

[GitHub] [cordova-plugin-file] radarfox opened a new issue #304: FileWriter is not implementing EventTarget

radarfox opened a new issue #304: FileWriter is not implementing EventTarget
URL: https://github.com/apache/cordova-plugin-file/issues/304
 
 
   # Bug Report
   
   ## Problem
   
   ### What is expected to happen?
   
   According to the provided [TypeScript definitions](https://github.com/apache/cordova-plugin-file/blob/master/types/index.d.ts): `FileWriter extends FileSaver` and `FileSaver extends EventTarget`.  [`EventTarget` interface](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget) contains `addEventListener` an `removeEventListener` functions.
   
   ### What does actually happen?
   
   Functions `addEventListener` and `removeEventListener` are not defined in the `FileWriter` instances.
   
   ### Command or Code
   
   ```
   fileEntry.createWriter(function (fileWriter) {
     // It will throw an error about undefined addEventListener on the next line.
     fileWriter.addEventListener('writeend', function () {
       console.log("Successful file write...");
     });
   });
   ```
   
   ### Environment, Platform, Device
   
   Samsung tablet with Android 5.
   
   ### Version information
   
   ```
       "cordova-android": "7.0.0",
       "cordova-plugin-file": "^6.0.1",
       "ionic": "^4.2.1",
   ```
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [x] I searched for existing GitHub issues
   - [ ] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org