How I can capture browser restore/maximize event in jQuery or javascript? We can use window.onresize but that only tells that the browser is resized. thanks!
How I can capture browser restore/maximize event in jQuery or javascript? We can use
Share
There is no way to determine this on script level.
You could – as a very unreliable workaround – compare the
window.widthanddocument.clientWidthproperties after aresizeevent and see whether they match, or almost match. If they do, it’s possible amaximizeaction has taken place.I think it won’t get any better than that, and even this method is subject to many, many factors. If there is a vertical toolbar, preventing the browser from resizing to the screen’s full width, the values will differ, making it harder and harder to determine a resize event.