{"action":"created","issue":{"url":"https://api.github.com/repos/atom/electron/issues/2455","labels_url":"https://api.github.com/repos/atom/electron/issues/2455/labels{/name}","comments_url":"https://api.github.com/repos/atom/electron/issues/2455/comments","events_url":"https://api.github.com/repos/atom/electron/issues/2455/events","html_url":"https://github.com/atom/electron/issues/2455","id":99826180,"number":2455,"title":"`new BrowserWindow` event?","user":{"login":"yan-foto","id":1678441,"avatar_url":"https://avatars.githubusercontent.com/u/1678441?v=3","gravatar_id":"","url":"https://api.github.com/users/yan-foto","html_url":"https://github.com/yan-foto","followers_url":"https://api.github.com/users/yan-foto/followers","following_url":"https://api.github.com/users/yan-foto/following{/other_user}","gists_url":"https://api.github.com/users/yan-foto/gists{/gist_id}","starred_url":"https://api.github.com/users/yan-foto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yan-foto/subscriptions","organizations_url":"https://api.github.com/users/yan-foto/orgs","repos_url":"https://api.github.com/users/yan-foto/repos","events_url":"https://api.github.com/users/yan-foto/events{/privacy}","received_events_url":"https://api.github.com/users/yan-foto/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-08T18:42:09Z","updated_at":"2015-08-17T06:27:10Z","closed_at":null,"body":"I've been studying the source code and couldn't find a convenient event to find out if a new `BrowserWindow` is created *except* the [`browser-window-focus`](https://github.com/atom/electron/blob/master/atom/browser/api/lib/browser-window.coffee#L46), which is semantically different from a hypothetical `new-browser-window` event.\r\n\r\nI could also use `BrowserWindow.getAllWindows()` to poll regularly and find out if any `BrowserWindow` has been created. But this doesn't sound like a good idea :worried:! \r\n\r\nAre there any events that I am missing at the moment? If not I would request it as a feature."},"comment":{"url":"https://api.github.com/repos/atom/electron/issues/comments/131693877","html_url":"https://github.com/atom/electron/issues/2455#issuecomment-131693877","issue_url":"https://api.github.com/repos/atom/electron/issues/2455","id":131693877,"user":{"login":"hokein","id":2557445,"avatar_url":"https://avatars.githubusercontent.com/u/2557445?v=3","gravatar_id":"","url":"https://api.github.com/users/hokein","html_url":"https://github.com/hokein","followers_url":"https://api.github.com/users/hokein/followers","following_url":"https://api.github.com/users/hokein/following{/other_user}","gists_url":"https://api.github.com/users/hokein/gists{/gist_id}","starred_url":"https://api.github.com/users/hokein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hokein/subscriptions","organizations_url":"https://api.github.com/users/hokein/orgs","repos_url":"https://api.github.com/users/hokein/repos","events_url":"https://api.github.com/users/hokein/events{/privacy}","received_events_url":"https://api.github.com/users/hokein/received_events","type":"User","site_admin":false},"created_at":"2015-08-17T06:27:10Z","updated_at":"2015-08-17T06:27:10Z","body":"There is a `new-window` event in [`WebContents`](https://github.com/atom/electron/blob/master/docs/api/browser-window.md#event-new-window). Does it feed on your need? Usually developers create the BrowserWindow via `new BrowserWindow({option})`, you can probably hook it by yourself."}}