Function scrollIntoViewIfNeeded

  • Vertically scroll an element into view if needed.

    Parameters

    • area: Element

      The scroll area element.

    • element: Element

      The element of interest.

      Notes

      This follows the "nearest" behavior of the native scrollIntoView method, which is not supported by all browsers. https://drafts.csswg.org/cssom-view/#element-scrolling-members

      If the element fully covers the visible area or is fully contained within the visible area, no scrolling will take place. Otherwise, the nearest edges of the area and element are aligned.

    Returns void

Generated using TypeDoc