There is no window.resize()
...however...
There are:
Important notes:
- You can't resize a window or tab that wasn’t created by
window.open.
- You can't resize a window or tab when it’s in a
window with more than one tab.
- Also, even if you create window by
window.open(...)
it is not resizable by default ...see 4.
- To make window created by
window.open()
resizable, you must open it with resizable feature
Example of how to create external window with "resizable" feature:
myExternalWindow = window.open("http://myurl.domain", "myWindowName", "resizable");
myExternalWindow.resizeTo(500,500); //resize window to 500x500
myExternalWindow.resizeBy(-100,-100); //make it smaller relatively => to 400x400
PS: There are also browser extensions that allow window resizing... (Chrome)(Mozilla Firefox)
PS2: Chrome extension API - https://developer.chrome.com/extensions/windows
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…