| 
									
										
										
										
											2017-02-13 18:11:37 -08:00
										 |  |  | <!DOCTYPE html> | 
					
						
							|  |  |  | <html> | 
					
						
							|  |  |  |   <head> | 
					
						
							|  |  |  |     <meta charset="utf-8"> | 
					
						
							|  |  |  |     <title></title> | 
					
						
							|  |  |  |     <script> | 
					
						
							|  |  |  |       const {ipcRenderer, remote} = require('electron') | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-02-13 18:22:57 -08:00
										 |  |  |       remote.getCurrentWindow().focus() | 
					
						
							| 
									
										
										
										
											2017-02-13 18:11:37 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-02-13 18:22:57 -08:00
										 |  |  |       const child = new remote.BrowserWindow({show: false}) | 
					
						
							|  |  |  |       child.loadURL('about:blank') | 
					
						
							| 
									
										
										
										
											2017-02-13 18:11:37 -08:00
										 |  |  |       child.webContents.focus() | 
					
						
							| 
									
										
										
										
											2017-02-13 18:22:57 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  |       const currentFocused = remote.getCurrentWindow().isFocused() | 
					
						
							|  |  |  |       const childFocused = child.isFocused() | 
					
						
							|  |  |  |       child.close() | 
					
						
							|  |  |  |       ipcRenderer.send('answer', currentFocused, childFocused) | 
					
						
							| 
									
										
										
										
											2017-02-13 18:11:37 -08:00
										 |  |  |     </script> | 
					
						
							|  |  |  |   </head> | 
					
						
							|  |  |  |   <body> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   </body> | 
					
						
							|  |  |  | </html> |