Available since v0.1.0
fs-trigger="offline"
StableFires 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
fs-assert-visible— offline banner appearsfs-assert-added— offline queue UI is lazily mountedfs-assert-updated— existing UI flips to offline state
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
online— the complementary trigger- Triggers index