Implement the confirm().
This commit is contained in:
parent
ff9027fa95
commit
3f1d540077
1 changed files with 7 additions and 0 deletions
|
@ -41,3 +41,10 @@ window.alert = (message, title='') ->
|
|||
dialog = remote.require 'dialog'
|
||||
buttons = ['OK']
|
||||
dialog.showMessageBox remote.getCurrentWindow(), {message, title, buttons}
|
||||
|
||||
# And the confirm().
|
||||
window.confirm = (message, title='') ->
|
||||
remote = require 'remote'
|
||||
dialog = remote.require 'dialog'
|
||||
buttons = ['OK', 'Cancel']
|
||||
not dialog.showMessageBox remote.getCurrentWindow(), {message, title, buttons}
|
||||
|
|
Loading…
Add table
Reference in a new issue