Condition on Viewable Property of an Element

Hello,
I would like to know if a property exists to know if an element is currently viewable on the window? Not to know if the element is visible (hidden/show - rendered), but specificly viewable in the window (The element is it on screen? = Yes/No - boolean)

I’m playing with anchors (onviewpartLeave/Enter), but I need to use some conditions, and I would like to do it on the “viewable” property of an element.

Than you

Did you ever get an answer on this?

Hi,
There is no viewable property. My suggestion is to use onviewportenter and leave.
If you need it to be boolean you can add those events to the element and try this code:

let isElementViewable = false;
function onViewprtEnter() {
    isElementViewable = true;
}
function onViewprtLeave() {
    isElementViewable = true;
}

What do you think?

That will work