Adding Devtools Extensions to a <webview>


#1

Hey,

Before creating my BrowserWindow I do this:

BrowserWindow.addDevToolsExtension(__dirname + "/extensions/CoffeeConsole");

This works great, Ctrl-Shift-I and I have access to the extension.

However, a <webview> contained inside this BrowserWindow will not have the extension. I open the Devtools of the <webview> with $('#webview').get(0).openDevTools(); and I cannot see the extension’s tab in the Devtools.

My question is: is it possible to add a Devtools extension to a <webview> ? If so, how?

Thanks in advance.


#2

Hello guys, does anyone have any idea?


#3

It looks like they added support for this a while back. https://github.com/electron/electron/pull/5913

After reading over the source it seems to me that you don’t need to add the devtools to the webview, it should automatically let you use the extensions installed on the host BrowserWindow on the webview.

I would give https://github.com/MarshallOfSound/electron-devtools-installer a try if you haven’t already. It basically downloads extensions and installs them for you.