Classes
Methods
(static) showDialog(xmlEditor, optionsopt, savedDataopt) → {Promise}
Displays a dialog box letting the user open a local file or
save specified data to a local file.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
xmlEditor |
XMLEditor | the XML editor hosting this dialog box. | ||
options |
object |
<optional> |
{} | options - dialog box options. See description in ResourceStorage#openResource. |
savedData |
Blob |
<optional> |
null | savedData - the data to be saved to
a file; null to display an open file dialog. |
- Source:
Returns:
A Promise containing info about the open or save file
or
null
if user clicked Cancel.
file
- Opened file.
fileHandle
- Saved file handle; always
null
when!FSAccess.isAvailable()
. uri
- Absolute "file:" URI of selected file.
option_name
- Only when a dialog box "accessory" has been specified:
true
if corresponding check box is checked;false
otherwise.
On some Blink-based browsers, for example
Brave,
the "File System Access API"
is disabled by default. In order to enable it, visit
brave://flags/#file-system-access-api
and change
this setting from "Default" to "Enabled".
- Type
- Promise