Optional
altOptional
altIf the scrolling element is already at the given coordinates (or strictly
speaking we allow for 5 pixels difference), then if altTarget
is given,
this will become the target to scroll to.
Optional
amountHow much to scroll in the given direction.
Optional
asIf set to "pixel" (default), amount
is taken as absolute pixels.
If set to "visible", amount
is taken as percent of the element's visible
size in the scrolling direction (100 means full client width for
horizontal or height for vertical scroll).
If set to "content", amount
is taken as percent of the element's full
content size in the scrolling direction (100 means full scroll width for
horizontal or height for vertical scroll).
Optional
durationThe duration of the scroll animation. If not given, it is instant.
Optional
offsetOffset the target coordinates by the given amount(s).
E.g. if the final target coordinates are computed to be
{top: 100, left: 0}
and you specify offset as {top: 10, left: 20}
, it
will scroll to {top: 110, left: 20}
.
Optional
scrollableThe element that should be scrolled.
Optional
userWhether a user attempt to scroll the target can interrupt this before it finishes.
Optional
weWhether another request to us to scroll the same target can interrupt this scroll before it finishes.
Offset the target coordinates by the given amount(s) when
altTarget
is used.See ScrollToOptions.offset.