How to find the window state using javascript.Consider our application need to alert('restor') when browser unmaximize and also need to alert('maximized') when restore or maximize the browser.Can anybody please help me.
How to find the window state using javascript.Consider our application need to alert(‘restor’) when
Share
There isn’t a way to specifically detect maximize/restore events. The closest you can get is the
onresizeevent which tells you that the window has been resized. You could use this in conjunction withscreen.widthandscreen.heightto possibly guess if the window is maximized.