From 21cb098a367001df328ec9a651ba2299483785dc Mon Sep 17 00:00:00 2001 From: Dipika Bhattacharya Date: Thu, 22 Aug 2024 14:52:29 -0400 Subject: [PATCH 1/7] update to follow the same template --- .../web/manifest/background_color/index.md | 17 ++- files/en-us/web/manifest/categories/index.md | 19 ++- files/en-us/web/manifest/display/index.md | 4 +- .../web/manifest/display_override/index.md | 109 ++++++------------ .../en-us/web/manifest/file_handlers/index.md | 66 +++++------ files/en-us/web/manifest/id/index.md | 15 +-- .../web/manifest/launch_handler/index.md | 56 ++++----- files/en-us/web/manifest/name/index.md | 15 +-- files/en-us/web/manifest/orientation/index.md | 17 ++- .../prefer_related_applications/index.md | 15 +-- .../web/manifest/protocol_handlers/index.md | 68 +++++------ .../manifest/related_applications/index.md | 42 ++++--- files/en-us/web/manifest/scope/index.md | 15 +-- files/en-us/web/manifest/screenshots/index.md | 26 +++-- .../en-us/web/manifest/serviceworker/index.md | 72 +++++------- .../en-us/web/manifest/share_target/index.md | 34 ++++-- files/en-us/web/manifest/short_name/index.md | 15 +-- files/en-us/web/manifest/shortcuts/index.md | 93 +++++++-------- files/en-us/web/manifest/start_url/index.md | 15 +-- files/en-us/web/manifest/theme_color/index.md | 15 +-- 20 files changed, 311 insertions(+), 417 deletions(-) diff --git a/files/en-us/web/manifest/background_color/index.md b/files/en-us/web/manifest/background_color/index.md index 538a92bb0cf0aa9..7a762c67d5d23f4 100644 --- a/files/en-us/web/manifest/background_color/index.md +++ b/files/en-us/web/manifest/background_color/index.md @@ -7,22 +7,21 @@ browser-compat: html.manifest.background_color {{QuickLinksWithSubpages("/en-US/docs/Web/Manifest")}} - - - - - - - -
TypeString
+The `background_color` member defines a placeholder background color for the application page to display before its stylesheet is loaded. -The `background_color` member defines a placeholder background color for the application page to display before its stylesheet is loaded. This value is used by the user agent to draw the background color of a shortcut when the manifest is available before the stylesheet has loaded. +This value is used by the user agent to draw the background color of a shortcut when the manifest is available before the stylesheet has loaded. Therefore `background_color` should match the {{cssxref("background-color")}} CSS property in the site's stylesheet for a smooth transition between launching the web application and loading the site's content. > [!NOTE] > The `background_color` member is only meant to improve the user experience while the main stylesheet is loading from the network or the storage media; it is not used by the user agent as the {{cssxref("background-color")}} CSS property when the progressive web app stylesheet is available. +## Syntax + +```json +"background_color": "colorValue" +``` + ## Examples ```json diff --git a/files/en-us/web/manifest/categories/index.md b/files/en-us/web/manifest/categories/index.md index b932c30d5865d6b..d0424767ecd29e9 100644 --- a/files/en-us/web/manifest/categories/index.md +++ b/files/en-us/web/manifest/categories/index.md @@ -7,22 +7,21 @@ browser-compat: html.manifest.categories {{QuickLinksWithSubpages("/en-US/docs/Web/Manifest")}} - - - - - - - -
TypeArray of Strings
+The `categories` member is an array of strings defining the names of categories that the application supposedly belongs to. -The `categories` member is an array of strings defining the names of categories that the application supposedly belongs to. There is no standard list of possible values, but the W3C maintains [a list of known categories](https://github.com/w3c/manifest/wiki/Categories). +There is no standard list of possible values, but the W3C maintains [a list of known categories](https://github.com/w3c/manifest/wiki/Categories). > **Note:** `categories` are used only as hints for catalogs or stores listing web applications. Like search engines and meta keywords, catalogs and stores are free to ignore them. > **Note:** `categories` values are lower-cased by the stores and catalogs before processing, so "News" and "news" are treated as the same value. Developers are encouraged to use lower case in the first place. -## Example +## Syntax + +```json +"categories": ["category1", "category2", "category3"] +``` + +## Examples ```json "categories": ["books", "education", "medical"] diff --git a/files/en-us/web/manifest/display/index.md b/files/en-us/web/manifest/display/index.md index 4384834f40467c0..6281f4b8ef35ab2 100644 --- a/files/en-us/web/manifest/display/index.md +++ b/files/en-us/web/manifest/display/index.md @@ -12,12 +12,12 @@ The `display` manifest member is used to specify your preferred display mode for ## Syntax ```json -"display": "standalone" +"display": "fullscreen | standalone | minimal-ui | browser" ``` ### Values -The value of the `display` member is a string. The possible values include `fullscreen`, `standalone`, `minimal-ui`, and `browser`. If a browser does not support the specified display mode, it follows a pre-defined fallback chain: `fullscreen` → `standalone` → `minimal-ui` → `browser`. If `display` is not specified, the default value `browser` is used. +The value of the `display` member is a string that can take one of the following values, listed in the order of fallback if a browser does not support the specified mode: - `fullscreen` diff --git a/files/en-us/web/manifest/display_override/index.md b/files/en-us/web/manifest/display_override/index.md index 7b246b2f93c5686..466116752c0d7ac 100644 --- a/files/en-us/web/manifest/display_override/index.md +++ b/files/en-us/web/manifest/display_override/index.md @@ -9,84 +9,51 @@ browser-compat: html.manifest.display_override {{QuickLinksWithSubpages("/en-US/docs/Web/Manifest")}}{{SeeCompatTable}} - - - - - - - -
TypeArray
- The [`display`](/en-US/docs/Web/Manifest/display) member is used to determine the developer's preferred display mode for a website. It follows a process where the browser falls back to the next display mode if the requested one is not supported. In some advanced use cases, this fallback process might not be enough. The `display_override` member solves this by letting the developer provide a sequence of display modes that the browser will consider before using the `display` member. Its value is an array of display modes that are considered in-order, and the first supported display mode is applied. -## Values +## Syntax + +```json +"display_override": ["modeKeyword1", "modeKeyword2", "modeKeyword3"] +``` + +### Values Display override objects are display-mode strings, the possible values are: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Display ModeDescription
browser - The application opens in a conventional browser tab or new window, - depending on the browser and platform. This is the default. -
fullscreen - All of the available display area is used and no user agent - {{Glossary("chrome")}} is shown. -
minimal-ui - The application will look and feel like a standalone application with - a minimal set of UI elements for controlling navigation. The - elements will vary by browser. -
standalone - The application will look and feel like a standalone application. This - can include the application having a different window, its own icon in - the application launcher, etc. In this mode, the user agent will exclude - UI elements for controlling navigation, but can include other UI - elements such as a status bar. -
tabbed - The application can contain multiple application contexts inside a single OS-level window. Supporting browsers can choose how to display these contexts, but a common approach is to provide a tab bar to switch between them. -
window-controls-overlay - This display mode only applies when the application is in a separate PWA - window and on a desktop operating system. The application will opt-in to - the Window Controls Overlay feature, where the full window surface area - will be available for the app's web content and the window control buttons - (maximize, minimize, close, and other PWA-specific buttons) will appear - as an overlay above the web content. -
- -## Example +- `browser` + + - : The application opens in a conventional browser tab or new window, depending on the browser and platform. + This is the default. + +- `fullscreen` + + - : All of the available display area is used and no user agent {{Glossary("chrome")}} is shown. + +- `minimal-ui` + + - : The application will look and feel like a standalone application with a minimal set of UI elements for controlling navigation. + The elements will vary by browser. + +- `standalone` + + - : The application will look and feel like a standalone application. + This can include the application having a different window, its own icon in the application launcher, etc. + In this mode, the user agent will exclude UI elements for controlling navigation, but can include other UI elements such as a status bar. + +- `tabbed` + + - : The application can contain multiple application contexts inside a single OS-level window. + Supporting browsers can choose how to display these contexts, but a common approach is to provide a tab bar to switch between them. + +- `window-controls-overlay` + + - : This display mode only applies when the application is in a separate PWA window and on a desktop operating system. + The application will opt-in to the Window Controls Overlay feature, where the full window surface area will be available for the app's web content and the window control buttons (maximize, minimize, close, and other PWA-specific buttons) will appear as an overlay above the web content. + +## Examples In the example below, the browser will consider the following display-mode fallback chain in this order: `fullscreen` → `minimal-ui` → `standalone`. diff --git a/files/en-us/web/manifest/file_handlers/index.md b/files/en-us/web/manifest/file_handlers/index.md index 00661b280234ab6..e0a2d7116bf7075 100644 --- a/files/en-us/web/manifest/file_handlers/index.md +++ b/files/en-us/web/manifest/file_handlers/index.md @@ -9,15 +9,6 @@ browser-compat: html.manifest.file_handlers {{QuickLinksWithSubpages("/en-US/docs/Web/Manifest")}}{{SeeCompatTable}} - - - - - - - -
TypeArray
- The `file_handlers` member specifies an array of objects representing the types of files an installed [progressive web app (PWA)](/en-US/docs/Web/Progressive_web_apps) can handle. The `file_handlers` member is read by the browser when the PWA is installed and used to associate the application with a given set of file types at the operating system level. @@ -27,39 +18,36 @@ For example, a PWA can be registered to handle files that match the `text/plain` > [!NOTE] > While the `file_handlers` member is used to register a PWA with a given set of file types, this only results in the operating system launching the PWA when a matching file is opened. The PWA then needs to actually handle the file using JavaScript code. See [Handling the files](#handling_the_files) for more information. -## Values +## Syntax + +```json +"file_handlers": [ + { + "action": "actionURL", + "accept": { + "mimeType1": ["fileExtension1", "fileExtension2"], + "mimeType2": ["fileExtension3", "fileExtension4"] + } + } +] +``` + +### Values An array of objects. Each object in the array must contain the following values (`action` and `accept` are required): - - - - - - - - - - - - - - - - - -
MemberDescription
action - A string containing the URL to navigate to when a file is handled.
- This URL must be within the navigation scope of the PWA, which is the set of URLs that the PWA can navigate to. The navigation scope of a PWA defaults to its start_url member, but can also be defined by using the scope member. -
accept - An object. For each property in the object: -
    -
  • The property key is a MIME type.
  • -
  • The property value is an array of strings representing file extensions associated with that MIME type.
  • -
-
- -## Example +- `action` + + - : A string containing the URL to navigate to when a file is handled. + This URL must be within the navigation scope of the PWA, which is the set of URLs that the PWA can navigate to. The navigation scope of a PWA defaults to its [`start_url`](/en-US/docs/Web/Manifest/start_url) member, but can also be defined by using the [`scope`](/en-US/docs/Web/Manifest/scope) member. + +- `accept` + + - : An object. For each property in the object: + - The property key is a MIME type. + - The property value is an array of strings representing file extensions associated with that MIME type. + +## Examples In this example, a web app manifest declares one file handler that registers the app to handle audio files. Other manifest members such as `name`, or `icons` are not included in this example for brevity: diff --git a/files/en-us/web/manifest/id/index.md b/files/en-us/web/manifest/id/index.md index aa0e51f26d4b260..0adad5b93df5f03 100644 --- a/files/en-us/web/manifest/id/index.md +++ b/files/en-us/web/manifest/id/index.md @@ -7,15 +7,6 @@ browser-compat: html.manifest.id {{QuickLinksWithSubpages("/en-US/docs/Web/Manifest")}} - - - - - - - -
TypeString
- The `id` member is a string that represents the _identity of the web application_ — the unique identifier for the web application. If the web application ID does not match an existing ID, the application will be treated as a unique identity even if it is from the same URL. A valid `id` needs to be same-origin with `start_url`. If the `id` is a relative URL, it is resolved using the origin of [`start_url`](/en-US/docs/Web/Manifest/start_url). The fragment is always ignored. @@ -25,6 +16,12 @@ If the `id` is unspecified or invalid in any way (such as not a string, not a va > [!NOTE] > The `id` member can be used to uniquely identify applications. The `id` member is processed like a `start_url` but can be out of [scope](/en-US/docs/Web/Manifest/scope) because it does not point to a resource that can be navigated to. +## Syntax + +```json +"id": "identifierString" +``` + ## Examples ```json diff --git a/files/en-us/web/manifest/launch_handler/index.md b/files/en-us/web/manifest/launch_handler/index.md index 2c3392bd4774865..6d11c2173bfe69e 100644 --- a/files/en-us/web/manifest/launch_handler/index.md +++ b/files/en-us/web/manifest/launch_handler/index.md @@ -9,46 +9,32 @@ browser-compat: html.manifest.launch_handler {{QuickLinksWithSubpages("/en-US/docs/Web/Manifest")}}{{SeeCompatTable}} - - - - - - - -
TypeObject
- The `launch_handler` member defines values that control the launch of a web application. Currently it can only contain a single value, `client_mode`, which specifies the context in which the app should be loaded when launched. For example, in an existing web app client containing an instance of the app, or in a new web app client. This leaves scope for more `launch_handler` values to be defined in the future. -## launch_handler item values +## Syntax + +```json +"launch_handler": { + "client_mode": ["contextKeyword1", "contextKeyword2", "contextKeyword3"] +} +``` + +### Values `launch_handler` objects may contain the following values: - - - - - - - - - - - - - -
MemberDescription
client_mode

A string, or comma-separated array of strings, which specifies the context in which the app should be loaded when launched. If an array of strings is provided, the first valid value is used. Possible values are:

-
-
auto
-
The user agent decides what context makes sense for the platform to load the app in. For example, navigate-existing might make more sense on mobile, where single app instances are commonplace, whereas navigate-new might make more sense in a desktop context. This is the default value used if all the provided values are invalid.
-
focus-existing
-
If the app is already loaded in a web app client, it is brought into focus but not navigated to the launch target URL. The target URL is made available via {{domxref("Window.launchQueue")}} to allow custom launch navigation handling to be implemented. If the app is not already loaded in a web app client, navigate-new behavior is used instead.
-
navigate-existing
-
If the app is already loaded in a web app client, it is brought into focus and navigated to the specified launch target URL. The target URL is made available via {{domxref("Window.launchQueue")}} to allow additional custom launch navigation handling to be implemented. If the app is not already loaded in a web app client, navigate-new behavior is used instead.
-
navigate-new
-
The app is loaded inside a new web app client. The target URL is made available via {{domxref("Window.launchQueue")}} to allow additional custom launch navigation handling to be implemented.
-
-
+- `client_mode` + + - : A string, or comma-separated array of strings, which specifies the context in which the app should be loaded when launched. If an array of strings is provided, the first valid value is used. + Possible values are:

+ - `auto` + - : The user agent decides what context makes sense for the platform to load the app in. For example, `navigate-existing` might make more sense on mobile, where single app instances are commonplace, whereas `navigate-new` might make more sense in a desktop context. This is the default value used if all the provided values are invalid. + - `focus-existing` + - : If the app is already loaded in a web app client, it is brought into focus but not navigated to the launch target URL. The target URL is made available via {{domxref("Window.launchQueue")}} to allow custom launch navigation handling to be implemented. If the app is not already loaded in a web app client, `navigate-new` behavior is used instead. + - `navigate-existing` + - : If the app is already loaded in a web app client, it is brought into focus and navigated to the specified launch target URL. The target URL is made available via {{domxref("Window.launchQueue")}} to allow additional custom launch navigation handling to be implemented. If the app is not already loaded in a web app client, `navigate-new` behavior is used instead. + - `navigate-new` + - : The app is loaded inside a new web app client. The target URL is made available via {{domxref("Window.launchQueue")}} to allow additional custom launch navigation handling to be implemented. ## Examples diff --git a/files/en-us/web/manifest/name/index.md b/files/en-us/web/manifest/name/index.md index 55ae2afdc4550b0..0b4ab6f0bd79e68 100644 --- a/files/en-us/web/manifest/name/index.md +++ b/files/en-us/web/manifest/name/index.md @@ -7,17 +7,14 @@ 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. +## Syntax + +```json +"name": "appName" +``` + ## Examples Simple `name` in left-to-right language: diff --git a/files/en-us/web/manifest/orientation/index.md b/files/en-us/web/manifest/orientation/index.md index 501889a2eb6d176..2c61b42a62e74e2 100644 --- a/files/en-us/web/manifest/orientation/index.md +++ b/files/en-us/web/manifest/orientation/index.md @@ -7,15 +7,6 @@ browser-compat: html.manifest.orientation {{QuickLinksWithSubpages("/en-US/docs/Web/Manifest")}} - - - - - - - -
TypeString
- The `orientation` member defines the default orientation for all the website's top-level {{Glossary("Browsing context", "browsing contexts")}}. > **Note:** `orientation` and/or its specific values might not be supported by a user agent on various display modes because supporting them does not make sense for the particular context. @@ -23,7 +14,13 @@ The `orientation` member defines the default orientation for all the website's t > [!NOTE] > The orientation can be changed at runtime via the [Screen Orientation API](/en-US/docs/Web/API/Screen_Orientation_API). -## Values +## Syntax + +```json +"orientation": "any" | "natural" | "landscape" | "landscape-primary" | "landscape-secondary" | "portrait" | "portrait-primary" | "portrait-secondary" +``` + +### Values `orientation` can take one of the following values: 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 30f005fedde9bd3..72c3c5bdf937d4b 100644 --- a/files/en-us/web/manifest/prefer_related_applications/index.md +++ b/files/en-us/web/manifest/prefer_related_applications/index.md @@ -9,19 +9,16 @@ 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 | false +``` + ## Examples ```json diff --git a/files/en-us/web/manifest/protocol_handlers/index.md b/files/en-us/web/manifest/protocol_handlers/index.md index 338e6c1b482f149..0166b3117495a12 100644 --- a/files/en-us/web/manifest/protocol_handlers/index.md +++ b/files/en-us/web/manifest/protocol_handlers/index.md @@ -9,20 +9,36 @@ browser-compat: html.manifest.protocol_handlers {{QuickLinksWithSubpages("/en-US/docs/Web/Manifest")}}{{SeeCompatTable}} - - - - - - - -
TypeArray
- The `protocol_handlers` member specifies an array of objects that are protocols which this web app can register and handle. Protocol handlers register the application in an OS's application preferences; the registration associates a specific application with the given protocol scheme. For example, when using the protocol handler `mailto://` on a web page, registered email applications open. After registering a web app as a protocol handler, when a user clicks on a hyperlink with a specific scheme such as `mailto://` or `web+music://` from a browser or native app, the registered PWA would open and receive the URL. -## Example +## Syntax + +```json +"protocol_handlers": [ + { + "protocol": "protocolString", + "url": "urlString" + } + ] +``` + +### Values + +Protocol handlers objects may contain the following values: + +- `protocol` + + - : A required string containing the protocol to be handled; e.g.: `mailto`, `ms-word`, `web+jngl`. + +- `url` + - : Required HTTPS URL within the application [`scope`](/en-US/docs/Web/Manifest/scope) that will handle the + protocol. + The `%s` token will be replaced by the URL starting with the protocol handler's scheme. If `url` is a relative + URL, the base URL will be the URL of the manifest. + +## Examples In this example, a web app manifest declares that the app should be registered to handle the protocols `web+jngl` and `web+jnglstore`. @@ -43,38 +59,6 @@ A developer can add a field in the manifest.json to declare which protocols the Registering applications to handle URL schemes is operating-system dependent. This association is usually done during application install but it can also be done afterwards from an app that has already been installed. -## Values - -Protocol handlers objects may contain the following values: - - - - - - - - - - - - - - - - - - -
MemberDescription
protocol - A required string containing the protocol to be handled; e.g.: - mailto, ms-word, web+jngl. -
url - Required HTTPS URL within the application - scope that will handle the - protocol. The %s token will be replaced by the URL starting - with the protocol handler's scheme. If url is a relative - URL, the base URL will be the URL of the manifest. -
- ## Specifications {{Specifications}} diff --git a/files/en-us/web/manifest/related_applications/index.md b/files/en-us/web/manifest/related_applications/index.md index aa0807b28f4dad2..06e31f6d380dd51 100644 --- a/files/en-us/web/manifest/related_applications/index.md +++ b/files/en-us/web/manifest/related_applications/index.md @@ -9,20 +9,34 @@ 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": "platformValue", + "url": "applicationURL", + "id": "applicationId" + } +] +``` + +### 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 @@ -41,16 +55,6 @@ The `related_applications` field is an array of objects specifying native applic ] ``` -## 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/scope/index.md b/files/en-us/web/manifest/scope/index.md index eed4eebfd7ea479..e358beb74e86812 100644 --- a/files/en-us/web/manifest/scope/index.md +++ b/files/en-us/web/manifest/scope/index.md @@ -7,21 +7,18 @@ browser-compat: html.manifest.scope {{QuickLinksWithSubpages("/en-US/docs/Web/Manifest")}} - - - - - - - -
TypeString
- The `scope` member is a string that defines the navigation scope of this web application's application context. It restricts what web pages can be viewed while the manifest is applied. If the user navigates outside the scope, it reverts to a normal web page inside a browser tab or window. A valid `scope` needs to allow [`start_url`](/en-US/docs/Web/Manifest/start_url) to be in scope. If the `scope` is a relative URL, the base URL will be the URL of the manifest. The query and fragment of the URL are always ignored. If `scope` is unspecified or invalid in any way (such as not a string, not a valid URL, or causes `start_url` to be out of scope), the `start_url` is used, with its last path segment removed. +## Syntax + +```json +"scope": "urlString" +``` + ## Examples If the scope is relative, the manifest URL is used as a base URL: diff --git a/files/en-us/web/manifest/screenshots/index.md b/files/en-us/web/manifest/screenshots/index.md index 86a7bc91c268f47..f59f5dd2dc5efe6 100644 --- a/files/en-us/web/manifest/screenshots/index.md +++ b/files/en-us/web/manifest/screenshots/index.md @@ -9,18 +9,24 @@ browser-compat: html.manifest.screenshots {{QuickLinksWithSubpages("/en-US/docs/Web/Manifest")}}{{SeeCompatTable}} - - - - - - - -
TypeArray
- The `screenshots` member defines an array of screenshots intended to showcase the application. These images are intended to be used by progressive web app stores. -## Properties +## Syntax + +```json +"screenshots": [ + { + "form_factor": "narrow" | "wide", + "label": "screenshotName", + "platform": "platformKeyword", + "sizes": "imageWidthximageHeight", + "src": "imageURL", + "type": "image/imageFormat" + } +] +``` + +### Values The `screenshots` member is an array of objects each representing a screenshot. Each screenshot object may contain the following properties: diff --git a/files/en-us/web/manifest/serviceworker/index.md b/files/en-us/web/manifest/serviceworker/index.md index 94a16d2bacd3dfd..1d6522b91c01c1c 100644 --- a/files/en-us/web/manifest/serviceworker/index.md +++ b/files/en-us/web/manifest/serviceworker/index.md @@ -10,57 +10,41 @@ browser-compat: html.manifest.serviceworker {{QuickLinksWithSubpages("/en-US/docs/Web/Manifest")}}{{SeeCompatTable}}{{Non-standard_header}} - - - - - - - -
TypeObject
- The `serviceworker` member specifies a serviceworker that is Just-In-Time (JIT)-installed and registered to run a web-based payment app providing a payment mechanism for a specified payment method in a merchant website. See {{domxref("Payment Handler API", "Payment Handler API", "", "nocode")}} for more details. -## Example +## Syntax -See [Payment Handler API > Concepts and usage](/en-US/docs/Web/API/Payment_Handler_API#concepts_and_usage). +```json +"serviceworker": { + "scope": "scopePath", + "src": "scriptPath", + "use_cache": true | false +} +``` -## Values +### Values `serviceworker` objects may contain the following values: - - - - - - - - - - - - - - - - - - - - - -
MemberDescription
scope - A string representing the service worker's registration scope. -
src - A string representing the URL to download the service worker script from. -
use_cache - A boolean that sets how the HTTP cache is used for service worker script resources during updates. It provides equivalent functionality to certain values of the updateViaCache option provided when a service worker is registered via JavaScript using {{domxref("ServiceWorkerContainer.register()")}}. -
    -
  • true: The HTTP cache will be queried for imports, but the main script will always be updated from the network. If no fresh entry is found in the HTTP cache for the imports, they're fetched from the network. Equivalent to updateViaCache: "imports".
  • -
  • false: The HTTP cache will not be used for the main script or its imports. All service worker script resources will be updated from the network. Equivalent to updateViaCache: "none".
  • -
-
+- `scope` + + - : A string representing the service worker's registration scope. + +- `src` + + - : A string representing the URL to download the service worker script from. + +- `use_cache` + + - : A boolean that sets how the HTTP cache is used for service worker script resources during updates. + It provides equivalent functionality to certain values of the `updateViaCache` option provided when a service worker is registered via JavaScript using {{domxref("ServiceWorkerContainer.register()")}}. + + - `true`: The HTTP cache will be queried for imports, but the main script will always be updated from the network. If no fresh entry is found in the HTTP cache for the imports, they're fetched from the network. Equivalent to `updateViaCache: "imports"`. + - `false`: The HTTP cache will not be used for the main script or its imports. All service worker script resources will be updated from the network. Equivalent to `updateViaCache: "none"`. + +## Examples + +See [Payment Handler API > Concepts and usage](/en-US/docs/Web/API/Payment_Handler_API#concepts_and_usage). ## Specifications diff --git a/files/en-us/web/manifest/share_target/index.md b/files/en-us/web/manifest/share_target/index.md index c98efac371f1c85..6493fc57826790e 100644 --- a/files/en-us/web/manifest/share_target/index.md +++ b/files/en-us/web/manifest/share_target/index.md @@ -9,15 +9,6 @@ browser-compat: html.manifest.share_target {{QuickLinksWithSubpages("/en-US/docs/Web/Manifest")}}{{SeeCompatTable}} - - - - - - - -
TypeObject
- The `share_target` manifest member allows installed {{Glossary("Progressive Web Apps")}} (PWAs) to be registered as a share target in the system's share dialog. Once registered and installed, a PWA that uses the Web Share Target API acts as a content sharing target, along with typical system share targets like email, messengers, and other native apps that can receive shared content. @@ -25,9 +16,30 @@ Once registered and installed, a PWA that uses the Web Share Target API acts as > [!NOTE] > If you want to share data using the Web Share API, see [Web Share API](/en-US/docs/Web/API/Web_Share_API) and [`navigator.share()`](/en-US/docs/Web/API/Navigator/share). -## Properties +## Syntax + +```json +"share_target": { + "action": "targetURL", + "enctype": "encodingType", + "method": "GET" | "POST", + "params": { + "title": "titleParam", + "text": "textParam", + "url": "urlParam", + "files": [ + { + "name": "fileName", + "accept": ["mimeType", "fileExtension"] + } + ] + } +} +``` + +### Values -To define how an application can receive share data, a `share_target` object in the manifest may contain the following properties (`action` and `params` are required): +The value of the `share_target` member is an object that defines how an application can receive shared data. This object may contain the following properties (`action` and `params` are required): - `action` - : The URL for the web share target. diff --git a/files/en-us/web/manifest/short_name/index.md b/files/en-us/web/manifest/short_name/index.md index bad2238d1834637..88072e37bf9913c 100644 --- a/files/en-us/web/manifest/short_name/index.md +++ b/files/en-us/web/manifest/short_name/index.md @@ -7,17 +7,14 @@ browser-compat: html.manifest.short_name {{QuickLinksWithSubpages("/en-US/docs/Web/Manifest")}} - - - - - - - -
TypeString
- 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 + +```json +"name": "shortAppName" +``` + ## Examples Simple `short_name` in left-to-right language: diff --git a/files/en-us/web/manifest/shortcuts/index.md b/files/en-us/web/manifest/shortcuts/index.md index 9e93481543f0eb9..ce91e161d4711e5 100644 --- a/files/en-us/web/manifest/shortcuts/index.md +++ b/files/en-us/web/manifest/shortcuts/index.md @@ -7,63 +7,52 @@ browser-compat: html.manifest.shortcuts {{QuickLinksWithSubpages("/en-US/docs/Web/Manifest")}} - - - - - - - -
TypeArray
- The `shortcuts` member defines an array of shortcuts or links to key tasks or pages within a web app. A user agent can use these values to assemble a context menu to be displayed by the operating system when a user engages with the web app's icon. When user invokes a shortcut, the user agent will navigate to the address given by shortcut's `url` member. -## Shortcut item values +## Syntax + +```json +"shortcuts": [ + { + "name": "displayName", + "short_name": "shortName", + "description": "shortcutDescription", + "url": "shortcutURL", + "icons": [ + { + "src": "iconURL", + "sizes": "iconWidthxiconHeight", + "type": "image/imageFormat", + "purpose": "monochrome" | "maskable | "any" + } + ] + } +] +``` + +### Values Shortcut objects may contain the following values (only `name` and `url` are required): - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MemberDescription
name A string that can be displayed to the user in a context menu.
short_name - A string that can be displayed where there is insufficient space to - display the full name of the shortcut. -
description - A string that describes the purpose of the shortcut. It may be exposed - to assistive technology. -
url - A URL within the application that opens when the shortcut is activated. -
icons - A set of icons that represent the shortcut. They can be used, e.g., in - the context menu. When included, the icon set must include a 96x96 pixel - icon. -
+- `name` + + - : A string that can be displayed to the user in a context menu. + +- `short_name` {{Optional_Inline}} + + - : A string that can be displayed where there is insufficient space to display the full name of the shortcut. + +- `description` {{Optional_Inline}} + + - : A string that describes the purpose of the shortcut. It may be exposed to assistive technology. + +- `url` + + - : A URL within the application that opens when the shortcut is activated. + +- `icons` {{Optional_Inline}} + - : A set of icons that represent the shortcut. + They can be used, e.g., in the context menu. When included, the icon set must include a 96x96 pixel icon. ## Examples diff --git a/files/en-us/web/manifest/start_url/index.md b/files/en-us/web/manifest/start_url/index.md index 2a06b93e1298f79..77f3530eef42495 100644 --- a/files/en-us/web/manifest/start_url/index.md +++ b/files/en-us/web/manifest/start_url/index.md @@ -7,15 +7,6 @@ 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. @@ -23,6 +14,12 @@ 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": "startURL" +``` + ## Examples ### Absolute URL diff --git a/files/en-us/web/manifest/theme_color/index.md b/files/en-us/web/manifest/theme_color/index.md index 8fe8b43e9582650..b286c7a0e362c2d 100644 --- a/files/en-us/web/manifest/theme_color/index.md +++ b/files/en-us/web/manifest/theme_color/index.md @@ -7,17 +7,14 @@ browser-compat: html.manifest.theme_color {{QuickLinksWithSubpages("/en-US/docs/Web/Manifest")}} - - - - - - - -
TypeString
- The `theme_color` member is a string that defines the default theme color for the application. This sometimes affects how the OS displays the site (e.g., on Android's task switcher, the theme color surrounds the site). +## Syntax + +```json +"theme_color": "colorValue" +``` + ## Examples ```json From efc79ea9e7cb9b47b480353a9079ba82063886c9 Mon Sep 17 00:00:00 2001 From: Dipika Bhattacharya Date: Thu, 22 Aug 2024 15:19:57 -0400 Subject: [PATCH 2/7] update syntax --- files/en-us/web/manifest/display/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/manifest/display/index.md b/files/en-us/web/manifest/display/index.md index 6281f4b8ef35ab2..8e8d0c9ddb321e5 100644 --- a/files/en-us/web/manifest/display/index.md +++ b/files/en-us/web/manifest/display/index.md @@ -12,7 +12,7 @@ The `display` manifest member is used to specify your preferred display mode for ## Syntax ```json -"display": "fullscreen | standalone | minimal-ui | browser" +"display": "fullscreen" | "standalone" | "minimal-ui" | "browser" ``` ### Values From 4fc17026e72f61f876e942cfd129bf51fa3c3596 Mon Sep 17 00:00:00 2001 From: Dipika Bhattacharya Date: Wed, 4 Sep 2024 08:31:56 -0400 Subject: [PATCH 3/7] update placeholder values --- files/en-us/web/manifest/display/index.md | 2 +- .../manifest/prefer_related_applications/index.md | 2 +- .../en-us/web/manifest/related_applications/index.md | 2 +- files/en-us/web/manifest/screenshots/index.md | 12 ++++++------ files/en-us/web/manifest/serviceworker/index.md | 2 +- files/en-us/web/manifest/share_target/index.md | 2 +- files/en-us/web/manifest/shortcuts/index.md | 6 +++--- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/files/en-us/web/manifest/display/index.md b/files/en-us/web/manifest/display/index.md index 8e8d0c9ddb321e5..bfd80d59e59e277 100644 --- a/files/en-us/web/manifest/display/index.md +++ b/files/en-us/web/manifest/display/index.md @@ -12,7 +12,7 @@ The `display` manifest member is used to specify your preferred display mode for ## Syntax ```json -"display": "fullscreen" | "standalone" | "minimal-ui" | "browser" +"display": "" ``` ### Values 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 72c3c5bdf937d4b..d9532b45d8f1d18 100644 --- a/files/en-us/web/manifest/prefer_related_applications/index.md +++ b/files/en-us/web/manifest/prefer_related_applications/index.md @@ -16,7 +16,7 @@ If omitted, `prefer_related_applications` defaults to `false`. ## Syntax ```json -"prefer_related_applications": true | false +"prefer_related_applications": ``` ## Examples diff --git a/files/en-us/web/manifest/related_applications/index.md b/files/en-us/web/manifest/related_applications/index.md index 06e31f6d380dd51..59a593247fe7e62 100644 --- a/files/en-us/web/manifest/related_applications/index.md +++ b/files/en-us/web/manifest/related_applications/index.md @@ -19,7 +19,7 @@ The `related_applications` field is an array of objects specifying native applic ```json "related_applications": [ { - "platform": "platformValue", + "platform": "", "url": "applicationURL", "id": "applicationId" } diff --git a/files/en-us/web/manifest/screenshots/index.md b/files/en-us/web/manifest/screenshots/index.md index f59f5dd2dc5efe6..e0df6860f014928 100644 --- a/files/en-us/web/manifest/screenshots/index.md +++ b/files/en-us/web/manifest/screenshots/index.md @@ -16,12 +16,12 @@ The `screenshots` member defines an array of screenshots intended to showcase th ```json "screenshots": [ { - "form_factor": "narrow" | "wide", - "label": "screenshotName", - "platform": "platformKeyword", - "sizes": "imageWidthximageHeight", - "src": "imageURL", - "type": "image/imageFormat" + "form_factor": "", + "label": "", + "platform": "", + "sizes": "", + "src": "", + "type": "" } ] ``` diff --git a/files/en-us/web/manifest/serviceworker/index.md b/files/en-us/web/manifest/serviceworker/index.md index 1d6522b91c01c1c..d6262ee142bd812 100644 --- a/files/en-us/web/manifest/serviceworker/index.md +++ b/files/en-us/web/manifest/serviceworker/index.md @@ -18,7 +18,7 @@ The `serviceworker` member specifies a serviceworker that is Just-In-Time (JIT)- "serviceworker": { "scope": "scopePath", "src": "scriptPath", - "use_cache": true | false + "use_cache": } ``` diff --git a/files/en-us/web/manifest/share_target/index.md b/files/en-us/web/manifest/share_target/index.md index 6493fc57826790e..b4ab4ee9921fcf1 100644 --- a/files/en-us/web/manifest/share_target/index.md +++ b/files/en-us/web/manifest/share_target/index.md @@ -22,7 +22,7 @@ Once registered and installed, a PWA that uses the Web Share Target API acts as "share_target": { "action": "targetURL", "enctype": "encodingType", - "method": "GET" | "POST", + "method": , "params": { "title": "titleParam", "text": "textParam", diff --git a/files/en-us/web/manifest/shortcuts/index.md b/files/en-us/web/manifest/shortcuts/index.md index ce91e161d4711e5..0b63f39678c9d7c 100644 --- a/files/en-us/web/manifest/shortcuts/index.md +++ b/files/en-us/web/manifest/shortcuts/index.md @@ -21,9 +21,9 @@ The `shortcuts` member defines an array of shortcuts or links to key tasks or pa "icons": [ { "src": "iconURL", - "sizes": "iconWidthxiconHeight", - "type": "image/imageFormat", - "purpose": "monochrome" | "maskable | "any" + "sizes": "", + "type": "", + "purpose": "" } ] } From beede5728200413c99bddddd74cc6bf2d338157a Mon Sep 17 00:00:00 2001 From: Dipika Bhattacharya Date: Wed, 4 Sep 2024 11:11:48 -0400 Subject: [PATCH 4/7] update placeholder values --- .../en-us/web/manifest/background_color/index.md | 2 +- files/en-us/web/manifest/categories/index.md | 2 +- .../en-us/web/manifest/display_override/index.md | 2 +- files/en-us/web/manifest/file_handlers/index.md | 6 +++--- files/en-us/web/manifest/id/index.md | 2 +- files/en-us/web/manifest/launch_handler/index.md | 2 +- files/en-us/web/manifest/name/index.md | 2 +- files/en-us/web/manifest/orientation/index.md | 2 +- .../web/manifest/protocol_handlers/index.md | 4 ++-- .../web/manifest/related_applications/index.md | 4 ++-- files/en-us/web/manifest/scope/index.md | 2 +- files/en-us/web/manifest/serviceworker/index.md | 4 ++-- files/en-us/web/manifest/share_target/index.md | 16 ++++++++-------- files/en-us/web/manifest/short_name/index.md | 2 +- files/en-us/web/manifest/shortcuts/index.md | 10 +++++----- files/en-us/web/manifest/start_url/index.md | 2 +- 16 files changed, 32 insertions(+), 32 deletions(-) diff --git a/files/en-us/web/manifest/background_color/index.md b/files/en-us/web/manifest/background_color/index.md index 7a762c67d5d23f4..b15473c986e5f75 100644 --- a/files/en-us/web/manifest/background_color/index.md +++ b/files/en-us/web/manifest/background_color/index.md @@ -19,7 +19,7 @@ Therefore `background_color` should match the {{cssxref("background-color")}} CS ## Syntax ```json -"background_color": "colorValue" +"background_color": "" ``` ## Examples diff --git a/files/en-us/web/manifest/categories/index.md b/files/en-us/web/manifest/categories/index.md index d0424767ecd29e9..ec2d061fecb37a3 100644 --- a/files/en-us/web/manifest/categories/index.md +++ b/files/en-us/web/manifest/categories/index.md @@ -18,7 +18,7 @@ There is no standard list of possible values, but the W3C maintains [a list of k ## Syntax ```json -"categories": ["category1", "category2", "category3"] +"categories": ["", "", ...] ``` ## Examples diff --git a/files/en-us/web/manifest/display_override/index.md b/files/en-us/web/manifest/display_override/index.md index 466116752c0d7ac..b68bd589620aea4 100644 --- a/files/en-us/web/manifest/display_override/index.md +++ b/files/en-us/web/manifest/display_override/index.md @@ -16,7 +16,7 @@ The `display_override` member solves this by letting the developer provide a seq ## Syntax ```json -"display_override": ["modeKeyword1", "modeKeyword2", "modeKeyword3"] +"display_override": ["", "", ...] ``` ### Values diff --git a/files/en-us/web/manifest/file_handlers/index.md b/files/en-us/web/manifest/file_handlers/index.md index e0a2d7116bf7075..d77fd4e0e0eea91 100644 --- a/files/en-us/web/manifest/file_handlers/index.md +++ b/files/en-us/web/manifest/file_handlers/index.md @@ -23,10 +23,10 @@ For example, a PWA can be registered to handle files that match the `text/plain` ```json "file_handlers": [ { - "action": "actionURL", + "action": "", "accept": { - "mimeType1": ["fileExtension1", "fileExtension2"], - "mimeType2": ["fileExtension3", "fileExtension4"] + "": ["", ...], + ... } } ] diff --git a/files/en-us/web/manifest/id/index.md b/files/en-us/web/manifest/id/index.md index 0adad5b93df5f03..7a0e24256060c25 100644 --- a/files/en-us/web/manifest/id/index.md +++ b/files/en-us/web/manifest/id/index.md @@ -19,7 +19,7 @@ If the `id` is unspecified or invalid in any way (such as not a string, not a va ## Syntax ```json -"id": "identifierString" +"id": "" ``` ## Examples diff --git a/files/en-us/web/manifest/launch_handler/index.md b/files/en-us/web/manifest/launch_handler/index.md index 6d11c2173bfe69e..b084c862f955d4c 100644 --- a/files/en-us/web/manifest/launch_handler/index.md +++ b/files/en-us/web/manifest/launch_handler/index.md @@ -15,7 +15,7 @@ The `launch_handler` member defines values that control the launch of a web appl ```json "launch_handler": { - "client_mode": ["contextKeyword1", "contextKeyword2", "contextKeyword3"] + "client_mode": ["", "", ...] } ``` diff --git a/files/en-us/web/manifest/name/index.md b/files/en-us/web/manifest/name/index.md index 0b4ab6f0bd79e68..724e1a329ef2cfc 100644 --- a/files/en-us/web/manifest/name/index.md +++ b/files/en-us/web/manifest/name/index.md @@ -12,7 +12,7 @@ The `name` member is a string that represents the name of the web application as ## Syntax ```json -"name": "appName" +"name": "" ``` ## Examples diff --git a/files/en-us/web/manifest/orientation/index.md b/files/en-us/web/manifest/orientation/index.md index 2c61b42a62e74e2..c83716da4c3dd78 100644 --- a/files/en-us/web/manifest/orientation/index.md +++ b/files/en-us/web/manifest/orientation/index.md @@ -17,7 +17,7 @@ The `orientation` member defines the default orientation for all the website's t ## Syntax ```json -"orientation": "any" | "natural" | "landscape" | "landscape-primary" | "landscape-secondary" | "portrait" | "portrait-primary" | "portrait-secondary" +"orientation": "" ``` ### Values diff --git a/files/en-us/web/manifest/protocol_handlers/index.md b/files/en-us/web/manifest/protocol_handlers/index.md index 0166b3117495a12..2f6518eafe96877 100644 --- a/files/en-us/web/manifest/protocol_handlers/index.md +++ b/files/en-us/web/manifest/protocol_handlers/index.md @@ -18,8 +18,8 @@ After registering a web app as a protocol handler, when a user clicks on a hyper ```json "protocol_handlers": [ { - "protocol": "protocolString", - "url": "urlString" + "protocol": "", + "url": "" } ] ``` diff --git a/files/en-us/web/manifest/related_applications/index.md b/files/en-us/web/manifest/related_applications/index.md index 59a593247fe7e62..d47340cc54027c4 100644 --- a/files/en-us/web/manifest/related_applications/index.md +++ b/files/en-us/web/manifest/related_applications/index.md @@ -20,8 +20,8 @@ The `related_applications` field is an array of objects specifying native applic "related_applications": [ { "platform": "", - "url": "applicationURL", - "id": "applicationId" + "url": "", + "id": "" } ] ``` diff --git a/files/en-us/web/manifest/scope/index.md b/files/en-us/web/manifest/scope/index.md index e358beb74e86812..deeafe80f606539 100644 --- a/files/en-us/web/manifest/scope/index.md +++ b/files/en-us/web/manifest/scope/index.md @@ -16,7 +16,7 @@ If `scope` is unspecified or invalid in any way (such as not a string, not a val ## Syntax ```json -"scope": "urlString" +"scope": "" ``` ## Examples diff --git a/files/en-us/web/manifest/serviceworker/index.md b/files/en-us/web/manifest/serviceworker/index.md index d6262ee142bd812..6e25f20e379175c 100644 --- a/files/en-us/web/manifest/serviceworker/index.md +++ b/files/en-us/web/manifest/serviceworker/index.md @@ -16,8 +16,8 @@ The `serviceworker` member specifies a serviceworker that is Just-In-Time (JIT)- ```json "serviceworker": { - "scope": "scopePath", - "src": "scriptPath", + "scope": "", + "src": "", "use_cache": } ``` diff --git a/files/en-us/web/manifest/share_target/index.md b/files/en-us/web/manifest/share_target/index.md index b4ab4ee9921fcf1..49233d45c8ee9c3 100644 --- a/files/en-us/web/manifest/share_target/index.md +++ b/files/en-us/web/manifest/share_target/index.md @@ -20,17 +20,17 @@ Once registered and installed, a PWA that uses the Web Share Target API acts as ```json "share_target": { - "action": "targetURL", - "enctype": "encodingType", - "method": , + "action": "", + "enctype": "", + "method": "", "params": { - "title": "titleParam", - "text": "textParam", - "url": "urlParam", + "title": "", + "text": "<text>", + "url": "<url>", "files": [ { - "name": "fileName", - "accept": ["mimeType", "fileExtension"] + "name": "<file-name>", + "accept": ["<mime-type>", "<file-extension>"] } ] } diff --git a/files/en-us/web/manifest/short_name/index.md b/files/en-us/web/manifest/short_name/index.md index 88072e37bf9913c..cfb4b12a81e36d1 100644 --- a/files/en-us/web/manifest/short_name/index.md +++ b/files/en-us/web/manifest/short_name/index.md @@ -12,7 +12,7 @@ The `short_name` member is a string that represents the name of the web applicat ## Syntax ```json -"name": "shortAppName" +"name": "<short-app-name>" ``` ## Examples diff --git a/files/en-us/web/manifest/shortcuts/index.md b/files/en-us/web/manifest/shortcuts/index.md index 0b63f39678c9d7c..f7db78c9914b6f8 100644 --- a/files/en-us/web/manifest/shortcuts/index.md +++ b/files/en-us/web/manifest/shortcuts/index.md @@ -14,13 +14,13 @@ The `shortcuts` member defines an array of shortcuts or links to key tasks or pa ```json "shortcuts": [ { - "name": "displayName", - "short_name": "shortName", - "description": "shortcutDescription", - "url": "shortcutURL", + "name": "<app-name>", + "short_name": "<short-app-name>", + "description": "<description>", + "url": "<url>", "icons": [ { - "src": "iconURL", + "src": "<icon-url>", "sizes": "<size-values>", "type": "<mime-type>", "purpose": "<purpose-keyword>" diff --git a/files/en-us/web/manifest/start_url/index.md b/files/en-us/web/manifest/start_url/index.md index 77f3530eef42495..7dec9651ed4aa20 100644 --- a/files/en-us/web/manifest/start_url/index.md +++ b/files/en-us/web/manifest/start_url/index.md @@ -17,7 +17,7 @@ A valid `start_url` needs to be same-origin with the document that references th ## Syntax ```json -"start_url": "startURL" +"start_url": "<url>" ``` ## Examples From e61783e1790b842c3b5a906840915197a517b917 Mon Sep 17 00:00:00 2001 From: Dipika Bhattacharya <dipika@foss-community.org> Date: Wed, 4 Sep 2024 11:30:31 -0400 Subject: [PATCH 5/7] update placeholder values --- files/en-us/web/manifest/categories/index.md | 2 +- files/en-us/web/manifest/display_override/index.md | 2 +- files/en-us/web/manifest/file_handlers/index.md | 4 ++-- files/en-us/web/manifest/launch_handler/index.md | 2 +- files/en-us/web/manifest/prefer_related_applications/index.md | 2 +- files/en-us/web/manifest/serviceworker/index.md | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/files/en-us/web/manifest/categories/index.md b/files/en-us/web/manifest/categories/index.md index ec2d061fecb37a3..81ec1b361cf763c 100644 --- a/files/en-us/web/manifest/categories/index.md +++ b/files/en-us/web/manifest/categories/index.md @@ -18,7 +18,7 @@ There is no standard list of possible values, but the W3C maintains [a list of k ## Syntax ```json -"categories": ["<category-name>", "<category-name>", ...] +"categories": ["<category-name>", "<category-name>"] ``` ## Examples diff --git a/files/en-us/web/manifest/display_override/index.md b/files/en-us/web/manifest/display_override/index.md index b68bd589620aea4..b9c0148e4c76662 100644 --- a/files/en-us/web/manifest/display_override/index.md +++ b/files/en-us/web/manifest/display_override/index.md @@ -16,7 +16,7 @@ The `display_override` member solves this by letting the developer provide a seq ## Syntax ```json -"display_override": ["<display-keyword>", "<display-keyword>", ...] +"display_override": ["<display-keyword>", "<display-keyword>"] ``` ### Values diff --git a/files/en-us/web/manifest/file_handlers/index.md b/files/en-us/web/manifest/file_handlers/index.md index d77fd4e0e0eea91..a3d07b0253fc1f3 100644 --- a/files/en-us/web/manifest/file_handlers/index.md +++ b/files/en-us/web/manifest/file_handlers/index.md @@ -25,8 +25,8 @@ For example, a PWA can be registered to handle files that match the `text/plain` { "action": "<action-url>", "accept": { - "<mime-type>": ["<file-Extension>", ...], - ... + "<mime-type>": ["<file-Extension>", "<file-Extension>"], + "<mime-type>": ["<file-Extension>"] } } ] diff --git a/files/en-us/web/manifest/launch_handler/index.md b/files/en-us/web/manifest/launch_handler/index.md index b084c862f955d4c..ac80aa6c61406fc 100644 --- a/files/en-us/web/manifest/launch_handler/index.md +++ b/files/en-us/web/manifest/launch_handler/index.md @@ -15,7 +15,7 @@ The `launch_handler` member defines values that control the launch of a web appl ```json "launch_handler": { - "client_mode": ["<context-keyword>", "<context-keyword>", ...] + "client_mode": ["<context-keyword>", "<context-keyword>"] } ``` 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 d9532b45d8f1d18..eb846d772ea1881 100644 --- a/files/en-us/web/manifest/prefer_related_applications/index.md +++ b/files/en-us/web/manifest/prefer_related_applications/index.md @@ -16,7 +16,7 @@ If omitted, `prefer_related_applications` defaults to `false`. ## Syntax ```json -"prefer_related_applications": <preference-boolean> +"prefer_related_applications": true ``` ## Examples diff --git a/files/en-us/web/manifest/serviceworker/index.md b/files/en-us/web/manifest/serviceworker/index.md index 6e25f20e379175c..993c634d897dcfa 100644 --- a/files/en-us/web/manifest/serviceworker/index.md +++ b/files/en-us/web/manifest/serviceworker/index.md @@ -18,7 +18,7 @@ The `serviceworker` member specifies a serviceworker that is Just-In-Time (JIT)- "serviceworker": { "scope": "<scope-path>", "src": "<script-path>", - "use_cache": <cache-boolean> + "use_cache": true } ``` From 4efa5f0920c1718224220970164968cfa1732d57 Mon Sep 17 00:00:00 2001 From: Dipika Bhattacharya <dipika@foss-community.org> Date: Tue, 17 Sep 2024 14:12:21 -0400 Subject: [PATCH 6/7] remove syntax blocks --- .../web/manifest/background_color/index.md | 6 ------ files/en-us/web/manifest/categories/index.md | 6 ------ files/en-us/web/manifest/description/index.md | 9 -------- .../web/manifest/display_override/index.md | 6 ------ .../en-us/web/manifest/file_handlers/index.md | 14 ------------- files/en-us/web/manifest/id/index.md | 6 ------ .../web/manifest/launch_handler/index.md | 8 ------- files/en-us/web/manifest/name/index.md | 6 ------ files/en-us/web/manifest/orientation/index.md | 6 ------ .../web/manifest/protocol_handlers/index.md | 11 ---------- files/en-us/web/manifest/scope/index.md | 6 ------ files/en-us/web/manifest/screenshots/index.md | 15 ------------- .../en-us/web/manifest/serviceworker/index.md | 10 --------- .../en-us/web/manifest/share_target/index.md | 21 ------------------- files/en-us/web/manifest/shortcuts/index.md | 21 ------------------- 15 files changed, 151 deletions(-) diff --git a/files/en-us/web/manifest/background_color/index.md b/files/en-us/web/manifest/background_color/index.md index b15473c986e5f75..573ba05871541b5 100644 --- a/files/en-us/web/manifest/background_color/index.md +++ b/files/en-us/web/manifest/background_color/index.md @@ -16,12 +16,6 @@ Therefore `background_color` should match the {{cssxref("background-color")}} CS > [!NOTE] > The `background_color` member is only meant to improve the user experience while the main stylesheet is loading from the network or the storage media; it is not used by the user agent as the {{cssxref("background-color")}} CSS property when the progressive web app stylesheet is available. -## Syntax - -```json -"background_color": "<color-value>" -``` - ## Examples ```json diff --git a/files/en-us/web/manifest/categories/index.md b/files/en-us/web/manifest/categories/index.md index 81ec1b361cf763c..c9bdcf45ab635ae 100644 --- a/files/en-us/web/manifest/categories/index.md +++ b/files/en-us/web/manifest/categories/index.md @@ -15,12 +15,6 @@ There is no standard list of possible values, but the W3C maintains [a list of k > **Note:** `categories` values are lower-cased by the stores and catalogs before processing, so "News" and "news" are treated as the same value. Developers are encouraged to use lower case in the first place. -## Syntax - -```json -"categories": ["<category-name>", "<category-name>"] -``` - ## Examples ```json diff --git a/files/en-us/web/manifest/description/index.md b/files/en-us/web/manifest/description/index.md index 59146e16545a9ab..d8e6923754827fe 100644 --- a/files/en-us/web/manifest/description/index.md +++ b/files/en-us/web/manifest/description/index.md @@ -7,15 +7,6 @@ browser-compat: html.manifest.description {{QuickLinksWithSubpages("/en-US/docs/Web/Manifest")}} -<table class="properties"> - <tbody> - <tr> - <th scope="row">Type</th> - <td><code>String</code></td> - </tr> - </tbody> -</table> - The `description` member is a string in which developers can explain what the application does. `description` 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/display_override/index.md b/files/en-us/web/manifest/display_override/index.md index b9c0148e4c76662..d35e776dfe823c2 100644 --- a/files/en-us/web/manifest/display_override/index.md +++ b/files/en-us/web/manifest/display_override/index.md @@ -13,12 +13,6 @@ The [`display`](/en-US/docs/Web/Manifest/display) member is used to determine th The `display_override` member solves this by letting the developer provide a sequence of display modes that the browser will consider before using the `display` member. Its value is an array of display modes that are considered in-order, and the first supported display mode is applied. -## Syntax - -```json -"display_override": ["<display-keyword>", "<display-keyword>"] -``` - ### Values Display override objects are display-mode strings, the possible values are: diff --git a/files/en-us/web/manifest/file_handlers/index.md b/files/en-us/web/manifest/file_handlers/index.md index a3d07b0253fc1f3..e876d3fe49b4419 100644 --- a/files/en-us/web/manifest/file_handlers/index.md +++ b/files/en-us/web/manifest/file_handlers/index.md @@ -18,20 +18,6 @@ For example, a PWA can be registered to handle files that match the `text/plain` > [!NOTE] > While the `file_handlers` member is used to register a PWA with a given set of file types, this only results in the operating system launching the PWA when a matching file is opened. The PWA then needs to actually handle the file using JavaScript code. See [Handling the files](#handling_the_files) for more information. -## Syntax - -```json -"file_handlers": [ - { - "action": "<action-url>", - "accept": { - "<mime-type>": ["<file-Extension>", "<file-Extension>"], - "<mime-type>": ["<file-Extension>"] - } - } -] -``` - ### Values An array of objects. Each object in the array must contain the following values (`action` and `accept` are required): diff --git a/files/en-us/web/manifest/id/index.md b/files/en-us/web/manifest/id/index.md index 7a0e24256060c25..4acee02da8fc468 100644 --- a/files/en-us/web/manifest/id/index.md +++ b/files/en-us/web/manifest/id/index.md @@ -16,12 +16,6 @@ If the `id` is unspecified or invalid in any way (such as not a string, not a va > [!NOTE] > The `id` member can be used to uniquely identify applications. The `id` member is processed like a `start_url` but can be out of [scope](/en-US/docs/Web/Manifest/scope) because it does not point to a resource that can be navigated to. -## Syntax - -```json -"id": "<app-identifier>" -``` - ## Examples ```json diff --git a/files/en-us/web/manifest/launch_handler/index.md b/files/en-us/web/manifest/launch_handler/index.md index ac80aa6c61406fc..be85551a2c63433 100644 --- a/files/en-us/web/manifest/launch_handler/index.md +++ b/files/en-us/web/manifest/launch_handler/index.md @@ -11,14 +11,6 @@ browser-compat: html.manifest.launch_handler The `launch_handler` member defines values that control the launch of a web application. Currently it can only contain a single value, `client_mode`, which specifies the context in which the app should be loaded when launched. For example, in an existing web app client containing an instance of the app, or in a new web app client. This leaves scope for more `launch_handler` values to be defined in the future. -## Syntax - -```json -"launch_handler": { - "client_mode": ["<context-keyword>", "<context-keyword>"] -} -``` - ### Values `launch_handler` objects may contain the following values: diff --git a/files/en-us/web/manifest/name/index.md b/files/en-us/web/manifest/name/index.md index 724e1a329ef2cfc..57b74ad765c9a89 100644 --- a/files/en-us/web/manifest/name/index.md +++ b/files/en-us/web/manifest/name/index.md @@ -9,12 +9,6 @@ browser-compat: html.manifest.name 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. -## Syntax - -```json -"name": "<app-name>" -``` - ## Examples Simple `name` in left-to-right language: diff --git a/files/en-us/web/manifest/orientation/index.md b/files/en-us/web/manifest/orientation/index.md index c83716da4c3dd78..9c1b47059bad85a 100644 --- a/files/en-us/web/manifest/orientation/index.md +++ b/files/en-us/web/manifest/orientation/index.md @@ -14,12 +14,6 @@ The `orientation` member defines the default orientation for all the website's t > [!NOTE] > The orientation can be changed at runtime via the [Screen Orientation API](/en-US/docs/Web/API/Screen_Orientation_API). -## Syntax - -```json -"orientation": "<orientation-keyword>" -``` - ### Values `orientation` can take one of the following values: diff --git a/files/en-us/web/manifest/protocol_handlers/index.md b/files/en-us/web/manifest/protocol_handlers/index.md index 2f6518eafe96877..5eb32650ed84fa8 100644 --- a/files/en-us/web/manifest/protocol_handlers/index.md +++ b/files/en-us/web/manifest/protocol_handlers/index.md @@ -13,17 +13,6 @@ The `protocol_handlers` member specifies an array of objects that are protocols After registering a web app as a protocol handler, when a user clicks on a hyperlink with a specific scheme such as `mailto://` or `web+music://` from a browser or native app, the registered PWA would open and receive the URL. -## Syntax - -```json -"protocol_handlers": [ - { - "protocol": "<protocol>", - "url": "<url>" - } - ] -``` - ### Values Protocol handlers objects may contain the following values: diff --git a/files/en-us/web/manifest/scope/index.md b/files/en-us/web/manifest/scope/index.md index deeafe80f606539..2931d52960d59dc 100644 --- a/files/en-us/web/manifest/scope/index.md +++ b/files/en-us/web/manifest/scope/index.md @@ -13,12 +13,6 @@ A valid `scope` needs to allow [`start_url`](/en-US/docs/Web/Manifest/start_url) If `scope` is unspecified or invalid in any way (such as not a string, not a valid URL, or causes `start_url` to be out of scope), the `start_url` is used, with its last path segment removed. -## Syntax - -```json -"scope": "<scope-url>" -``` - ## Examples If the scope is relative, the manifest URL is used as a base URL: diff --git a/files/en-us/web/manifest/screenshots/index.md b/files/en-us/web/manifest/screenshots/index.md index e0df6860f014928..d286812104f342b 100644 --- a/files/en-us/web/manifest/screenshots/index.md +++ b/files/en-us/web/manifest/screenshots/index.md @@ -11,21 +11,6 @@ browser-compat: html.manifest.screenshots The `screenshots` member defines an array of screenshots intended to showcase the application. These images are intended to be used by progressive web app stores. -## Syntax - -```json -"screenshots": [ - { - "form_factor": "<device-keyword>", - "label": "<accessible-name>", - "platform": "<platform-keyword>", - "sizes": "<size-values>", - "src": "<image-url>", - "type": "<mime-type>" - } -] -``` - ### Values The `screenshots` member is an array of objects each representing a screenshot. Each screenshot object may contain the following properties: diff --git a/files/en-us/web/manifest/serviceworker/index.md b/files/en-us/web/manifest/serviceworker/index.md index 993c634d897dcfa..cc14e5dbe19b16c 100644 --- a/files/en-us/web/manifest/serviceworker/index.md +++ b/files/en-us/web/manifest/serviceworker/index.md @@ -12,16 +12,6 @@ browser-compat: html.manifest.serviceworker The `serviceworker` member specifies a serviceworker that is Just-In-Time (JIT)-installed and registered to run a web-based payment app providing a payment mechanism for a specified payment method in a merchant website. See {{domxref("Payment Handler API", "Payment Handler API", "", "nocode")}} for more details. -## Syntax - -```json -"serviceworker": { - "scope": "<scope-path>", - "src": "<script-path>", - "use_cache": true -} -``` - ### Values `serviceworker` objects may contain the following values: diff --git a/files/en-us/web/manifest/share_target/index.md b/files/en-us/web/manifest/share_target/index.md index 49233d45c8ee9c3..500e64ab6608250 100644 --- a/files/en-us/web/manifest/share_target/index.md +++ b/files/en-us/web/manifest/share_target/index.md @@ -16,27 +16,6 @@ Once registered and installed, a PWA that uses the Web Share Target API acts as > [!NOTE] > If you want to share data using the Web Share API, see [Web Share API](/en-US/docs/Web/API/Web_Share_API) and [`navigator.share()`](/en-US/docs/Web/API/Navigator/share). -## Syntax - -```json -"share_target": { - "action": "<target-url>", - "enctype": "<encoding-type>", - "method": "<http-method-keyword>", - "params": { - "title": "<title>", - "text": "<text>", - "url": "<url>", - "files": [ - { - "name": "<file-name>", - "accept": ["<mime-type>", "<file-extension>"] - } - ] - } -} -``` - ### Values The value of the `share_target` member is an object that defines how an application can receive shared data. This object may contain the following properties (`action` and `params` are required): diff --git a/files/en-us/web/manifest/shortcuts/index.md b/files/en-us/web/manifest/shortcuts/index.md index f7db78c9914b6f8..213336b9f0a0aaa 100644 --- a/files/en-us/web/manifest/shortcuts/index.md +++ b/files/en-us/web/manifest/shortcuts/index.md @@ -9,27 +9,6 @@ browser-compat: html.manifest.shortcuts The `shortcuts` member defines an array of shortcuts or links to key tasks or pages within a web app. A user agent can use these values to assemble a context menu to be displayed by the operating system when a user engages with the web app's icon. When user invokes a shortcut, the user agent will navigate to the address given by shortcut's `url` member. -## Syntax - -```json -"shortcuts": [ - { - "name": "<app-name>", - "short_name": "<short-app-name>", - "description": "<description>", - "url": "<url>", - "icons": [ - { - "src": "<icon-url>", - "sizes": "<size-values>", - "type": "<mime-type>", - "purpose": "<purpose-keyword>" - } - ] - } -] -``` - ### Values Shortcut objects may contain the following values (only `name` and `url` are required): From 2b6d13bcda07885b8027d014eb2ec79b7b63d97f Mon Sep 17 00:00:00 2001 From: Dipika Bhattacharya <dipika@foss-community.org> Date: Tue, 17 Sep 2024 14:20:03 -0400 Subject: [PATCH 7/7] revert changes to files in other PRs --- files/en-us/web/manifest/name/index.md | 9 ++++ .../prefer_related_applications/index.md | 15 ++++--- .../manifest/related_applications/index.md | 42 +++++++++---------- files/en-us/web/manifest/short_name/index.md | 15 ++++--- files/en-us/web/manifest/start_url/index.md | 15 ++++--- 5 files changed, 55 insertions(+), 41 deletions(-) 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")}} +<table class="properties"> + <tbody> + <tr> + <th scope="row">Type</th> + <td><code>String</code></td> + </tr> + </tbody> +</table> + 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}} +<table class="properties"> + <tbody> + <tr> + <th scope="row">Type</th> + <td><code>Boolean</code></td> + </tr> + </tbody> +</table> + 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}} +<table class="properties"> + <tbody> + <tr> + <th scope="row">Type</th> + <td><code>Array</code></td> + </tr> + </tbody> +</table> + 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": "<platform-keyword>", - "url": "<app-url>", - "id": "<app-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 +<table class="properties"> + <tbody> + <tr> + <th scope="row">Type</th> + <td><code>String</code></td> + </tr> + </tbody> +</table> -```json -"name": "<short-app-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")}} +<table class="properties"> + <tbody> + <tr> + <th scope="row">Type</th> + <td><code>String</code></td> + </tr> + </tbody> +</table> + 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": "<url>" -``` - ## Examples ### Absolute URL