Options
All
  • Public
  • Public/Protected
  • All
Menu

Detects if the user has been idle for a duration of idleTimeout ms, and calls onIdle and registered callbacks. By default, the IdleManager will log a user out after 10 minutes of inactivity. To override these defaults, you can pass an onIdle callback, or configure a custom idleTimeout in milliseconds

Hierarchy

  • IdleManager

Index

Constructors

Properties

callbacks: IdleCB[] = []
idleTimeout: undefined | number = ...
timeoutID?: number = undefined

Methods

  • _resetTimer(): void
  • exit(): void
  • registerCallback(callback: IdleCB): void
  • Parameters

    • callback: IdleCB

      function to be called when user goes idle

    Returns void

  • create(options?: { captureScroll?: boolean; idleTimeout?: number; scrollDebounce?: number; onIdle?: any }): IdleManager
  • Parameters

    • options: { captureScroll?: boolean; idleTimeout?: number; scrollDebounce?: number; onIdle?: any } = {}

      Optional configuration

      • Optional captureScroll?: boolean

        capture scroll events

        default

        false

      • Optional idleTimeout?: number

        timeout in ms

        default

        10 minutes [600_000]

      • Optional scrollDebounce?: number

        scroll debounce time in ms

        default

        100

      • onIdle?:function
        • onIdle(): unknown
        • Callback after the user has gone idle

          see

          {@link IdleCB}

          Returns unknown

    Returns IdleManager

Generated using TypeDoc