Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

providing option to undock devtools from browser-window #1307

Merged
merged 1 commit into from
Mar 27, 2015

Conversation

deepak1556
Copy link
Member

Fixes #1135

@_openDevTools()
BrowserWindow::openDevTools = (options={}) ->
dock = if options.detach then false else true
@_openDevTools(dock)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can just do @_openDevTools(options.detach).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since its optional, wouldnt it be better to not pass undefined ? otherwise i have to put up check for it on c++ land right.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I forgot that.

I think we can do options.detach ?= false before calling @_openDevTools, this matches the style of how we do with default options in other places.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed, thanks!

@zcbenz
Copy link
Member

zcbenz commented Mar 27, 2015

👍

zcbenz added a commit that referenced this pull request Mar 27, 2015
providing option to undock devtools from browser-window
@zcbenz zcbenz merged commit b52771e into electron:master Mar 27, 2015
zcbenz added a commit that referenced this pull request Mar 27, 2015
@krainboltgreene
Copy link

Looks like this should be applied to the webview tag devTools as well?

@deepak1556 deepak1556 deleted the api_windows_patch branch July 13, 2015 13:24
@deepak1556
Copy link
Member Author

@krainboltgreene webview tag doesnt own a browserwindow currently, so docking is not an option atm.

@krainboltgreene
Copy link

Is there a particular reason it isn't wrapped in a BrowserWindow?

@frankhale
Copy link
Contributor

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: API to openDevTools in own window
4 participants