Skip to content

Update HTML5 File APIs #30768

Open
Open
@lexaknyazev

Description

Existing JS bindings (as of 1.25.0-dev.16.4) for HTML 5 Directories and System File API are based on a discontinued spec. There's a fairly supported (at least in Chrome and Firefox) draft spec based on discontinued one: File and Directory Entries API.

Also, likely due to changed names (e.g., DirectoryEntry to FileSystemDirectoryEntry), DDC fails on runtime checks:

final items = e.dataTransfer.items;
for (var i = 0; i < items.length; ++i) {
  final entry = items[i].getAsEntry();
  if (entry.isDirectory) {
    final dir = entry as DirectoryEntry; // <-- DDC fails
    //...
  }
}

Metadata

Assignees

No one assigned

    Labels

    area-webUse area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop.library-htmlweb-librariesIssues impacting dart:html, etc., libraries

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions