Make dialog API's parameters more flexible.

This commit is contained in:
Cheng Zhao 2014-09-06 18:55:01 +08:00
parent fd806f81ce
commit 19b25c0d83
2 changed files with 19 additions and 19 deletions

View file

@ -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