Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

add-to-homescreen-control

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

add-to-homescreen-control - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

2

package.json
{
"name": "add-to-homescreen-control",
"version": "0.4.0",
"version": "0.5.0",
"description": "Library that allows you to control new Add to Home Screen prompt behavior",

@@ -5,0 +5,0 @@ "main": "lib/add-to-homescreen-control.js",

@@ -1,8 +0,8 @@

# Add To Home Screen banner control
# Add to Home Screen banner control
This library allows you to programatically show Add to Homescreen banner. this feature is available from Chrome 68 but the library works on the older versions aswell. It's recomennded to read [useful information](https://github.com/filrak/add-to-homescreen-control/blob/master/README.md#useful-information) section before using this library to avoid common problems and gotchas.
This library allows you to programatically show Add to Home Screen banner. this feature is available from Chrome 68 but the library works on the older versions aswell. It's recomennded to read [useful information](https://github.com/filrak/add-to-homescreen-control/blob/master/README.md#useful-information) section before using this library to avoid common problems and gotchas.
# How to use this library
### Availabkle methods
### Available methods

@@ -29,3 +29,3 @@ - `enable(): void` - enables capturing of `beforeinstallprompt` event and all the librarys behavior. You need to invoke this function as fast as you can to use all the other parts of this library.

````
3. Show the Add To Home Screen banner whenever you want to with `prompt()` method. The banner will appear only if the [criteria](https://developers.google.com/web/fundamentals/app-install-banners#criteria) are met. You can handle unmet criteria in two ways:
3. Show the Add to Home Screen banner whenever you want to with `prompt()` method. The banner will appear only if the [criteria](https://developers.google.com/web/fundamentals/app-install-banners#criteria) are met. You can handle unmet criteria in two ways:

@@ -46,5 +46,5 @@ - make use of the fact that `prompt()` returns a Promise (recommended):

### Browser support
Add to homescreen behavior is supported by [most](https://caniuse.com/#feat=web-app-manifest) of the modern browsers but the banner encouraging users to install the app will be displayed only in Google Chrome. The process of adding website to the homescreen is different for every browser and this library is focused mostly on Chrome since the ATHS banner is present only there.
Add to Home Screen behavior is supported by [most](https://caniuse.com/#feat=web-app-manifest) of the modern browsers but the banner encouraging users to install the app will be displayed only in Google Chrome. The process of adding website to the homescreen is different for every browser and this library is focused mostly on Chrome since the ATHS banner is present only there.
### Add To Homescreen criteria (Chrome)
### Add to Home Screen criteria (Chrome)
Before ATHS prompt can be shown the following criteria needs to be met:

@@ -51,0 +51,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc