Coder Social home page Coder Social logo

jacobdb / pwa-install-prompt Goto Github PK

View Code? Open in Web Editor NEW
125.0 125.0 5.0 91 KB

Prompt users to add your PWA to their home screen, since Apple won’t.

Home Page: https://jacobdb.github.io/pwa-install-prompt/demo/

License: MIT License

JavaScript 60.62% CSS 39.38%

pwa-install-prompt's People

Contributors

jacobdb avatar serabe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pwa-install-prompt's Issues

Not work in Ionic/Vue

Hi, thanks for sharing this resources.

I try with your library in my project and not work.

I execute the code ni mounted() in Vue.

`

.......
<script> import pwaInstallPrompt from "pwa-install-prompt"; ..... .... mounted() { new pwaInstallPrompt(".pwa-install-prompt__container", { active_class: "is-active", closer: ".pwa-install-prompt__overlay", condition: null, expires: 180, show_after: 90, on: { beforeOpen: function () { console.log("before open!"); }, afterOpen: function () { console.log("after open!"); }, beforeClose: function () { console.log("before close!"); }, afterClose: function () { console.log("after close!"); }, } });` thanks! ![image](https://user-images.githubusercontent.com/1463804/77906348-16b06880-7288-11ea-8b2f-487c37681adb.png)

Improve accessibility

  • Focus the prompt when it gets opened
  • Close the prompt when focus is lost
  • Add aria properties

Add `destroy` method

iosInstallPrompt.destroy();

The idea is to completely remove the element from the page if it's destroyed. I'm not sure if this the appropriate way to do this, or if this would be better handled by users with the upcoming .close() method.

Make less specific to iOS

Apparently the banner that pops up at the bottom of Chrome is a temporary solution, and developers can provide their own. This package should be refactored to support this better.

Not work in Ionic/Vue

Hi, thanks for sharing this resources.

I try with your library in my project and not work.

I execute the code ni mounted() in Vue.

........................................................

.......
...................................................................... <script> import pwaInstallPrompt from "pwa-install-prompt"; ..... .... mounted() { new pwaInstallPrompt(".pwa-install-prompt__container", { .............. });

thanks!

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.