diff --git a/files/en-us/web/manifest/name/index.md b/files/en-us/web/manifest/name/index.md index 57b74ad765c9a89..55ae2afdc4550b0 100644 --- a/files/en-us/web/manifest/name/index.md +++ b/files/en-us/web/manifest/name/index.md @@ -7,6 +7,15 @@ browser-compat: html.manifest.name {{QuickLinksWithSubpages("/en-US/docs/Web/Manifest")}} + + + + + + + +
TypeString
+ The `name` member is a string that represents the name of the web application as it is usually displayed to the user (e.g., amongst a list of other applications, or as a label for an icon). `name` is directionality-capable, which means it can be displayed left-to-right or right-to-left based on the values of the [`dir`](/en-US/docs/Web/Manifest) and [`lang`](/en-US/docs/Web/Manifest) manifest members. ## Examples diff --git a/files/en-us/web/manifest/prefer_related_applications/index.md b/files/en-us/web/manifest/prefer_related_applications/index.md index eb846d772ea1881..30f005fedde9bd3 100644 --- a/files/en-us/web/manifest/prefer_related_applications/index.md +++ b/files/en-us/web/manifest/prefer_related_applications/index.md @@ -9,16 +9,19 @@ browser-compat: html.manifest.prefer_related_applications {{QuickLinksWithSubpages("/en-US/docs/Web/Manifest")}}{{SeeCompatTable}} + + + + + + + +
TypeBoolean
+ The `prefer_related_applications` member is a boolean value that specifies that applications listed in [`related_applications`](/en-US/docs/Web/Manifest/related_applications) should be preferred over the web application. If the `prefer_related_applications` member is set to `true`, the user agent might suggest installing one of the related applications instead of this web app. If omitted, `prefer_related_applications` defaults to `false`. -## Syntax - -```json -"prefer_related_applications": true -``` - ## Examples ```json diff --git a/files/en-us/web/manifest/related_applications/index.md b/files/en-us/web/manifest/related_applications/index.md index d47340cc54027c4..aa0807b28f4dad2 100644 --- a/files/en-us/web/manifest/related_applications/index.md +++ b/files/en-us/web/manifest/related_applications/index.md @@ -9,34 +9,20 @@ browser-compat: html.manifest.related_applications {{QuickLinksWithSubpages("/en-US/docs/Web/Manifest")}}{{SeeCompatTable}} + + + + + + + +
TypeArray
+ The `related_applications` field is an array of objects specifying native applications that are installable by, or accessible to, the underlying platform — for example, a native Android application obtainable through the Google Play Store. Such applications are intended to be alternatives to the manifest's website that provides similar/equivalent functionality — like the native app equivalent. > [!NOTE] > Developer can specify that the native applications are preferred over the web application by setting `prefer_related_applications` to `true`. -## Syntax - -```json -"related_applications": [ - { - "platform": "", - "url": "", - "id": "" - } -] -``` - -### Values - -Application objects may contain the following properties: - -- `platform` - - : The platform on which the application can be found. [List of available values](https://github.com/w3c/manifest/wiki/Platforms) -- `url` - - : The URL at which the application can be found. -- `id` - - : The ID used to represent the application on the specified platform. - ## Examples ```json @@ -55,6 +41,16 @@ Application objects may contain the following properties: ] ``` +## Related application properties + +Application objects may contain the following properties: + +| Member | Description | +| ---------- | ------------------------------------------------------------------------------------------------------------------------------ | +| `platform` | The platform on which the application can be found. [List of available values](https://github.com/w3c/manifest/wiki/Platforms) | +| `url` | The URL at which the application can be found. | +| `id` | The ID used to represent the application on the specified platform. | + ## Specifications {{Specifications}} diff --git a/files/en-us/web/manifest/short_name/index.md b/files/en-us/web/manifest/short_name/index.md index cfb4b12a81e36d1..bad2238d1834637 100644 --- a/files/en-us/web/manifest/short_name/index.md +++ b/files/en-us/web/manifest/short_name/index.md @@ -7,13 +7,16 @@ browser-compat: html.manifest.short_name {{QuickLinksWithSubpages("/en-US/docs/Web/Manifest")}} -The `short_name` member is a string that represents the name of the web application displayed to the user if there is not enough space to display [`name`](/en-US/docs/Web/Manifest/name) (e.g., as a label for an icon on the phone home screen). `short_name` is directionality-capable, which means it can be displayed left-to-right or right-to-left based on the value of the [`dir`](/en-US/docs/Web/Manifest) and [`lang`](/en-US/docs/Web/Manifest) manifest members. - -## Syntax + + + + + + + +
TypeString
-```json -"name": "" -``` +The `short_name` member is a string that represents the name of the web application displayed to the user if there is not enough space to display [`name`](/en-US/docs/Web/Manifest/name) (e.g., as a label for an icon on the phone home screen). `short_name` is directionality-capable, which means it can be displayed left-to-right or right-to-left based on the value of the [`dir`](/en-US/docs/Web/Manifest) and [`lang`](/en-US/docs/Web/Manifest) manifest members. ## Examples diff --git a/files/en-us/web/manifest/start_url/index.md b/files/en-us/web/manifest/start_url/index.md index 7dec9651ed4aa20..2a06b93e1298f79 100644 --- a/files/en-us/web/manifest/start_url/index.md +++ b/files/en-us/web/manifest/start_url/index.md @@ -7,6 +7,15 @@ browser-compat: html.manifest.start_url {{QuickLinksWithSubpages("/en-US/docs/Web/Manifest")}} + + + + + + + +
TypeString
+ The `start_url` member is a string that represents the _start URL of the web application_ — the preferred URL that should be loaded when the user launches the web application (e.g., when the user taps on the web application's icon from a device's application menu or homescreen). A valid `start_url` needs to be same-origin with the document that references the manifest. If `start_url` is unspecified or invalid in any way (such as not a string, not a valid URL, or not a same-origin with the document), the document URL is used. @@ -14,12 +23,6 @@ A valid `start_url` needs to be same-origin with the document that references th > [!NOTE] > The `start_url` member is purely advisory, and a user agent may ignore it or allow the user to alter it at install time or afterwards. -## Syntax - -```json -"start_url": "" -``` - ## Examples ### Absolute URL