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,645
  • 3
  • 28
  • 40

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
  • 11,809
  • 23
  • 69
  • 101