On Thu, Aug 29, 2013 at 5:06 PM, Jonas Sicking <[email protected]> wrote:
> >> We don't have to do any enumeration synchronously. It can all happen off > >> the main thread. The .click() "API" is asynchronous. > > > > It's asynchronous to the JS, sure, but at the end of the day the user > > can't get any work done until it's complete. It's synchronous as far as > > the user is concerned. > > Sure. The alternative is that the user attaches each file separately. > Which, while means smaller "synchronous" actions, is not really a > better UX. In other words, synchronousness is not the only design > constraint here. > The alternative is to provide an interface that explores the supplied directory on-demand, as the page needs it, rather than greedily scanning the entire directory before giving it to script. Scanning a large directory tree in advance is almost never what applications or users want. A static file list isn't a sensible API for recursively exposing directory trees. -- Glenn Maynard
