Dynamically resizes window.
window.resizeTo(aWidth, aHeight)
aWidth
is an integer representing the new outerWidth
in pixels (including scroll bars, title bars, etc).aHeight
is an integer value representing the new outerHeight
in pixels (including scroll bars, title bars, etc).// function resizes the window to take up one quarter // of the available screen. function quarter() { window.resizeTo( window.screen.availWidth / 2, window.screen.availHeight / 2 ); }
Specification | Status | Comment |
---|---|---|
CSS Object Model (CSSOM) View Module The definition of 'window.resizeTo()' in that specification. | Working Draft |
Desktop | ||||||
---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
Basic support | Yes | ? | Yes
|
? | ? | ? |
Mobile | |||||||
---|---|---|---|---|---|---|---|
Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
Basic support | Yes | Yes | ? | Yes | ? | ? | ? |
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/window/resizeTo