package
Basic module to handle the `beforeinstallprompt` event.
npm install @cfware/before-install-promptGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Estimated unpacked size across 3 packages.
12.4 kB
Includes dependencies.
Basic module to handle the beforeinstallprompt window event.
import {promptInstallWait, promptInstallShow} from '@cfware/before-install-prompt';
function readyToShowPrompt() {
/* This function should display a button on the page which will call
* promptInstallShow(); when clicked.
*/
promptInstallShow();
}
promptInstallWait(readyToShowPrompt);Register a function to be called when promptInstallShow is able to show a prompt.
Show the install prompt if possible. This function will silently fail if it's not possible to show the prompt.