Before, FileModal always used a file input control for selecting
local files. This allowed the emulator to read from the file, but
precluded writing back to the file.
With this change, the FileModal delegates to the new FileChooser
component. The FileChooser will use showOpenFilePicker if it is
available and a regular file input if it's not.
Using showOpenFilePicker has the advantage of allowing the emulator
to write back to the file (if the user grants permission). While the
emulator does not yet take advantage of this write capability, that
will come.
Before,
FileModal
always used a file input control for selecting local files. This allowed the emulator to read from the file, but precluded writing back to the file.With this change, the
FileModal
delegates to the newFileChooser
component. TheFileChooser
will useshowOpenFilePicker
if it is available and a regular file input if it's not.Using
showOpenFilePicker
has the advantage of allowing the emulator to write back to the file (if the user grants permission). While the emulator does not yet take advantage of this write capability, that will come.