0

As of this answer: Check if element is visible in DOM.
I can get a child element's visibility, but how can I detect/listen its visibility's change?

Is there any method to listen on an element's visibility (e.g:

ele.onChange('offsetParent', e => ...)
Soul Clinic
  • 1,189
  • 12
  • 18

1 Answers1

0

One way to do this would be to use a setInterval function checking the visibility every few seconds.

Another way may be to only change the visibility from the JavaScript and every time it's changed call the function to check it's visibility.

Yaakov David
  • 133
  • 8