Available since v0.1.0

fs-trigger="offline"

Stable

Fires when the browser loses connectivity (window.offline event). Use to verify the offline-mode UI and queued-mutation flow.

Syntax

<div
  fs-assert="network/offline-banner"
  fs-trigger="offline"
  fs-assert-visible=".offline-banner">
</div>

When to use it

  • Offline indicator or banner UI
  • Switching to read-only mode on connectivity loss
  • Queuing mutations in local storage when the network drops

Example

<div id="editor"
  fs-assert="editor/offline-autosave"
  fs-trigger="offline"
  fs-assert-visible=".autosave-queued-indicator">
</div>

Pairs well with

Gotchas

  • Browser-reported connectivity is unreliable — the event reflects OS/browser heuristics, not actual reachability.
  • Fires on window. Place the trigger on any element; the listener is attached at document level.

See also