Please refer to the following sketch I've copied from another question:
I want to know if an element (as the grey row) inside a scrollable container (as the azure box) is in the viewport using only Vanilla Javascript.
Other threads about viewport don't consider scrollable elements.
I found only one relevant question but is is almost 10 years old.
I'm able to get vertical position of the element with respect to parent element by .offsetTop property but I'm unable to adjust my code for taking into account the scrolled position.