question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question: frame/window size change

See original GitHub issue

I’m looking up the chrome debugging protocol docs and seems like there’s not really a way to change the viewport size?

There’s Emulation.setVisibleSize (https://chromedevtools.github.io/debugger-protocol-viewer/tot/Emulation/#method-setVisibleSize) but seems like it’s experimental and doesn’t affect the frame’s container.

Looking at a way to do something like “change the width of the browser”, doesn’t have to be dynamic, can be set before we do any Page navigations. I read on another issue that you wouldn’t use CDP for something like this, but I believe that was more of dynamical resizing of the browser window size.

Maybe Emulation.forceViewport (https://chromedevtools.github.io/debugger-protocol-viewer/tot/Emulation/#method-forceViewport)?

I’ve also tried Emulation.setDeviceMetricsOverride, but didn’t seem to work.

I’m verifying by capturing screenshots, so maybe CDP works like PhantomJS where the screenshot viewport is not the same as frame viewport?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
auchenbergcommented, Apr 19, 2017
0reactions
pthieucommented, Jun 1, 2017

@SerafinDinges: I did not. The screenshots were just for me to debug what was happening, I didn’t actually need it for production. It was hard to see what was happening with the default screenshot size but I made out what I could and inferred any missing information for what I wanted to do.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Window: resize event - Web APIs | MDN
The resize event fires when the document view (window) has been resized. This event is not cancelable and does not bubble.
Read more >
adjust height of frame automatically to window size
For example, note height=667 . Is there semantics to say: Adjust your frame size as the user resizes the window to the window...
Read more >
how create a resizable "window" with constant frame size?
Create another frame inside the first one and resize it;; Set the “Left and right” and “Top and bottom” constraints for the inner...
Read more >
Resize/move frame/window - Emacs Stack Exchange
(defun my/frame-move-resize (position) "Resize selected frame to cover exactly 1/3 of screen area, and move frame to given third of current ...
Read more >
Problem with SCORM frame size (do not window size) Moodle ...
If you use the "new window" setting you can change the size of the pop-up window but not manually change the size of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found