Get Webview from WebContents?

Hi,

I’m developing a kind of Multi-View-Browser with an BrowserWindow and several Webviews on it.

On these Webviews I’ve added listeners to the following events:

  • new-window
  • will-navigate

For further features it would be much easier if there is a way to get the origin Webview of the event or the Webview-ID. Does anyone know a way to realize this?

With a BrowserWindow its possible with BrowserWindow.fromWebContents().

Greetings