parent
d7cf460918
commit
b1406fbad9
2 changed files with 7 additions and 4 deletions
|
@ -80,12 +80,15 @@ window.alert = (message, title='') ->
|
|||
buttons = ['OK']
|
||||
message = message.toString()
|
||||
dialog.showMessageBox remote.getCurrentWindow(), {message, title, buttons}
|
||||
# Alert should always return undefined.
|
||||
return
|
||||
|
||||
# And the confirm().
|
||||
window.confirm = (message, title='') ->
|
||||
dialog = remote.require 'dialog'
|
||||
buttons = ['OK', 'Cancel']
|
||||
not dialog.showMessageBox remote.getCurrentWindow(), {message, title, buttons}
|
||||
cancelId = 1
|
||||
not dialog.showMessageBox remote.getCurrentWindow(), {message, title, buttons, cancelId}
|
||||
|
||||
# But we do not support prompt().
|
||||
window.prompt = ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue