0

I have to refresh a web page whenever Mac Safari goes full screen by clicking on expand button as in the screenshot attached.

enter image description here

Please keep in mind that I already tried resize and fullscreen event but doesn't work.

Bilal
  • 2,545
  • 3
  • 25
  • 39

1 Answers1

0

Not a proper solution, but here is a workaround:

function reloadWhenFullScreen ( ) {
   // if it is full screen
   if ( !window.screenTop && !window.screenY ) {
      window.location.reload();
   }

   window.setTimeout(reloadWhenFullScreen, 1000);
}

reloadWhenFullScreen();
Kamran Ahmed
  • 10,907
  • 21
  • 63
  • 97