This is a weird one...
Contact emails
Spec
https://wicg.github.io/entries-api/ - retroactively documents the now de facto standard.
Summary
The API was implemented in Chrome years ago following parts of the (now deprecated) File API: Directories and System (https://dev.w3.org/2009/dap/file-system/file-dir-sys.html). Both Microsoft Edge and Mozilla Firefox are implementing the subsets documented in "File and Directory Entries API" for compatibility with Chrome in supporting Directory Upload.
One particular oddness is present in the Chrome implementation: the types Entry, FileEntry, DirectoryEntry, and DOMFileSystem are marked as [NoInterfaceObject]. That means you can't write code referring to the type (e.g. e instanceof FileEntry, FileEntry.prototype.xyz, etc). This is an anomaly for modern APIs on the platform, where types (even without constructors) are exposed on the global namespace.
The intent is to drop [NoInterfaceObject] so the types can be referenced by name. Otherwise, there is no behavior change.
Link to “Intent to Implement” blink-dev discussion
The types have been implemented since 2012 or so.
Is this feature supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
Yes.
Demo link
Nope. (There's probably something up on HTML5Rocks that demos the types, but the [NoInterfaceObject] thing/instanceof tests are not terribly exciting on their own)
Interoperability and Compatibility Risk
Compat:
The risk is that adding these names to the global namespace breaks pages - e.g. relying on window.Entry *not* existing. It's basically impossible to find out without trying.
Interop:
* Mozilla has recently implemented these types with [NoInterfaceObject] because Chrome does. They're in the tree now, so whenever that goes to stable.
* Edge has recently implemented these types with a 'webkit' prefix (!!!) because Edge doesn't support [NoInterfaceObject]. No idea on shipping timeline.
If Chrome can successfully drop [NoInterfaceObject] here the other browsers will likely follow.
OWP launch tracking bug
TBD (will file if this gets approved)
Entry on the feature dashboard
TBD (will file if this gets approved)
I don't think we should expose an interface named so generic as "Entry" on the global. Reserving that forever for file system seems weird. I'd prefer we leave that as NoInterfaceObject.
Or came up with better names, since the interfaces weren't exposed before it's much lower risk. We could name this superclass something else if it needs to be exposed.
On 08/11/2016 01:14 PM, Philip Jägenstedt wrote:
> The concern was with Entry specifically. Do you still want to expose all of the other interfaces? And do you have any ideas for a new name for Entry?
>
> Using [NoInterfaceObject] isn't without risk. I can't find it now, but there was some library on GitHub relating to directory upload or drag and drop
> that had to use UA sniffing because we had [NoInterfaceObject] on the interface where they could have done feature detection. It might even have been
> one of these, but I'm not sure.
[NoInterfaceObject] here shouldn't cause need for UA sniffing, since in practice
"webkitGetAsEntry" in DataTransferItem.prototype should be enough for detecting whether Entries are available.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.