| 
									
										
										
										
											2016-11-10 12:25:26 -08:00
										 |  |  | ## Class: BrowserWindowProxy
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | > Manipulate the child browser window
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-11-23 11:20:56 -08:00
										 |  |  | Process: [Renderer](../glossary.md#renderer-process) | 
					
						
							| 
									
										
										
										
											2016-11-10 12:25:26 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  | The `BrowserWindowProxy` object is returned from `window.open` and provides | 
					
						
							|  |  |  | limited functionality with the child window. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ### Instance Methods
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | The `BrowserWindowProxy` object has the following instance methods: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #### `win.blur()`
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Removes focus from the child window. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #### `win.close()`
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Forcefully closes the child window without calling its unload event. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #### `win.eval(code)`
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | * `code` String | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Evaluates the code in the child window. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #### `win.focus()`
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Focuses the child window (brings the window to front). | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #### `win.print()`
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Invokes the print dialog on the child window. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #### `win.postMessage(message, targetOrigin)`
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-07-09 01:43:49 +02:00
										 |  |  | * `message` any | 
					
						
							| 
									
										
										
										
											2016-11-10 12:25:26 -08:00
										 |  |  | * `targetOrigin` String | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Sends a message to the child window with the specified origin or `*` for no | 
					
						
							|  |  |  | origin preference. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | In addition to these methods, the child window implements `window.opener` object | 
					
						
							|  |  |  | with no properties and a single method. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ### Instance Properties
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | The `BrowserWindowProxy` object has the following instance properties: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #### `win.closed`
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-07-24 10:29:03 +02:00
										 |  |  | A `Boolean` that is set to true after the child window gets closed. |