Black Lives Matter. Support the Equal Justice Initiative and read our statement here.

Electron Documentation

Want to check our beta docs site? We'd love your feedback.

Class: BrowserWindowProxy

Manipulate the child browser window

Process: Renderer

The BrowserWindowProxy object is returned from and provides limited functionality with the child window.

Instance Methods

The BrowserWindowProxy object has the following instance methods:


Removes focus from the child window.


Forcefully closes the child window without calling its unload event.


  • code String

Evaluates the code in the child window.


Focuses the child window (brings the window to front).


Invokes the print dialog on the child window.

win.postMessage(message, targetOrigin)

  • message any
  • 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:


A Boolean that is set to true after the child window gets closed.

Keyboard Shortcuts

Key Action
/ Focus the search bar
Esc Focus the search bar and cleans it
Select the next search result
Select the previous search result
Enter Open the selected search result
cmdEnter Ctrl+Enter Open the selected search result in a new tab