I have to refresh a web page whenever Mac Safari goes full screen by clicking on expand button as in the screenshot attached.
Please keep in mind that I already tried resize
and fullscreen
event but doesn't work.
I have to refresh a web page whenever Mac Safari goes full screen by clicking on expand button as in the screenshot attached.
Please keep in mind that I already tried resize
and fullscreen
event but doesn't work.
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();