Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add app event: before-browser-window-created #13846

Open
timfish opened this issue Jul 29, 2018 · 0 comments
Open

Add app event: before-browser-window-created #13846

timfish opened this issue Jul 29, 2018 · 0 comments
Assignees

Comments

@timfish
Copy link
Contributor

timfish commented Jul 29, 2018

It would be great to have a before-browser-window-created event that developers can use to create reusable modules that can globally intercept and modify BrowserWindow options before window creation.

It is already possible to do this for BrowserWindows passed through the webContents 'new-window' event but not for windows created from the BrowserWindow constructor.

This would be useful for reusable:

  • Window managers
  • Window state/position persisting
  • Other things?
app.on(`before-browser-window-created`, (options: BrowserWindowConstructorOptions) => {
  // do something fancy with options?
});
@miniak miniak self-assigned this Nov 6, 2021
@timfish timfish changed the title Add app event: 'before-browser-window-created' Add app event: before-browser-window-created Feb 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants