Skip to content

Commit 6e6ab9b

Browse files
nixxqualityJohn Kleinschmidt
authored and
John Kleinschmidt
committed
Fix callback info for showSaveDialog and showOpenDialog (electron#15549)
1 parent 7f73240 commit 6e6ab9b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/api/dialog.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ The `dialog` module has the following methods:
5252
boxes.
5353
* `securityScopedBookmarks` Boolean (optional) _masOS_ _mas_ - Create [security scoped bookmarks](https://developer.apple.com/library/content/documentation/Security/Conceptual/AppSandboxDesignGuide/AppSandboxInDepth/AppSandboxInDepth.html#//apple_ref/doc/uid/TP40011183-CH3-SW16) when packaged for the Mac App Store.
5454
* `callback` Function (optional)
55-
* `filePaths` String[] - An array of file paths chosen by the user
56-
* `bookmarks` String[] _macOS_ _mas_ - An array matching the `filePaths` array of base64 encoded strings which contains security scoped bookmark data. `securityScopedBookmarks` must be enabled for this to be populated.
55+
* `filePaths` String[] (optional) - An array of file paths chosen by the user. If the dialog is cancelled this will be `undefined`.
56+
* `bookmarks` String[] (optional) _macOS_ _mas_ - An array matching the `filePaths` array of base64 encoded strings which contains security scoped bookmark data. `securityScopedBookmarks` must be enabled for this to be populated.
5757

5858
Returns `String[]`, an array of file paths chosen by the user,
5959
if the callback is provided it returns `undefined`.
@@ -103,8 +103,8 @@ shown.
103103
defaults to `true`.
104104
* `securityScopedBookmarks` Boolean (optional) _masOS_ _mas_ - Create a [security scoped bookmark](https://developer.apple.com/library/content/documentation/Security/Conceptual/AppSandboxDesignGuide/AppSandboxInDepth/AppSandboxInDepth.html#//apple_ref/doc/uid/TP40011183-CH3-SW16) when packaged for the Mac App Store. If this option is enabled and the file doesn't already exist a blank file will be created at the chosen path.
105105
* `callback` Function (optional)
106-
* `filename` String
107-
* `bookmark` String _macOS_ _mas_ - Base64 encoded string which contains the security scoped bookmark data for the saved file. `securityScopedBookmarks` must be enabled for this to be present.
106+
* `filename` String (optional) If the dialog is cancelled this will be `undefined`.
107+
* `bookmark` String (optional) _macOS_ _mas_ - Base64 encoded string which contains the security scoped bookmark data for the saved file. `securityScopedBookmarks` must be enabled for this to be present.
108108

109109
Returns `String`, the path of the file chosen by the user,
110110
if a callback is provided it returns `undefined`.

0 commit comments

Comments
 (0)