shared
utils
string
object
is
extension
js
tracking
string
dom
when
selection
position
iframe
event
scroll
console
node
string
project
fs
console
closestScrollableElement
Type:Function
Status:stable
Since:1.0.0
Platform:js
@blackbyte.sugar.js.dom.query
Go up the dom three to find the first element that is scrollable. The default scrollable element is the body
Params
- $elm*-HTMLElement
The element to start on
Return
- -HTMLElement|undefined
The element found or undefined
Example
import { closestScrollableElement } from '@blackbyte/sugar/dom';
closestScrollableElement($myElement);Todo
- testsnormal
Author
- Olivier Bosselolivier.bossel@gmail.comhttps://blackbyte.space