/elm-online

Subscribe to online/offline events :signal_strength:

Primary LanguageElmBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

elm-online

Subscribe to online/offline changes in your apps.
elm-online wraps "online" and "offline" events from the browser (see mdn/Online_and_offline_events).

Example

Run the example in elm-reactor like this:

$ cd examples
$ elm-reactor

Usage

import Online


type Msg = ChangeOnline Bool | ...
subscriptions _ = Online.changes ChangeOnline

This is based on elm-lang/geolocation original license is included in this repo.