Returns true if the given target or any of its ancestors can be scrolled in the indicated direction.
This is used, e.g., by gesture event handlers to predict if the default behavior for a given event is likely to result in scrolling.
This helper returns a guess as to what portion of the given element can be scrolled. This is used by CursorInViewMixin to provide a default implementation of [scrollTarget].
If the element has a shadow root containing a default (unnamed) slot, this
returns the first ancestor of that slot that has either
overflow-y styled as
scroll. If the element has no default
slot, or no scrolling ancestor is found, the element itself is returned.
Element– – the component to examine for a scrolling element
If the given element can be scrolled, return that. If not, return the closest ancestor that can be scrolled. If no such ancestor is found, return null.