From: Cheng Zhao Date: Tue, 7 Jul 2015 10:51:49 +0000 (+0800) Subject: docs: cancelId X-Git-Tag: v0.30.0~49^2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=7d456d35564d8fd9c7b518dc853806353d10af80;p=electron.git docs: cancelId --- diff --git a/docs/api/dialog.md b/docs/api/dialog.md index 30689d95..2023809b 100644 --- a/docs/api/dialog.md +++ b/docs/api/dialog.md @@ -76,6 +76,11 @@ will be passed via `callback(filename)` * `message` String - Content of the message box * `detail` String - Extra information of the message * `icon` [NativeImage](native-image.md) + * `cancelId` Integer - The value will be returned when user cancels the dialog + instead of clicking the buttons of the dialog. By default it is the index + of the buttons that have "cancel" or "no" as label, or 0 if there is no such + buttons. On OS X the index of "Cancel" button will always be used as + `cancelId`, not matter whether it is already specified. * `callback` Function Shows a message box, it will block until the message box is closed. It returns