Socket
Book a DemoInstallSign in
Socket

@cfware/before-install-prompt

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cfware/before-install-prompt

Basic module to handle the `beforeinstallprompt` event.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

@cfware/before-install-prompt NPM Version

Basic module to handle the beforeinstallprompt window event.

Usage

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);

promptInstallWait(callback)

Register a function to be called when promptInstallShow is able to show a prompt.

promptInstallShow()

Show the install prompt if possible. This function will silently fail if it's not possible to show the prompt.

Keywords

beforeinstallprompt

FAQs

Package last updated on 16 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts