Re: [w3c/manifest] Should appinstalled / beforeinstallprompt fire on native app installation? (#514)

> That's not ideal because it means you can't make a policy decision on whether to preventDefault based on the platform (since you only find out the platform after you prompt).

Ah, I was imagining a drop-down where you would be able to choose either "Web" or "Play Store". 

What this is basically enabling is:

```JS
addEventListener("beforeinstallprompt", async (ev) => {
    ev.preventDefault();
   if (!ev.platform.includes("Play")) {
       return; // Never install for the Web or other platform! <evil laugh>.
   }
   await stuff;
   ev.prompt();
});
```

Is this really where we want to go? 😢 

Basically, if `related_applications` doesn't include "web" and `prefer_related_applications` is true, then would it not disqualify it as a "progressive web app"?


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/manifest/issues/514#issuecomment-257796702

Received on Wednesday, 2 November 2016 08:02:04 UTC