Server-sent events, unlike WebSockets, are unidirectional; that is, data packets are transmitted from the server to the client (such as a user's web browser). This makes them a good alternative when data from the client to the server does not need to be sent in message form.
There is a traversal API that allows us to find structurally related elements of the document; it treats a document as a tree of element objects. We can access these traversal API by referring to a specific element's parent, children, and siblings properties.
We can use client-side JavaScript's event API to define and dispatch our events using CustomEvent. Assume our application needs to conduct a long computation or a network request on a regular basis, and the other functionality or user interface is unavailable while these operations are in progress.
The Beacon API is a JavaScript web API for sending data from the browser to the web server without expecting to get a response. It is used to send analytics, diagnostics, and logging data which doesn't need a response.