mirror of
https://github.com/HackPlan/atom-shell.git
synced 2026-04-26 04:45:54 +08:00
Make dialog API's parameters more flexible.
This commit is contained in:
@@ -13,7 +13,7 @@ console.log(dialog.showOpenDialog({ properties: [ 'openFile', 'openDirectory', '
|
||||
|
||||
**Note for OS X**: If you want to present dialogs as sheets, the only thing you have to do is to provide a `BrowserWindow` reference in the `browserWindow` parameter.
|
||||
|
||||
## dialog.showOpenDialog([browserWindow], options, [callback])
|
||||
## dialog.showOpenDialog([browserWindow], [options], [callback])
|
||||
|
||||
* `browserWindow` BrowserWindow
|
||||
* `options` Object
|
||||
@@ -49,7 +49,7 @@ and directory selector at the same time, so if you set `properties` to
|
||||
`['openFile', 'openDirectory']` on these platforms, a directory selector would
|
||||
be showed.
|
||||
|
||||
## dialog.showSaveDialog([browserWindow], options, [callback])
|
||||
## dialog.showSaveDialog([browserWindow], [options], [callback])
|
||||
|
||||
* `browserWindow` BrowserWindow
|
||||
* `options` Object
|
||||
@@ -67,7 +67,7 @@ The `filters` specifies an array of file types that can be displayed, see
|
||||
If a `callback` is passed, the API call would be asynchronous and the result
|
||||
would be passed via `callback(filename)`
|
||||
|
||||
## dialog.showMessageBox([browserWindow], options, [callback])
|
||||
## dialog.showMessageBox([browserWindow], [options], [callback])
|
||||
|
||||
* `browserWindow` BrowserWindow
|
||||
* `options` Object
|
||||
|
||||
Reference in New Issue
Block a user