Skip to content

FileWriter is not implementing EventTarget #304

@radarfox

Description

@radarfox

Bug Report

Problem

What is expected to happen?

According to the provided TypeScript definitions: FileWriter extends FileSaver and FileSaver extends EventTarget. EventTarget interface 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

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions