Web Compendium Sitemap

Web APIs

The Web platform provides a large number of APIs [MDN].

Page Visibility API

The Page Visibility API can be used to detect the visibility of a page [MDN]. The visibilityState property returns whether a page is "visible" or "hidden". Visible means that a page is (partially) visible which in practice means that it is in the foreground. Hidden means that the page is not visible to the user, e.g. the page is in the background. [MDN]. The visibilitychange event is fired when a page changes its visibilityState from "visible" to "hidden" or vice versa [MDN].

The pageshow [MDN] and pagehide [MDN] events are not related to the page's visibility despite their names.

Payments

Further resources: