function handleVisibilityChange() {
    if (document.hidden) {
        // the page is hidden
        setTabChange(tab_change+1);
        swal("Changed Tab Detected", "Action has been Recorded", "error");
        
        
    } else {
      // the page is visible
    }
  }
/**
   * Function checks for tab change or minimising the window/ opening
   * another window by checking if the window is in focus or not
   */
Function checks for tab change or minimising the window/ opening
another window by checking if the window is in focus or not
Function checks for tab change or minimising the window / opening another window by checking if the window is in focus or not
function handleVisibilityChange() {
    if (document.hidden) {
        setTabChange(tab_change+1);
        swal("Changed Tab Detected", "Action has been Recorded", "error");
    } else {
    }
  }
function handleVisibilityChange ( ) { if ( document . hidden ) { setTabChange ( tab_change + 1 ) ; swal ( "Changed Tab Detected" , "Action has been Recorded" , "error" ) ; } else { } }
Function checks for tab change or minimising the window/ opening
 another window by checking if the window is in focus or not
Function checks for tab change or minimising the window / opening another window by checking if the window is in focus or not
// the page is hidden // the page is visible