onlineSignal

G

Reports the browser's online status as a readonly signal. The initial value comes from navigator.onLine, and the signal updates when the window receives an online or offline event.

  • true: the browser reports that it is online.
  • false: the browser reports that it is offline.
  • undefined: the status is unknown, such as during server rendering when window or navigator is unavailable, or when navigator.onLine is not supported.
Observing the browser's online status