Is there any way to detect(emit) listeners when the target element is shown on the screen?
Basically, the current way is that element will be detected from shadow to the sun, that's no problem.
How about to detect an element when it just shows in the sun(visible area) directly.
My case is a messaging app. I'd like to detect the newest message which has been read from senders. So, I need to trigger the newest message when it just shows on the screen. But the newest message is only detected by refresh browser rather than render dom. Or, it can be triggered by scroll to top and bottom.
Hi all,
Is there any way to detect(emit) listeners when the target element is shown on the screen? Basically, the current way is that element will be detected from shadow to the sun, that's no problem. How about to detect an element when it just shows in the sun(visible area) directly.
My case is a messaging app. I'd like to detect the newest message which has been read from senders. So, I need to trigger the newest message when it just shows on the screen. But the newest message is only detected by refresh browser rather than render dom. Or, it can be triggered by scroll to top and bottom.
Many thanks.