简体   繁体   中英

Does JavaScript window.resizeto have maximum values?

I am resizing a popup window when an anchor is pressed. It works well on my desktop computer, but it doesn't on my laptop.

It resizes to a value smaller than the specified in window.resizeto() .

Does JavaScript window.resizeto have maximum values in browser settings? How do I change those values?

Thanks

This will depend only on the browser, and OS limitation. For example, according to Mozilla Dev Network Documentation :

Specification

DOM Level 0. Not part of any standard .

So this only depends of the browser implementation of window object.

Check the resizeTo method Browser Documentation to see the size limitations.

IE and FF do not seem to make a limitation in the window size, it will depend on how the OS GUI will handle the new size.

However, MDN says this about resizeTo rules :

  1. You can't resize a window or tab that wasn't created by window.open.
  2. You can't resize a window or tab when it's in a window with more than one tab.

https://developer.mozilla.org/en-US/docs/Web/API/Window.resizeTo

MDN Documentation should be the most standard documentation. (Even if, as they described, this method is not standard)

My desktop has 2 screens and the maximum width available is the sum of both.

Thank you all for your help.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM