Page Visibility API
Last updated
Last updated
Page Visibility API allows web apps to know whether it is visible to the user or not.
It is especially useful for saving resources and improving performance by letting the app avoid performing unnecessary tasks when it is not visible.
You can refer to the code present in /partials/web-apis/page-visibility.html
file and use it accordingly.