How to get reference of new window in new-window event?


#1
  mainWindow.webContents.on("new-window", (event, url) => {
    // how do we get a reference to the new window here?
  })

I know we can preventDefault and make a new BrowserWindow. I don’t want to do that. How do I get the reference to the new window?