Skip to content

Commit e983ef5

Browse files
authored
Updates the explainer (#1090)
* Updates the explainer * adds a note on UA behaviour for background documents that wrong apps might be launched. * Update explainer.md
1 parent 4f2df18 commit e983ef5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

WebInstall/explainer.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,14 @@ In the case that the `navigator.install` method is invoked to install an applica
229229
* The promise will resolve if the application opens.
230230
* The promise rejects otherwise, with an `AbortError`.
231231

232+
### *Launching* an application
233+
234+
If an application is already installed, the `.install()` method can trigger UX in the UA to launch an application. **This is not obvious to the developer, as the UX flow will behave and report identically of installing/opening the app.**
235+
236+
In these cases, if a `manifest_id` is provided, the UA will use this alone to find an existing installed app. If a `manifest_id` is not provided, the UA will fallback to `install_url` and search for any existing installed app with the url in scope. Note, this may result in the incorrect app being launched in the case of nested scopes. The developer can fix this by passing a `manifest_id`.
237+
232238
## Installability criteria & Web app manifest `id`
233-
To install content using the Web Install API, the _document being installed_ must have a manifest file. In an ideal scenario the manifest file has an `id` key/value defined, but in either case the processed web app manifest `id` will serve as the installed application's unique identifier. Any other requirement to pass 'installability criteria' is up to each implementor.
239+
To install content using the Web Install API, the_document being installed_ must have a manifest file. In an ideal scenario the manifest file has an `id` key/value defined, but in either case the processed web app manifest `id` will serve as the installed application's unique identifier. Any other requirement to pass 'installability criteria' is up to each implementor.
234240

235241
The importance of `id`s for installed content is to avoid cases where multiple *same* apps are installed with no way to update them. More details can be found in [this document](https://docs.google.com/document/d/19dad0LnqdvEhK-3GmSaffSGHYLeM0kHQ_v4ZRNBFgWM/edit#heading=h.koe6r7c5fhdg).
236242

0 commit comments

Comments
 (0)