This would be much more useful if it were convenient to:
scroll to an element by specifying an arbitrary selector
scroll to an arbitrary position
The first case is currently supported by retrieving the element via the selector and then passing that to scrollToElement. The second case is only supported if you first get the current scroll position and then use scrollTo.
This would be much more useful if it were convenient to:
The first case is currently supported by retrieving the element via the selector and then passing that to
scrollToElement
. The second case is only supported if you first get the current scroll position and then usescrollTo
.