How to resize the browser window?

i scoured but didnt see - if this is a repeat question could you kindly point me in the correct direction? i know that this will allow me to test the height of the browser:

var height = window.innerHeight || (window.document.documentElement.clientHeight || window.document.body.clientHeight);

how can I do the inverse, where I hard code a height for the browser window? oddly enough

window.document.documentElement.clientHeight = myHeightVariable;

didn't work.

I'm pretty sure that browser vendors have disabled the window.resizeTo() command because folks in the 90s abused it quite a lot. You might be able to use it to still change a popup window you created yourself in code, but most popup windows are disabled for similar reasons :slight_smile:.

About the best you can do is enter/exit fullscreen for changing the browser size.

1 Like