Files
sdk/tools/dom/templates/html/impl/impl_DataTransferItem.darttemplate
T
Srujan Gaddam 01642c2122 [dart:html] Add different bindings for FileSystem APIs
Closes https://github.com/dart-lang/sdk/issues/45036

The FileSystem API has different bindings for different browsers,
and the values are all taken directly from the MDN:
https://developer.mozilla.org/en-US/docs/Web/API/File_and_Directory_Entries_API
Along with this, some APIs that need to expose these bindings are modified to
expose all possible bindings.

Change-Id: I18ce6d1208349eb9d5bd9d802d17dda1ddae2dec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/225323
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Riley Porter <rileyporter@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2021-12-23 00:11:03 +00:00

31 lines
1008 B
Plaintext

// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
part of $LIBRARYNAME;
$(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS {
Entry getAsEntry() {
Entry entry = _webkitGetAsEntry() $#NULLSAFECAST(as Entry);
if (entry.isFile$NULLASSERT) {
applyExtension('FileEntry', entry);
applyExtension('webkitFileSystemFileEntry', entry);
applyExtension('FileSystemFileEntry', entry);
} else if (entry.isDirectory$NULLASSERT) {
applyExtension('DirectoryEntry', entry);
applyExtension('webkitFileSystemDirectoryEntry', entry);
applyExtension('FileSystemDirectoryEntry', entry);
} else {
applyExtension('Entry', entry);
applyExtension('webkitFileSystemEntry', entry);
applyExtension('FileSystemEntry', entry);
}
return entry;
}
$!MEMBERS
}