[win.openDevTools()] List of options available


#1

Can someone provide a list of the options available for openDevTools(). I found one option detach: true|false.

Are there more options available?

Also, there is no documentation for this function.


#2

There is documentation for the function atom.openDevTools():

There are no options. All it does is opens the dev tools.


#3

Very odd. It appears there is a gap in the docs. win.openDevTools({detach: true}), will trigger Dev Tools too open in a new window. There is another post discussing this detach option.


#4

The documentation only covers the Atom API. Atom is built on top of Chromium and Node.js, which offer their own functionality (and their own documentation). The window global isn’t provided by the Atom API.


#5

FYI, I am using <BrowserWindow>.openDevTools().


#6

BrowserWindow.openDevTools() is defined in electron here

Redirecting to webcontent.OpenDevTool documented here

A look at the implementation confirm the single option


#7

Excellent, makes sense now.

Seeing the BrowserWindow method is just a proxy to the real method in webContents, I wonder if we should consider deprecating the BrowserWindow method to prevent future confusion, or formally document the BrowserWindow method.

IMO, leaving this as is will likely result in more confused n00b’s.