Fix alert()

This commit is contained in:
OctoHuman 2016-03-20 02:09:30 -05:00
parent e05804848f
commit 9f6541228d

View file

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