Resizes the current window by a certain amount.
window.resizeBy(xDelta, yDelta)
xDelta
is the number of pixels to grow the window horizontally.yDelta
is the number of pixels to grow the window vertically.// shrink the window window.resizeBy(-200, -200);
This method resizes the window relative to its current size. To resize the window in absolute terms, use window.resizeTo
.
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:
Specification | Status | Comment |
---|---|---|
CSS Object Model (CSSOM) View Module The definition of 'window.resizeBy()' in that specification. | Working Draft |
© 2005–2017 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/resizeBy