Detect maximize event in browser Javascript

5.6k views Asked by At

I want to close the tab when we press the maximize button in the browser.
How can we detect the event of maximize button?

Any help would be appreciated.

1

There are 1 answers

0
enguerranws On

I guess maximize can be caught with a $(window).resize();

You can check if the current size of the window is larger than the previous. But I don't think there is a JS event to detect a click on maximize button.