lib/services/visibility_service.js
function updateState( targetState ) {
            const state = axVisibility.isVisible();
            if( state === lastState ) {
               return;
            }
            lastState = state;
            heartbeat.onAfterNext( () => {
               const handlers = targetState ? showHandlers : hideHandlers;
               handlers.forEach( f => f( targetState ) );
            } );
         }
function updateState( targetState ) {
            const state = axVisibility.isVisible();
            if( state === lastState ) {
               return;
            }
            lastState = state;
            heartbeat.onAfterNext( () => {
               const handlers = targetState ? showHandlers : hideHandlers;
               handlers.forEach( f => f( targetState ) );
            } );
         }
function updateState ( targetState ) { const state = axVisibility . isVisible ( ) ; if ( state === lastState ) { return ; } lastState = state ; heartbeat . onAfterNext ( ( ) => { const handlers = targetState ? showHandlers : hideHandlers ; handlers . forEach ( f => f ( targetState ) ) ; } ) ; }
eslint-disable-next-line valid-jsdoc 
Run all handlers registered for the given area and target state after the next heartbeat.
Also remove any handlers that have been cleared since the last run.
@private
eslint - disable - next - line valid - jsdoc Run all handlers registered for the given area and target state after the next heartbeat . Also remove any handlers that have been cleared since the last run .