• Listen to the pageshow and visibility changing to 'visible' events, because the 'visibilitychange' uses an internal proxy to detect the visibility state you SHOULD use a unique namespace when if you plan to call removePageShowEventListener as the remove ignores the listener argument for the 'visibilitychange' event.

    Parameters

    • listener: any

      The event callback to call when a page is show event is triggered

    • OptionalexcludeEvents: string[]

      [Optional] An array of events that should not be hooked (if possible), unless no other events can be.

    • OptionalevtNamespace: string | string[]

      [Optional/Recommended] A Namespace to append to the event listeners so they can be uniquely identified and removed based on this namespace. This call also adds an additional unique "pageshow" namespace to the events so that only the matching "removePageShowEventListener" can remove these events.

    Returns boolean

    true - when at least one of the events was registered otherwise false