MicrosoftEdge / MSEdgeExplainers

Home for explainer documents originated by the Microsoft Edge team
Creative Commons Attribution 4.0 International
1.29k stars 205 forks source link

[Web Install] What is the use case of `navigator.canInstall()`? #680

Closed amandabaker closed 10 months ago

amandabaker commented 1 year ago

As it's implemented now, I can't see a use case for navigator.canInstall() that works well considering that:

The use cases that I've considered aren't compatible with those shortcomings:

Additionally, the current implementation doesn't consider that an app store may want to know the difference between an app that is not installable due to missing installability criteria vs an app that is already installed.

Are there other use cases for this method or should it be removed?

diekus commented 1 year ago

canInstall() was more useful in previous ideations of the API. I agree there doesn't seem to be use case for this method nowadays, considering that the promise will fail if the website can't be installed. I am happy to remove this method from the explainer.

There is however, a need to use the inquire field (https://github.com/MicrosoftEdge/MSEdgeExplainers/issues/681)? (not exactly the same use case though, but slightly more useful)

diekus commented 10 months ago

there is no need for a canInstall methos as the promise will resolve or reject accordingly.