• Scrolls the specified HTML element into the visible area of the browser window.

    Parameters

    • element: HTMLElement

      The HTML element to be scrolled into view.

    • behavior: ScrollBehavior = "auto"

      Defines the transition animation. Can be 'auto' for instant scrolling or 'smooth' for a smooth transition. Defaults to 'auto'.

    Returns void

    See

    MDN Documentation for Element.scrollIntoView()

    Example

    // Get a target element by its GUID
    const targetElement = ix.api.dom.getHtml("<ELEMENT-GUID>");

    // Scroll the target element into view with a smooth transition
    ix.api.dom.scrollIntoView(targetElement, "smooth");