Fix alert()
This commit is contained in:
		
					parent
					
						
							
								e05804848f
							
						
					
				
			
			
				commit
				
					
						9f6541228d
					
				
			
		
					 1 changed files with 4 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -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,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue