GoogleChromeLabs / browser-fs-access

File System Access API with legacy fallback in the browser
https://googlechromelabs.github.io/browser-fs-access/demo/
Apache License 2.0
1.38k stars 84 forks source link

add callback informing about handle creation #102

Closed tclangv closed 2 years ago

tclangv commented 2 years ago

In my use case I want to save a file which is received in byte chunks from a WebAssembly component. For this I need the information when the user has selected a destination for the file, so I can trigger the start of the transfer of the file.

Starting the transfer beforehand would be possible as well, but should the user cancel out of the save file dialog, it would result in transferred data for no purpose.

tomayac commented 2 years ago

@tclangv Note that I have moved this callback to the end of the arguments list, as to not break existing code.