(
scrollView: HTMLElement,
element: HTMLElement,
opts: ScrollIntoViewOpts = {}
)
| 31 | * but doesn't affect parents above `scrollView`. |
| 32 | */ |
| 33 | export function scrollIntoView( |
| 34 | scrollView: HTMLElement, |
| 35 | element: HTMLElement, |
| 36 | opts: ScrollIntoViewOpts = {} |
| 37 | ): void { |
| 38 | if (scrollView === element) { |
| 39 | return; |
| 40 | } |
| 41 | |
| 42 | let target = element.getBoundingClientRect(); |
| 43 | scrollRectIntoView(scrollView, element, target, opts); |
| 44 | } |
| 45 | |
| 46 | export function scrollRectIntoView( |
| 47 | scrollView: HTMLElement, |
no test coverage detected