Skip to content
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

Update the entries-api IDL file #9782

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 7 additions & 12 deletions interfaces/entries-api.idl
@@ -1,3 +1,6 @@
// GENERATED CONTENT - DO NOT EDIT
// Content of this file was automatically extracted from the File and Directory Entries API spec.
// See https://wicg.github.io/entries-api/

partial interface File {
readonly attribute USVString webkitRelativePath;
Expand All @@ -12,9 +15,7 @@ partial interface DataTransferItem {
FileSystemEntry? webkitGetAsEntry();
};

callback interface ErrorCallback {
void handleEvent(DOMException err);
};
callback ErrorCallback = void (DOMException err);

interface FileSystemEntry {
readonly attribute boolean isFile;
Expand Down Expand Up @@ -44,25 +45,19 @@ dictionary FileSystemFlags {
boolean exclusive = false;
};

callback interface FileSystemEntryCallback {
void handleEvent(FileSystemEntry entry);
};
callback FileSystemEntryCallback = void (FileSystemEntry entry);

interface FileSystemDirectoryReader {
void readEntries(FileSystemEntriesCallback successCallback,
optional ErrorCallback errorCallback);
};
callback interface FileSystemEntriesCallback {
void handleEvent(sequence<FileSystemEntry> entries);
};
callback FileSystemEntriesCallback = void (sequence<FileSystemEntry> entries);

interface FileSystemFileEntry : FileSystemEntry {
void file(FileCallback successCallback,
optional ErrorCallback errorCallback);
};
callback interface FileCallback {
void handleEvent(File file);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this old pattern is just because of an oddity in Blink/WebKit bindings generations and should never have made it into any spec, glad it's gone!

(The resulting generated bindings didn't allow you to use { handleEvent: function(file) { ... } } as the callback, so it was just a lie.)

};
callback FileCallback = void (File file);

interface FileSystem {
readonly attribute USVString name;
Expand Down