mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Fix alert()
This commit is contained in:
@@ -161,11 +161,14 @@ window.open = function(url, frameName, features) {
|
||||
// Use the dialog API to implement alert().
|
||||
window.alert = function(message, title) {
|
||||
var buttons;
|
||||
if (message === undefined) {
|
||||
message = '';
|
||||
}
|
||||
if (title == null) {
|
||||
title = '';
|
||||
}
|
||||
buttons = ['OK'];
|
||||
message = message.toString();
|
||||
message = String(message);
|
||||
remote.dialog.showMessageBox(remote.getCurrentWindow(), {
|
||||
message: message,
|
||||
title: title,
|
||||
|
||||
Reference in New Issue
Block a user