Function isScrollable

Returns true if the given element is scrollable in the given direction, or in either direction (if axis is not given).

IMPORTANT: If you enable active then be aware that:

  1. It may attempt to scroll the target in order to determine whether it's scrollable in a more reliable way than the default method of comparing clientWidth/Height to scrollWidth/Height. If there is currently any ongoing scroll on the target, this will stop it, so never use that inside scroll-triggered handlers.
  2. If the layout has been invalidated and not yet recalculated, this will cause a forced layout, so always waitForMeasureTime before calling this function when possible.
  • Parameters

    • element: Element
    • Optionaloptions: { active?: boolean; axis?: "x" | "y"; noCache?: boolean }
      • Optionalactive?: boolean

        If true, then if the target's current scroll offset is 0, it will attempt to scroll it rather than looking at the clientWidth/Height to scrollWidth/Height. This is more reliable but can cause issues, see note above.

      • Optionalaxis?: "x" | "y"

        One of "x" or "y" for horizontal or vertical scroll respectively. If not given, it checks both.

      • OptionalnoCache?: boolean

        By default the result of a check is cached for 1s and if there's already a cached result for this element, it is returns. Set this to true to disable checking the cache and also saving the result into the cache.

    Returns boolean

MMNEPVFCICPMFPCPTTAAATR