@easy-pwa/pwa-install-polyfill

0.0.3 • Public • Published

PWA Install Polyfill

Propose invitation and installation helper for browsers which does not support them (Firefox, iOS...). Today, only Chrome and Edge browsers support the BeforeInstallPromptEvent. This lightweight library (<30ko) allows to get the same behaviour on some other browsers.

The PWA installation method depends on your browser. When a user accepts the installation invitation, a helper is showed to help him to install your application.

Currently supported language : en, fr
The invite banner is not triggered if the brower language is not supported. PR is welcome.

Demo

You can find a demo on the following url : https://easy-pwa.github.io/pwa-install-polyfill/

Installation

Due to frequently behaviour changes in browsers, it is recommended to import the script with jsDelivr to always have the latest version.

Copy this instruction at the end of your html header.

<header>
...
    <script src="https://cdn.jsdelivr.net/npm/@easy-pwa/pwa-install-polyfill" defer="true"></script>
</header>

Package Sidebar

Install

npm i @easy-pwa/pwa-install-polyfill

Weekly Downloads

1

Version

0.0.3

License

MIT

Unpacked Size

33.6 kB

Total Files

3

Last publish

Collaborators

  • adpeyre