If this is an element, then its top-left position is used as
the target coordinates. If it is a string, then it is treated
as a selector for an element using querySelector
.
Optional
userOptions: ScrollToOptionsnull
if there's an ongoing scroll that is not cancellable,
otherwise a ScrollAction.
Scrolls the given scrollable element to the given
to
target.Returns
null
if there's an ongoing scroll that is not cancellable.Note that if
to
is an element or a selector, then it must be a descendant of the scrollable element.Throws
LisnUsageError If the target coordinates are invalid.