Reputation:
Is it possible to resize the Chrome window using the developer tool's console? If so, what would the command be? becuase the window.resizeTo(w,h) didn't work for me.
Upvotes: 9
Views: 10934
Reputation: 41260
On macOS you can run: open -a Google\ Chrome --args --window-size=1366,768
Upvotes: 1
Reputation: 37913
Official Chrome issue says:
By Design we don't support resize/move for tabs, only constrained windows.
Windows in Chrome can be resized via Chrome extensions API, however it's not available from console. You should probably try using one of many 'window resizing' extensions. In the near future it will be possible for extensions to add own console commands, however as for now it's an experimental feature.
Upvotes: 5
Reputation: 263
Since Firefox 7, it's no longer possible for a web site to change the default size of a window in a browser, according to the following rules:
window.open.
found on https://developer.mozilla.org/en-US/docs/DOM/window.resizeTo#Notes
some try and error seems to prove that these rules also apply in Chrome.
Upvotes: 0
Reputation: 5060
i think you can only resize windows that's you have created from the console, like popups for example:
var pop=window.open("","","width=1024,height=768");
pop.resizeTo(100,100);
Upvotes: 2