Observe and alter the page's global environment as part of an Interface
An Interface for detecting changes to the visibility to the user
You can use times where the page becomes hidden to for example pause a currently running game. These times will also be the last reliable observation you can make before a user might close the page, so treat it as the likely end of the user's session
An Interface for getting the inner window width and height in pixels,
not including toolbars/scrollbars
An Interface for detecting changes to the inner window width and height
An Interface for reading the languages the user prefers.
Each described using language tags according to RFC 5646: Tags for Identifying Languages (also known as BCP 47).
In the returned list they are ordered by preference with the most preferred language first.
Note: uses window.navigator.languages
An Interface for detecting changes to the languages the user prefers.
Each described using language tags according to RFC 5646: Tags for Identifying Languages (also known as BCP 47).
In the returned list they are ordered by preference with the most preferred language first.
Note: uses window.onlanguagechange
An Interface for detecting a specific document event
that has no native Interface, like like scroll, scrollend, selectionchange or paste
An Interface for detecting a specific window event
When navigating to a new page on the same site, you may want to change the document's context:
An Interface for setting the document's title
An Interface for adding or replacing the document's author metadata
An Interface for adding or replacing the document's keywords metadata
which should consist of words relevant to the page's content
An Interface for adding or replacing the document's description metadata
which should be a short and accurate summary of the content of the page.
Several browsers, like Firefox and Opera, use this as the default description of bookmarked pages.
An
Interfacefor detecting when animation frames occur. This will be about 60 times per second, though 75, 120, and 144 are also widely used. To balance this out in your animation, the current time is provided each frame.To get a delta, you could use
Web.Time.posixRequestto get a start time and check with e.g.Duration.fromhow far you've progressed in the timeline.Note: To improve performance and battery life, most browsers pause these notifications when the app is running in a background tab or a hidden
<iframe>.Replacement for
Browser.Events.onAnimationFrameNote: uses
window.requestAnimationFrame.