Skip to content

Detect if the browser is offline using browser API or workaround if necessary

License

Notifications You must be signed in to change notification settings

linediconsine/amIoffline

Repository files navigation

am I offline ?

Build Status License Library minified size Library minified + gzipped size

Installation

This library is published in the NPM registry and can be installed using any compatible package manager.

npm install amioffline --save

# For Yarn, use the command below.
yarn add amioffline

Installation from CDN

This module has an UMD bundle available through JSDelivr and Unpkg CDNs.

<!-- For JSDelivr use the code below. -->
<script src="https://cdn.jsdelivr.net/gh/linediconsine/amIoffline/dist/index.mjs"></script>

<script>
  import aio  from "./aio.js";


  aio.whenOffline(alert('OFFLINE'))
</script>

Documentation

Documentation generated from source files by Typedoc.

License

Released under MIT License.

About

Detect if the browser is offline using browser API or workaround if necessary

Resources

License

Stars

Watchers

Forks

Packages

No packages published