One major annoyance is that you can't just show the file picker for "security reasons", it has to be user prompted. This is a useless precaution because you can just add an onclick handler to the document body. It inconveniences non-malware developers while hardly troubling malicious sites at all.
Another goodie is that resolving a path is extremely expensive with no opportunity for caching from the OS. You have to parse paths yourself and individually walk each directory.
I've also been working on an equivalent API to the fs module in Node lately, but really such an API should have been the #1 priority example for using this API. It would have immediately highlighted how difficult the path problem is. OS/browser engine nerds deal with file descriptors, but most applications work with paths.
It also would be great if Firefox would stop being so hostile to this API. The API has problems, but they aren't inherent to the goals of this API. I also find polyfills for this API to be ridiculous. You really can't polyfill this in a meaningful way for the browser because it is so groundbreaking. Having a non-Google implementation of the API would be way more helpful than polyfills.
Comments
It's not terrible, but it still has a lot of warts. I wrote a saver plugin for Tiddlywiki that uses this API for a self modifying HTML file. https://slaymaker1907.github.io/tiddlywiki/plugin-library.ht...
One major annoyance is that you can't just show the file picker for "security reasons", it has to be user prompted. This is a useless precaution because you can just add an onclick handler to the document body. It inconveniences non-malware developers while hardly troubling malicious sites at all.
Another goodie is that resolving a path is extremely expensive with no opportunity for caching from the OS. You have to parse paths yourself and individually walk each directory.
I've also been working on an equivalent API to the fs module in Node lately, but really such an API should have been the #1 priority example for using this API. It would have immediately highlighted how difficult the path problem is. OS/browser engine nerds deal with file descriptors, but most applications work with paths.
It also would be great if Firefox would stop being so hostile to this API. The API has problems, but they aren't inherent to the goals of this API. I also find polyfills for this API to be ridiculous. You really can't polyfill this in a meaningful way for the browser because it is so groundbreaking. Having a non-Google implementation of the API would be way more helpful than polyfills.