Function listenToPageActivation

  • Listen to changes in page activation.

    Parameters

    • fireImmediately: boolean

      If true, the callback will immediately be fired with whatever the current value is.

    • listener: ((isPageActive) => void | Promise<void>)

      This listener will be called any time the page activation changes.

        • (isPageActive): void | Promise<void>
        • Parameters

          • isPageActive: boolean

          Returns void | Promise<void>

    Returns RemoveListenerCallback

    A callback used to remove the listener.