[w3c/manifest] Should appinstalled and beforeinstallprompt events be optional? (#699)

Spinning out from Fyrd/caniuse#4357. @marcoscaceres 

Currently the spec mandates that:

* `appinstalled` event is fired when the application install completes successfully, and
* `beforeinstallprompt` event is fired before the user agent shows an automated install prompt.

The former is a strong requirement. The latter is technically optional (because the user agent can of course never show an automated install prompt, or theoretically show some UI for installing the site but not call it an "automated install prompt"). Should we make these truly optional in the spec, by changing the MUSTs to MAYs?

Note that even if a user agent never fires a `beforeinstallprompt` event, it is still required to have the `BeforeInstallPromptEvent` object in the `Window` namespace, as well as the `onappinstalled` and `onbeforeinstallprompt` attribute handlers.

My opinion is that the current spec wording is fine:

* User agents should fire `appinstalled` if the app is installed from within the browser tab (obviously not if it's installed externally, such as through the Microsoft store).
* User agents are not required to fire `beforeinstallprompt`.
* User agents should still make `BeforeInstallPromptEvent`, `onappinstalled` and `onbeforeinstallprompt` visible, even if they never intend to fire these events.

So a user agent that makes those three names available, and fires `appinstalled`, would be conforming.

-- 
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/699

Received on Thursday, 5 July 2018 04:48:03 UTC