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

allow DevTools to be pinned to the browser window (bottom or right) #100

Open
cvan opened this issue Jun 9, 2017 · 1 comment
Open

allow DevTools to be pinned to the browser window (bottom or right) #100

cvan opened this issue Jun 9, 2017 · 1 comment

Comments

@cvan
Copy link
Contributor

cvan commented Jun 9, 2017

By default, Firefox opens the DevTools as a pane fixed to the bottom of the active browser window.

screen shot 2017-06-08 at 6 27 49 pm

screen shot 2017-06-08 at 6 28 03 pm

You can also dock the DevTools to the side:
screen shot 2017-06-08 at 6 28 19 pm

And to the bottom again:
screen shot 2017-06-08 at 6 28 26 pm

Or detach the DevTools:

screen shot 2017-06-08 at 6 28 38 pm

And by default, qbrt opens the DevTools as a separate detached window:

screen shot 2017-06-08 at 6 29 35 pm

screen shot 2017-06-08 at 6 29 44 pm

For comparison, Electron does by default open the DevTools to the right side of the browser window.

To do this with the qbrt, the shell would be need to maintain an <iframe> that's positioned to the bottom, where the DevTools pane would be embedded. Am I correct in understanding that?

@mykmelez
Copy link
Contributor

mykmelez commented Jun 9, 2017

For comparison, Electron does by default open the DevTools to the right side of the browser window.

Indeed! I didn't do this earlier for a couple of reasons: primarily, because the shell was originally implemented in HTML, which doesn't support in-window DevTools; and secondarily, because I based the implementation on the one in Positron in order to get it working quickly, and that implementation didn't support in-window DevTools.

To do this with the qbrt, the shell would be need to maintain an <iframe> that's positioned to the bottom, where the DevTools pane would be embedded. Am I correct in understanding that?

Yes, I think that's correct, although I'm having trouble finding the canonical example in Firefox code. Here's an example of programmatically adding such an iframe and loading DevTools into it in a test:

http://searchfox.org/mozilla-central/rev/a798ee4fc323f9387b7576dbed177859d29d09b7/devtools/client/framework/test/browser_toolbox_target.js#21-37

However, I expect there to be a persistent iframe for DevTools in the browser window XUL (or perhaps the XBL bindings that implement the tabbrowser and browser interfaces), which the DevTools code simply hides/shows and moves around as needed. Perhaps that's not the case (or no longer the case), however.

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

No branches or pull requests

2 participants