From 2dcc42c8e774e94e94585b2d1d867d664e282284 Mon Sep 17 00:00:00 2001
From: Kenneth Rohde Christiansen
short_name
).
The application's name is derived from either the
- name
member or short_name
- member (if either is present) - otherwise, it is generated by the
+ name
member or short_name
+ member (if either is present) - otherwise, it is generated by the
user agent or provided by the end-user.
When either member is missing from the manifest, a user agent MAY use
- the name
member as a fallback for the
- short_name
member or vice versa.
+ the name
member as a fallback for the
+ short_name
member or vice versa.
- If the name
and short_name
members are
+ If the name
and short_name
members are
undefined, the user agent SHOULD assign a default name (e.g.,
"Untitled"). Alternatively, a user agent MAY allow the end-user to
input some text that can serve as the application's name.
- When both the name
and
- short_name
members
+ When both the name
and
+ short_name
members
are present, it is left up to implementations to decide which member
is best suited for the space available (e.g., the
- short_name
member might be better suited for the
+ short_name
member might be better suited for the
space available underneath an icon).
SecurityError
.
-
- A developer specifies the navigation scope via the scope
member. In the case where the
- scope
member is missing or
+
+ A developer specifies the navigation scope via the scope
+ member. In the case where the scope
member is missing or
in error, the navigation scope is treated as unbounded
(represented as the value undefined
). In such a case, the
manifest is applied to all URLs the application context is
@@ -837,7 +835,7 @@
- The display modes values and their corresponding fallback - display modes are as follows: + The display modes values defined by DisplayModeType, + and their corresponding fallback display modes are as follows:
standalone
.
minimal-ui
.
browser
.
'display-mode'
media feature
Please note that the start URL is not necessarily the value
- of the start_url
member: the user or user agent
+ of the start_url
member: the user or user agent
could have changed it when the application was added to home-screen
or otherwise bookmarked.
A manifest is a JSON document that contains startup parameters and application defaults for when a web application is - launched. A manifest consists of a top-level object that - contains zero or more members. Each of the members are defined below, - as well as how their values are processed. + launched. A manifest consists of a top-level WebAppManifest + object that contains zero or more members. + Each of the members are defined below, as well as how their values are processed.
++ [NoInterfaceObject] + dictionary WebAppManifest { + TextDirectionType? dir; + USVString? lang; + USVString? name; + USVString? short_name; + USVString? description; + sequence<ImageResource>? icons; + sequence<ImageResource>? screenshots; + sequence<CategoryType>? categories; + USVString? iarc_rating_id; + USVString? start_url; + DisplayModeType? display; + OrientationLockType? orientation; + USVString? theme_color; + USVString? background_color; + USVString? scope; + ServiceWorkerRegistration? serviceworker; + sequence<ExternalApplicationResource>? related_applications; + boolean? prefer_related_applications; + }; +
Every manifest has an associated manifest URL, which is the [[!URL]] from which the manifest was fetched. @@ -1612,45 +1633,49 @@
dir
member
- The dir
member specifies the base
+ The dir
member specifies the base
direction for the directionality-capable members of the
manifest. The dir
member's value can be set to
one of the text-direction values.
+ [NoInterfaceObject] + enum TextDirectionType { "ltr", "rtl", "auto" }; +
The directionality-capable members are:
description
member.
+ description
member.
name
member.
+ name
member.
short_name
member.
+ short_name
member.
- The text-direction values - are the following, implying that the value of the + The text-direction values defined by + TextDirectionType, are the following, implying that the value of the directionality-capable members is by default:
-lang
member
- The lang
member is a
+ The lang
member is a
language tag (string) that specifies the primary language for
the values of the manifest's directionality-capable members
(as knowing the language can also help with directionality).
@@ -1794,7 +1819,7 @@
name
member
- The name
member is a
+ 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).
@@ -1828,7 +1853,7 @@
short_name
member
- The short_name
member
+ The short_name
member
is a string that represents a short version of the name of the
web application. It is intended to be used where there is
insufficient space to display the full name of the web application.
@@ -1862,8 +1887,8 @@
description
member
- The description
- member allows the developer to describe the purpose of the web
+ The description
+ member allows the developer to describe the purpose of the web
application.
@@ -1896,7 +1921,7 @@
- The scope
member is a
+ The scope
member is a
string that represents the navigation scope of this web application's
application context.
icons
member
- The icons
member is an
- array of image objects that can serve as iconic
+ The icons
member is an
+ array of ImageResources that can serve as iconic
representations of the web application in various contexts. For
example, they can be used to represent the web application amongst a
list of other applications, or to integrate the web application with
@@ -1982,7 +2007,7 @@
The icons
member is processed using the steps for
- processing an array of images.
+ processing an array of image resources.
If there are multiple equally appropriate icons in icons, @@ -1991,8 +2016,8 @@
@@ -2042,9 +2067,18 @@
display
member
+ [NoInterfaceObject] + enum DisplayModeType { + "fullscreen", + "standalone", + "minimal-ui", + "browser" + }; +
- The display
member is a
- string, whose value is one of display modes values. The
+ The display
member is a DisplayModeType,
+ whose value is one of display modes values. The
item represents the developer's preferred display mode for the
web application. When the member is missing or erroneous, the user
agent MUST use the fallback display mode.
@@ -2090,8 +2124,8 @@
orientation
member
- The orientation
- member is a string that serves as the default
+ The orientation
+ member is a string that serves as the default
orientation for all top-level browsing contexts of the web
application. The possible values are those of the
OrientationLockType
enum defined in
@@ -2172,14 +2206,14 @@
start_url
member
- The start_url
member is a string that
+ The start_url
member is a string that
represents the start URL , which is URL that the
developer would prefer the user agent load when the user launches the
web application (e.g., when the user clicks on the icon of the web
application from a device's application menu or homescreen).
- The start_url
member is purely advisory, and a
+ The start_url
member is purely advisory, and a
user agent MAY ignore it or provide the end-user the choice
not to make use of it. A user agent MAY also allow the end-user to
modify the URL when, for instance, a bookmark for the web application
@@ -2275,11 +2309,11 @@
serviceworker
member
- The serviceworker
member describes a service
+ The serviceworker
member describes a service
worker as defined in [[!SERVICE-WORKERS-1]].
- The
- The serviceworker
member represents an intented
+ The serviceworker
member represents an intented
service worker registration in form of a registration
@@ -2374,8 +2408,8 @@
theme_color
member
theme_color
- member serves as the default theme color for an
+ The theme_color
+ member serves as the default theme color for an
application context. What constitutes a theme color is
defined in [[!HTML]].
manifest.
- The related_applications
member lists
+ The related_applications
member lists
related applications and serves as an indication of such a
relationship between web application and related applications.
This relationship is unidirectional and unless a listed application
@@ -2457,7 +2491,7 @@
related_applications
member are given by the following algorithm. The algorithm
takes a manifest as an argument. This algorithm returns a list of
- application objects applications, which can be empty.
+ ExternalApplicationResources applications, which can be empty.
- The prefer_related_applications
member is a
+ The prefer_related_applications
member is a
boolean value that is used as a hint for the user agent to say that
related applications should be preferred over the web
application. The user agent MUST consider the missing value as
@@ -2568,8 +2602,8 @@
background_color
member
- The background_color
- member describes the expected background color of the web
+ The background_color
+ member describes the expected background color of the web
application. It repeats what is already available in the application
stylesheet but can be used by the user agent to draw the
background color of a web application for which the manifest is known
@@ -2627,7 +2661,7 @@
categories
member
- The categories
member
+ The categories
member
describes the expected application categories to which the web
application belongs.
- This specification does not define the particular values for a the
- categories
member. However, the working group
+ This specification does not define the particular CategoryTypes
+ for a the categories
member. However, the working group
maintains a list of known
- category values in our wiki.
+ values in our wiki.
screenshots
member
- The screenshots
- member is an array of image objects represent the
+ The screenshots
+ member is an array of ImageResources, representing the
web application in common usage scenarios.
iarc_rating_id
member
- The iarc_rating_id
- member is a string that represents an ID value of the
+ The iarc_rating_id
+ member is a string that represents an ID value of the
IARC rating of the web application. It is intended to be used to
determine which ages the web application is appropriate for.
+ [NoInterfaceObject] + dictionary ImageResource { + USVString src; + DOMString sizes; + USVString type; + USVString purpose; + USVString platform; + }; +
- Each image object + Each ImageResource represents an image that is used as part of a web application, suitable to use in various contexts depending on the semantics of the member that is using the object (e.g., an icon that is part of an application - menu, etc.). For an image object, this specification provides + menu, etc.). For an image resource, this specification provides developers with a means of specifying the dimensions, and media type of an image (i.e., a "responsive image" solution [[RESPIMG-USECASES]]). A user agent can use these values to select an image that is best suited @@ -2785,23 +2829,24 @@
- User agents may modify an image object to better match the - platform’s visual style before displaying it to the user, for example - by rounding the corners or painting it in a specific color. It is - recommended that developers prepare their image objects for such + User agents may modify the images associated with an ImageResource + to better match the platform’s visual style before displaying it to the + user, for example by rounding the corners or painting it in a specific color. + It is recommended that developers prepare their image resources for such scenarios to avoid losing important information through, e.g., change of color or clipped corners.
- To fetch an image object, the user agent MUST run the
- steps to fetch an image object. The algorithm takes an
- image object, the manifest URL, and the
- document (Document
) from which the manifest
- was linked. It returns a Response:
+ To fetch the image associated with an ImageResource,
+ the user agent MUST run the steps to fetch an image resource.
+
+ The algorithm takes an image URL (ImageResource.src),
+ the manifest URL, and the document (Document
)
+ from which the manifest was linked. It returns a Response:
manifest
".
@@ -2835,7 +2880,7 @@ The security policy that governs whether a user agent can @@ -2881,28 +2926,27 @@
purpose
member
- The purpose member
is an unordered set of
+ The purpose
member is an unordered set of
unique space-separated tokens that are ASCII
case-insensitive. The allowed values are the icon
purposes.
- When an image object is used as an icon, a + When an ImageResource is used as an icon, a developer can hint that the image is intended to serve some special - purpose in the context of the host OS (i.e., for better - integration). + purpose in the context of the host OS (i.e., for better integration).
For example, as a badge or "pinned"
icon that is visually distinct, in color or form, from an
application's launch icon. The user agent uses the value of the
- purpose
member as a hint to determine where and
- how an image object is displayed. Unless declared otherwise by
+ purpose
member as a hint to determine where and
+ how an ImageResource is displayed. Unless declared otherwise by
the developer, a user agent can use an icon for any purpose.
@@ -2926,7 +2970,7 @@
The steps for processing a purpose
member of an
image are given by the following algorithm. The algorithm takes
- an image object image. This algorithm will return a
+ an ImageResource image. This algorithm will return a
set.
sizes
member
- The sizes
member of an image object is a
- string consisting of an unordered set of unique
+ The sizes
member of an ImageResource
+ is a string consisting of an unordered set of unique
space-separated tokens which are ASCII case-insensitive
that represents the dimensions of an image. Each keyword is either an
ASCII case-insensitive match for the string "
ZERO (0) character and that are separated by a single U+0078 LATIN
SMALL LETTER X or U+0058 LATIN CAPITAL LETTER X character. The
keywords represent icon sizes in raw pixels (as opposed to CSS
- pixels). When multiple image objects are available, a user
+ pixels). When multiple ImageResources are available, a user
agent MAY use the value to decide which icon is most suitable for a
display context (and ignore any that are inappropriate).
The steps for processing a sizes
member of an
image are given by the following algorithm. The algorithm takes
- an image object image. This algorithm will return a
+ an ImageResource image. This algorithm will return a
set.
src
member
- The src
member of an
- image object is a URL from which a user agent can fetch
+ The src
member of an
+ ImageResource is a URL from which a user agent can fetch
the image's data.
The steps for processing the src
member of an
image are given by the following algorithm. The algorithm takes
- a image object icon, and a URL manifest
+ a ImageResource icon, and a URL manifest
URL , which is the URL from which the
manifest was fetched. This algorithm will return a
URL or undefined
.
@@ -3094,18 +3138,18 @@
type
member
- The type
member of an image object is
+ The type
member of an ImageResource is
a hint as to the media type of the image. The purpose of this member
is to allow a user agent to ignore images of media types it does not
support.
- There is no default MIME type for image objects. However, for the + There is no default MIME type for image resources. However, for the purposes of determining the type of the resource, user agents must expect the resource to be an image.
@@ -3144,19 +3188,19 @@- The steps for processing an array of images are given by + The steps for processing an array of image resources are given by the following algorithm. The algorithm takes a manifest, a URL manifest URL, which is the URL from which the manifest was fetched, and a string that represents the member name of the member which contains the array of - image objects. This algorithm returns a list of image - objects, which can be empty. + ImageResources. This algorithm returns a sequence of ImageResources, + which can be empty.
false
.
+ HasOwnProperty(item, "src") returns false
.
platform
member
- The platform
- member represents the platform to which a containing
- object applies.
+ The platform
member represents the
+ platform to which a containing object applies.
The following object types can make use of this member:
- A platform represents a software distribution ecosystem or + A platform represents a software distribution ecosystem or possibly an operating system.
This specification does not define the particular values for a the
- platform
member. However, the working group
+ platform
member. However, the working group
maintains a list of known
platform values in our wiki.
@@ -3268,7 +3311,7 @@
The steps for processing the platform
member of an
application are given by the following algorithm. The algorithm
- takes an application object application. This
+ takes an ExternalApplicationResource application. This
algorithm will return a string or undefined
.
- A serviceworker object represents a service worker + A ServiceWorkerRegistration object represents a service worker registration for the web application.
-+ [NoInterfaceObject] + dictionary ServiceWorkerRegistration { + USVString src; + USVString scope; + USVString type; + boolean use_cache; + }; ++
src
member
- The service worker src
- member of a serviceworker object is a URL
- representing a service worker.
+ The src
member of a ServiceWorkerRegistration
+ object is a URL representing a service worker.
The steps for processing the src
member of a
service worker are given by the following algorithm. The
- algorithm takes a serviceworker object
+ algorithm takes a ServiceWorkerRegistration
registration, and a URL manifest URL,
which is the URL from which the manifest was
fetched. This algorithm will return a URL or
@@ -3340,19 +3391,18 @@
scope
member
- The service worker
- scope
member of a serviceworker object is
- the service worker's associated scope URL.
+ The scope
member of a ServiceWorkerRegistration
+ object is the service worker's associated scope URL.
The steps for processing the scope
member of a
service worker are given by the following algorithm. The
- algorithm takes a serviceworker object
+ algorithm takes a ServiceWorkerRegistration
registration, and a URL manifest URL,
which is the URL from which the manifest was
fetched. This algorithm will return a URL or
@@ -3383,20 +3433,20 @@
type
member
- The service worker type
member of a
- serviceworker object is the service worker's type
member of a
+ ServiceWorkerRegistration object is the service worker's worker
type.
The steps for processing the type
member of a
service worker are given by the following algorithm. The
- algorithm takes a serviceworker object
+ algorithm takes a ServiceWorkerRegistration
registration, and a URL manifest URL,
which is the URL from which the manifest was
fetched. This algorithm will return a string.
@@ -3430,20 +3480,20 @@
use_cache
member
- The service worker use_cache
member of a
- serviceworker object determines whether the user agent
+ The use_cache
member of a
+ ServiceWorkerRegistration object determines whether the user agent
cache
should be used when fetching the service worker.
The steps for processing the use_cache
member of a
service worker are given by the following algorithm. The
- algorithm takes a serviceworker object
+ algorithm takes a serviceworkerregistration
registration, and a URL manifest URL,
which is the URL from which the manifest was
fetched. This algorithm will return a boolean.
@@ -3472,11 +3522,21 @@
+ [NoInterfaceObject] + dictionary ExternalApplicationResource { + USVString platform; + USVString url; + USVString id; + USVString min_version; + USVString fingerprints; + }; +
- Each application object represents an application related to - the web application. An application object has the following + Each ExternalApplicationResources represents an application related to + the web application. An application resource has the following properties:
- A valid application object MUST have platform
and
- either an url
or an id
(or both).
+ A valid ExternalApplicationResource object MUST have
+ platform
and either an url
or an
+ id
(or both).
@@ -3553,19 +3614,19 @@
Where should the platform
expected value be listed?
url
member
- The url member of an application
+ The url
member of an ExternalApplicationResource
object represents the URL at which the application can be
found.
The steps for processing the url
member of an
application are given by the following algorithm. The algorithm
- takes an application object application. This
+ takes an ExternalApplicationResource application. This
algorithm will return an URL or undefined
.
id
member
- The id member of an application
+ The id
member of an ExternalApplicationResource
object represents the id which is used to represent the application
on the platform.
The steps for processing the id
member of an
application are given by the following algorithm. The algorithm
- takes an application object application. This
+ takes an ExternalApplicationResource application. This
algorithm will return a string or undefined
.
min_version
member
- The min_version member
- of an application object represents the minimum version of the
- application that is considered related to this web app. This version
- is a string with platform-specific syntax and semantics.
+ The min_version
member of an
+ ExternalApplicationResource object represents the minimum
+ version of the application that is considered related to this web app.
+ This version is a string with platform-specific syntax and semantics.
The steps for processing the min_version
member of
an application are given by the following algorithm. The
- algorithm takes an application object application.
+ algorithm takes an ExternalApplicationResource application.
This algorithm will return a string or undefined
.
fingerprints
member
- The fingerprints member
- of an application object represents a set of cryptographic
- fingerprints used for verifying the application. It is given as an
- array of fingerprint objects.
+ The fingerprints
member
+ of an ExternalApplicationResource object represents a set
+ of cryptographic fingerprints used for verifying the application.
+ It is given as an array of fingerprint objects.
A fingerprint object has two properties: type
@@ -3675,7 +3736,7 @@
The steps for processing the fingerprints
member of
an application are given by the following algorithm. The
- algorithm takes an application object application.
+ algorithm takes an ExternalApplicationResource application.
This algorithm will return a list of fingerprint objects, possibly empty.
short_name
).
The application's name is derived from either the
- name
member or short_name
+ name member or short_name
member (if either is present) - otherwise, it is generated by the
user agent or provided by the end-user.
When either member is missing from the manifest, a user agent MAY use
- the name
member as a fallback for the
- short_name
member or vice versa.
+ the name member as a fallback for the
+ short_name member or vice versa.
- If the name
and short_name
members are
+ If the name and short_name members are
undefined, the user agent SHOULD assign a default name (e.g.,
"Untitled"). Alternatively, a user agent MAY allow the end-user to
input some text that can serve as the application's name.
- When both the name
and
- short_name
members
+ When both the name and
+ short_name members
are present, it is left up to implementations to decide which member
is best suited for the space available (e.g., the
- short_name
member might be better suited for the
+ short_name member might be better suited for the
space available underneath an icon).
SecurityError
.
- A developer specifies the navigation scope via the scope
- member. In the case where the scope
member is missing or
+ A developer specifies the navigation scope via the scope
+ member. In the case where the scope member is missing or
in error, the navigation scope is treated as unbounded
(represented as the value undefined
). In such a case, the
manifest is applied to all URLs the application context is
@@ -1016,11 +1016,11 @@
The fullscreen display mode is orthogonal to, and works
independently of, the [[WHATWG-FULLSCREEN]] API. The
- fullscreen
display mode affects the
+ fullscreen display mode affects the
fullscreen state of the browser window, while the [[WHATWG-FULLSCREEN]]
API operates on an element contained within the viewport. As such, a
web application can have its display mode set to
- fullscreen
, while
+ fullscreen, while
document.fullScreenElement
returns null
, and
fullscreenEnabled
returns false
.
A manifest is obtained and applied regardless of the
- media
attribute of the link
+ media attribute of the link
element matches the environment or not.
- The manifest-src
and
- default-src
directives govern the origins
+ The manifest-src and
+ default-src directives govern the origins
from which a user agent can fetch a manifest. As with
- other directives, by default the manifest-src
+ other directives, by default the manifest-src
directive is *
, meaning that a user agent can,
[[!FETCH]]'s CORS permitting, fetch the manifest
cross-domain. Remote origins (e.g., a
"342" alt="manifest-src directive example illustrated">
manifest-src
directive controls the sources
+ manifest-src directive controls the sources
from which a [[!HTML]] document can load a manifest from. The
same CSP policy's img-src
directive controls where
the icon's images can be fetched from.
@@ -1590,7 +1590,7 @@
-
Manifest and its members
@@ -1598,21 +1598,20 @@
A manifest is a JSON document that contains startup
parameters and application defaults for when a web application is
launched. A manifest consists of a top-level WebAppManifest
- object that contains zero or more members.
+ dictionary that contains zero or more members.
Each of the members are defined below, as well as how their values are processed.
- [NoInterfaceObject] dictionary WebAppManifest { TextDirectionType? dir; - USVString? lang; + DOMString? lang; USVString? name; USVString? short_name; USVString? description; sequence<ImageResource>? icons; sequence<ImageResource>? screenshots; sequence<CategoryType>? categories; - USVString? iarc_rating_id; + DOMString? iarc_rating_id; USVString? start_url; DisplayModeType? display; OrientationLockType? orientation; @@ -1633,13 +1632,12 @@
dir
member- The
dir
member specifies the base + The dir member specifies the base direction for the directionality-capable members of the - manifest. Thedir
member's value can be set to + manifest. The dir member's value can be set to one of the text-direction values.- [NoInterfaceObject] enum TextDirectionType { "ltr", "rtl", "auto" };@@ -1647,13 +1645,13 @@
- -
description
member. + description member.- -
name
member. + name member.- -
short_name
member. + short_name member.@@ -1754,7 +1752,7 @@
lang
member- The
lang
member is a + The lang member is a language tag (string) that specifies the primary language for the values of the manifest's directionality-capable members (as knowing the language can also help with directionality). @@ -1819,7 +1817,7 @@
name
member- The
name
member is a + 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). @@ -1853,7 +1851,7 @@
short_name
member- The
short_name
member + The short_name member is a string that represents a short version of the name of the web application. It is intended to be used where there is insufficient space to display the full name of the web application. @@ -1887,7 +1885,7 @@
description
member- The
@@ -1921,7 +1919,7 @@description
+ The description member allows the developer to describe the purpose of the web application.
- The
@@ -1929,7 +1927,7 @@scope
member is a + The scope member is a string that represents the navigation scope of this web application's application context.The steps for processing the
scope
member is given by the following algorithm. The algorithm takes a manifest manifest, a URL manifest - URL , a URL document URL, and a URL + URL, a URL document URL, and a URL start URL . This algorithm returns a URL orundefined
. @@ -1997,7 +1995,7 @@
icons
member- The
icons
member is an + The icons member is an array of ImageResources that can serve as iconic representations of the web application in various contexts. For example, they can be used to represent the web application amongst a @@ -2006,7 +2004,7 @@system preferences.
- The
icons
member is processed using the steps for + The icons member is processed using the steps for processing an array of image resources.@@ -2068,7 +2066,6 @@
display
member- [NoInterfaceObject] enum DisplayModeType { "fullscreen", "standalone", @@ -2077,7 +2074,7 @@};
- The
display
member is a DisplayModeType, + The display member is a DisplayModeType, whose value is one of display modes values. The item represents the developer's preferred display mode for the web application. When the member is missing or erroneous, the user @@ -2124,15 +2121,15 @@
orientation
member- The
orientation
+ The orientation member is a string that serves as the default orientation for all top-level browsing contexts of the web application. The possible values are those of the -OrientationLockType
enum defined in + OrientationLockType enum defined in [[!SCREEN-ORIENTATION]].- If the user agent honors the value of the
orientation
+ If the user agent honors the value of the orientation member as the default orientation, then that serves as the default orientation for the life of the web application (unless overridden by some other means at runtime). This means that @@ -2143,7 +2140,7 @@
Although the specification relies on the [[!SCREEN-ORIENTATION]]'s -
@@ -2185,7 +2182,7 @@OrientationLockType
, it is OPTIONAL for a user + OrientationLockType, it is OPTIONAL for a user agent to implement the [[!SCREEN-ORIENTATION]] API. Supporting the [[!SCREEN-ORIENTATION]] API is, of course, RECOMMENDED.and set value to be the result.
OrientationLockType
enum values, or
+ OrientationLockType enum values, or
value is unsupported by the user agent, or the
value cannot be used together with display
mode:
@@ -2206,14 +2203,14 @@ start_url
member
- The start_url
member is a string that
+ The start_url member is a string that
represents the start URL , which is URL that the
developer would prefer the user agent load when the user launches the
web application (e.g., when the user clicks on the icon of the web
application from a device's application menu or homescreen).
- The start_url
member is purely advisory, and a
+ The start_url member is purely advisory, and a
user agent MAY ignore it or provide the end-user the choice
not to make use of it. A user agent MAY also allow the end-user to
modify the URL when, for instance, a bookmark for the web application
@@ -2262,7 +2259,7 @@
start_url
needs to be same-origin as
+ start_url needs to be same-origin as
Document
of the top-level browsing context.
- For example, if the value of start_url
is
+ For example, if the value of start_url is
../start_point.html, and the manifest's URL is
https://example.com/resources/manifest.webmanifest,
then the result of URL parsing would be
@@ -2284,10 +2281,10 @@
start_url
tracking
+ Privacy consideration: start_url tracking
- It's conceivable that the start_url
could be crafted
+ It's conceivable that the start_url could be crafted
to indicate that the application was launched from outside the
browser (e.g., "start_url":
"index.html?launcher=homescreen"
). This can be useful for
@@ -2309,11 +2306,11 @@
serviceworker
member
- The serviceworker
member describes a service
+ The serviceworker member describes a service
worker as defined in [[!SERVICE-WORKERS-1]].
- The
- The serviceworker
member represents an intented
+ The serviceworker member represents an intented
service worker registration in form of a registration
@@ -2408,7 +2405,7 @@
theme_color
member
theme_color
+ The theme_color
member serves as the default theme color for an
application context. What constitutes a theme color is
defined in [[!HTML]].
@@ -2473,7 +2470,7 @@
manifest.
- The related_applications
member lists
+ The related_applications member lists
related applications and serves as an indication of such a
relationship between web application and related applications.
This relationship is unidirectional and unless a listed application
@@ -2563,7 +2560,7 @@
- The prefer_related_applications
member is a
+ The prefer_related_applications member is a
boolean value that is used as a hint for the user agent to say that
related applications should be preferred over the web
application. The user agent MUST consider the missing value as
@@ -2602,7 +2599,7 @@
background_color
member
- The background_color
+ The background_color
member describes the expected background color of the web
application. It repeats what is already available in the application
stylesheet but can be used by the user agent to draw the
@@ -2611,13 +2608,13 @@
- The background_color
member is only meant to improve the
+ The background_color member is only meant to improve the
user experience while a web application is loading and MUST NOT be
used by the user agent as the background color when the web
application's stylesheet is available.
- The steps for processing the
- The
- The background_color
+ The steps for processing the background_color
member are given by the following algorithm. The algorithm
takes a manifest as an argument. This algorithm returns a
string or undefined
.
@@ -2661,12 +2658,12 @@
categories
member
categories
member
+ The categories member
describes the expected application categories to which the web
application belongs.
categories
member is only meant as a hint to
+ The categories member is only meant as a hint to
catalogs or stores listing web applications and it is expected that
these will make a best effort to find appropriate categories (or
category) under which to list the web application. Like search
@@ -2724,7 +2721,7 @@
This specification does not define the particular CategoryTypes
- for a the categories
member. However, the working group
+ for a the categories member. However, the working group
maintains a list of known
values in our wiki.
@@ -2735,7 +2732,7 @@
screenshots
member
- The screenshots
+ The screenshots
member is an array of ImageResources, representing the
web application in common usage scenarios.
iarc_rating_id
member
- The iarc_rating_id
+ The iarc_rating_id
member is a string that represents an ID value of the
IARC rating of the web application. It is intended to be used to
determine which ages the web application is appropriate for.
- The steps for processing the
- The iarc_rating_id
+ The steps for processing the iarc_rating_id
member is given by the following algorithm. The algorithm takes
a manifest as an argument. This algorithm returns a string
or undefined
.
@@ -2807,9 +2804,8 @@
- [NoInterfaceObject]
dictionary ImageResource {
- USVString src;
+ required USVString src;
DOMString sizes;
USVString type;
USVString purpose;
@@ -2931,7 +2927,7 @@
purpose
member
purpose
member is an unordered set of
+ The purpose member is an unordered set of
unique space-separated tokens that are ASCII
case-insensitive. The allowed values are the icon
purposes.
@@ -2945,7 +2941,7 @@
For example, as a badge or "pinned"
icon that is visually distinct, in color or form, from an
application's launch icon. The user agent uses the value of the
-
purpose
member as a hint to determine where and
+ purpose member as a hint to determine where and
how an ImageResource is displayed. Unless declared otherwise by
the developer, a user agent can use an icon for any purpose.
sizes
member
- The sizes
member of an ImageResource
+ The sizes member of an ImageResource
is a string consisting of an unordered set of unique
space-separated tokens which are ASCII case-insensitive
that represents the dimensions of an image. Each keyword is either an
@@ -3102,7 +3098,7 @@
src
member
- The src
member of an
+ The src member of an
ImageResource is a URL from which a user agent can fetch
the image's data.
type
member
- The type
member of an ImageResource is
+ The type member of an ImageResource is
a hint as to the media type of the image. The purpose of this member
is to allow a user agent to ignore images of media types it does not
support.
@@ -3283,7 +3279,7 @@
platform
member
- The platform
member represents the
+ The platform member represents the
platform to which a containing object applies.
@@ -3303,7 +3299,7 @@
This specification does not define the particular values for a the
- platform
member. However, the working group
+ platform member. However, the working group
maintains a list of known
platform values in our wiki.
@@ -3335,16 +3331,15 @@
- A ServiceWorkerRegistration object represents a service worker + A ServiceWorkerRegistration dictionary represents a service worker registration for the web application.
- [NoInterfaceObject] dictionary ServiceWorkerRegistration { - USVString src; + required USVString src; USVString scope; USVString type; boolean use_cache; @@ -3355,8 +3350,8 @@
src
member- The
src
member of a ServiceWorkerRegistration - object is a URL representing a service worker. + The src member of a ServiceWorkerRegistration + dictionary is a URL representing a service worker.The steps for processing the
src
member of a @@ -3396,8 +3391,8 @@
scope
member- The
scope
member of a ServiceWorkerRegistration - object is the service worker's associated scope URL. + The scope member of a ServiceWorkerRegistration + dictionary is the service worker's associated scope URL.The steps for processing the
@@ -3485,8 +3480,8 @@scope
member of a @@ -3438,8 +3433,8 @@
type
member- The
member of a + ServiceWorkerRegistration dictionary is the service worker's worker type.type
member of a - ServiceWorkerRegistration object is the service worker's type
use_cache
member- The
@@ -3525,11 +3520,10 @@use_cache
member of a - ServiceWorkerRegistration object determines whether the user agent + The use_cache member of a + ServiceWorkerRegistration dictionary determines whether the user agent cache should be used when fetching the service worker.ExternalApplicationResource and its members
- [NoInterfaceObject] dictionary ExternalApplicationResource { - USVString platform; + required USVString platform; USVString url; - USVString id; + DOMString id; USVString min_version; USVString fingerprints; }; @@ -3575,7 +3569,7 @@
- A valid ExternalApplicationResource object MUST have + A valid ExternalApplicationResource dictionary MUST have
@@ -3614,17 +3608,17 @@platform
and either anurl
or anid
(or both).
Where should the
-platform
expected value be listed?+
url
member- The
url
member of an ExternalApplicationResource - object represents the URL at which the application can be + The url member of an ExternalApplicationResource + dictionary represents the URL at which the application can be found.- The steps for processing the
url
member of an + The steps for processing the url member of an application are given by the following algorithm. The algorithm takes an ExternalApplicationResource application. This algorithm will return an URL orundefined
. @@ -3651,13 +3645,13 @@
id
member
- The id
member of an ExternalApplicationResource
- object represents the id which is used to represent the application
+ The id member of an ExternalApplicationResource
+ dictionary represents the id which is used to represent the application
on the platform.
@@ -3684,13 +3678,13 @@
min_version
member
- The min_version
member of an
- ExternalApplicationResource object represents the minimum
+ The min_version member of an
+ ExternalApplicationResource dictionary represents the minimum
version of the application that is considered related to this web app.
This version is a string with platform-specific syntax and semantics.
fingerprints
member
- The fingerprints
member
- of an ExternalApplicationResource object represents a set
+ The fingerprints member
+ of an ExternalApplicationResource dictionary represents a set
of cryptographic fingerprints used for verifying the application.
It is given as an array of fingerprint objects.
OrientationLockType
enum, are defined in
+ OrientationLockType enum, are defined in
[[!SCREEN-ORIENTATION]].
@@ -3840,11 +3834,11 @@
The manifest-src
,
+ "https://w3c.github.io/webappsec-csp/#manifest_src">manifest-src,
img-src
,
+ "https://w3c.github.io/webappsec-csp/#img_src">img-src,
and default-src
+ "https://w3c.github.io/webappsec-csp/#default_src">default-src
directives are defined in [[!CSP3]].
From 8018ba602b203a4a418e69025fceee9c20058631 Mon Sep 17 00:00:00 2001
From: Kenneth Rohde Christiansen
The application's name is derived from either the
- name member or short_name
- member (if either is present) - otherwise, it is generated by the
- user agent or provided by the end-user.
+ name member or short_name member (if either is present)
+ - otherwise, it is generated by the user agent or provided by the
+ end-user.
When either member is missing from the manifest, a user agent MAY use
- the name member as a fallback for the
- short_name member or vice versa.
+ the name member as a fallback for the short_name member
+ or vice versa.
- If the name and short_name members are
- undefined, the user agent SHOULD assign a default name (e.g.,
- "Untitled"). Alternatively, a user agent MAY allow the end-user to
- input some text that can serve as the application's name.
+ If the name and short_name members are undefined, the
+ user agent SHOULD assign a default name (e.g., "Untitled").
+ Alternatively, a user agent MAY allow the end-user to input some text
+ that can serve as the application's name.
- When both the name and
- short_name members
- are present, it is left up to implementations to decide which member
- is best suited for the space available (e.g., the
- short_name member might be better suited for the
- space available underneath an icon).
+ When both the name and short_name members are present,
+ it is left up to implementations to decide which member is best
+ suited for the space available (e.g., the short_name member
+ might be better suited for the space available underneath an icon).
SecurityError
.
- A developer specifies the navigation scope via the scope
- member. In the case where the scope member is missing or
- in error, the navigation scope is treated as unbounded
- (represented as the value undefined
). In such a case, the
- manifest is applied to all URLs the application context is
- navigated to (see related security
+ A developer specifies the navigation scope via the scope member.
+ In the case where the scope member is missing or in error, the
+ navigation scope is treated as unbounded (represented as the
+ value undefined
). In such a case, the manifest is applied
+ to all URLs the application context is navigated to (see related
+ security
considerations).
- The display modes values defined by DisplayModeType, - and their corresponding fallback display modes are as follows: + The display modes values defined by + DisplayModeType, and their corresponding fallback display + modes are as follows:
The fullscreen display mode is orthogonal to, and works
- independently of, the [[WHATWG-FULLSCREEN]] API. The
- fullscreen display mode affects the
- fullscreen state of the browser window, while the [[WHATWG-FULLSCREEN]]
- API operates on an element contained within the viewport. As such, a
- web application can have its display mode set to
- fullscreen, while
+ independently of, the [[WHATWG-FULLSCREEN]] API. The fullscreen
+ display mode affects the fullscreen state of the browser window,
+ while the [[WHATWG-FULLSCREEN]] API operates on an element contained
+ within the viewport. As such, a web application can have its display
+ mode set to fullscreen, while
document.fullScreenElement
returns null
, and
fullscreenEnabled
returns false
.
A manifest is obtained and applied regardless of the
- media attribute of the link
- element matches the environment or not.
+ media attribute of the link
element
+ matches the environment or not.
- The manifest-src and
- default-src directives govern the origins
- from which a user agent can fetch a manifest. As with
- other directives, by default the manifest-src
+ The manifest-src and default-src directives govern
+ the origins from which a user agent can fetch a manifest.
+ As with other directives, by default the manifest-src
directive is *
, meaning that a user agent can,
[[!FETCH]]'s CORS permitting, fetch the manifest
cross-domain. Remote origins (e.g., a
img-src
directive controls where
- the icon's images can be fetched from.
+ For a [[!HTML]] document, [[!CSP3]]'s manifest-src
+ directive controls the sources from which a [[!HTML]] document
+ can load a manifest from. The same CSP policy's
+ img-src
directive controls where the icon's images
+ can be fetched from.
scope
@@ -1538,9 +1534,9 @@
Please note that the start URL is not necessarily the value
- of the start_url
member: the user or user agent
- could have changed it when the application was added to home-screen
- or otherwise bookmarked.
+ of the start_url
+ member: the user or user agent could have changed it when the
+ application was added to home-screen or otherwise bookmarked.
@@ -1592,15 +1588,8 @@
- A manifest is a JSON document that contains startup - parameters and application defaults for when a web application is - launched. A manifest consists of a top-level WebAppManifest - dictionary that contains zero or more members. - Each of the members are defined below, as well as how their values are processed. -
dictionary WebAppManifest { TextDirectionType? dir; @@ -1623,6 +1612,11 @@+boolean? prefer_related_applications; };
+ A manifest is a JSON document that contains startup + parameters and application defaults for when a web application is + launched. +
Every manifest has an associated manifest URL, which is the [[!URL]] from which the manifest was fetched. @@ -1631,15 +1625,15 @@
dir
member
- The dir member specifies the base - direction for the directionality-capable members of the - manifest. The dir member's value can be set to - one of the text-direction values. -
enum TextDirectionType { "ltr", "rtl", "auto" };+
+ The dir member specifies the base direction for + the directionality-capable members of the manifest. The + dir member's value can be set to one of the text-direction + values. +
The directionality-capable members are:
@@ -1655,9 +1649,10 @@- The text-direction values defined by - TextDirectionType, are the following, implying that the value of the - directionality-capable members is by default: + The text-direction values + defined by TextDirectionType, are the following, implying + that the value of the directionality-capable members is by + default:
lang
member
- The lang member is a - language tag (string) that specifies the primary language for - the values of the manifest's directionality-capable members - (as knowing the language can also help with directionality). + The lang member is a language tag (string) that + specifies the primary language for the values of the manifest's + directionality-capable members (as knowing the language can + also help with directionality).
A language tag is a string that matches the production of @@ -1817,10 +1812,10 @@
name
member
- 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). + 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).
The steps for processing the name
member is
@@ -1851,10 +1846,10 @@
short_name
member
- The short_name member - is a string that represents a short version of the name of the - web application. It is intended to be used where there is - insufficient space to display the full name of the web application. + The short_name member is a string that represents a + short version of the name of the web application. It is intended to + be used where there is insufficient space to display the full name of + the web application.
The steps for processing the
- The description
- member allows the developer to describe the purpose of the web
- application.
+ The description member allows the developer to describe
+ the purpose of the web application.
The steps for processing the
- The scope member is a
- string that represents the navigation scope of this web application's
- application context.
+ The scope member is a string that represents the
+ navigation scope of this web application's application
+ context.
The steps for processing the
- The icons member is an
- array of ImageResources that can serve as iconic
- representations of the web application in various contexts. For
- example, they can be used to represent the web application amongst a
- list of other applications, or to integrate the web application with
- an OS's task switcher and/or
- system preferences.
+ The icons member is an array of
+ ImageResources that can serve as iconic representations of the
+ web application in various contexts. For example, they can be used to
+ represent the web application amongst a list of other applications,
+ or to integrate the web application with an OS's task switcher and/or system
+ preferences.
The icons member is processed using the steps for
@@ -2074,11 +2068,11 @@
- The display member is a DisplayModeType,
- whose value is one of display modes values. The
- item represents the developer's preferred display mode for the
- web application. When the member is missing or erroneous, the user
- agent MUST use the fallback display mode.
+ The display member is a DisplayModeType, whose
+ value is one of display modes values. The item represents the
+ developer's preferred display mode for the web application.
+ When the member is missing or erroneous, the user agent MUST use the
+ fallback display mode.
The steps for processing the
- The orientation
- member is a string that serves as the default
- orientation for all top-level browsing contexts of the web
- application. The possible values are those of the
- OrientationLockType enum defined in
+ The orientation member is a string that serves as
+ the default orientation for all top-level browsing
+ contexts of the web application. The possible values are those of
+ the OrientationLockType enum defined in
[[!SCREEN-ORIENTATION]].
- If the user agent honors the value of the orientation
- member as the default orientation, then that serves as the
- default orientation for the life of the web application
- (unless overridden by some other means at runtime). This means that
- the user agent MUST return the orientation to the default
- orientation any time the orientation is unlocked
- [[!SCREEN-ORIENTATION]] or the top-level browsing context is
- navigated.
+ If the user agent honors the value of the orientation member
+ as the default orientation, then that serves as the default
+ orientation for the life of the web application (unless
+ overridden by some other means at runtime). This means that the user
+ agent MUST return the orientation to the default orientation
+ any time the orientation is unlocked [[!SCREEN-ORIENTATION]] or the
+ top-level browsing context is navigated.
Although the specification relies on the [[!SCREEN-ORIENTATION]]'s
- OrientationLockType, it is OPTIONAL for a user
- agent to implement the [[!SCREEN-ORIENTATION]] API. Supporting the
+ OrientationLockType, it is OPTIONAL for a user agent to
+ implement the [[!SCREEN-ORIENTATION]] API. Supporting the
[[!SCREEN-ORIENTATION]] API is, of course, RECOMMENDED.
@@ -2181,10 +2173,9 @@
- The start_url member is a string that
- represents the start URL , which is URL that the
- developer would prefer the user agent load when the user launches the
- web application (e.g., when the user clicks on the icon of the web
+ The start_url member is a string that represents
+ the start URL , which is URL that the developer
+ would prefer the user agent load when the user launches the web
+ application (e.g., when the user clicks on the icon of the web
application from a device's application menu or homescreen).
- The start_url member is purely advisory, and a
- user agent MAY ignore it or provide the end-user the choice
- not to make use of it. A user agent MAY also allow the end-user to
- modify the URL when, for instance, a bookmark for the web application
- is being created or any time thereafter.
+ The start_url member is purely advisory, and a user agent MAY
+ ignore it or provide the end-user the choice not to make use
+ of it. A user agent MAY also allow the end-user to modify the URL
+ when, for instance, a bookmark for the web application is being
+ created or any time thereafter.
The steps for processing the
- It's conceivable that the start_url could be crafted
- to indicate that the application was launched from outside the
- browser (e.g.,
Given the above, it is RECOMMENDED that, upon installation, or any
@@ -2306,12 +2296,11 @@
- The serviceworker member describes a service
- worker as defined in [[!SERVICE-WORKERS-1]].
+ The serviceworker member describes a service worker as
+ defined in [[!SERVICE-WORKERS-1]].
- The serviceworker member represents an intented
- serviceworker member represents an intented
service worker registration in form of a registration
object
@@ -2405,10 +2394,9 @@
- The theme_color
- member serves as the default theme color for an
- application context. What constitutes a theme color is
- defined in [[!HTML]].
+ The theme_color member serves as the default theme
+ color for an application context. What constitutes a theme
+ color is defined in [[!HTML]].
If the user agent honors the value of the
- The related_applications member lists
- related applications and serves as an indication of such a
- relationship between web application and related applications.
- This relationship is unidirectional and unless a listed application
- claims the same relationship, the user agent MUST NOT assume a
+ The related_applications member lists related
+ applications and serves as an indication of such a relationship
+ between web application and related applications. This
+ relationship is unidirectional and unless a listed application claims
+ the same relationship, the user agent MUST NOT assume a
bi-directional endorsement.
@@ -2488,7 +2476,8 @@
- The prefer_related_applications member is a
- boolean value that is used as a hint for the user agent to say that
- related applications should be preferred over the web
- application. The user agent MUST consider the missing value as
- equivalent to have it set to
- The background_color
- member describes the expected background color of the web
- application. It repeats what is already available in the application
- stylesheet but can be used by the user agent to draw the
- background color of a web application for which the manifest is known
- before the files are actually available, whether they are fetched
- from the network or retrieved from disk.
+ The background_color member describes the expected
+ background color of the web application. It repeats what is already
+ available in the application stylesheet but can be used by the
+ user agent to draw the background color of a web application
+ for which the manifest is known before the files are actually
+ available, whether they are fetched from the network or retrieved
+ from disk.
- The background_color member is only meant to improve the
- user experience while a web application is loading and MUST NOT be
- used by the user agent as the background color when the web
+ The background_color member is only meant to improve the user
+ experience while a web application is loading and MUST NOT be used by
+ the user agent as the background color when the web
application's stylesheet is available.
@@ -2658,17 +2647,15 @@
- The categories member
- describes the expected application categories to which the web
- application belongs.
+ The categories member describes the expected application
+ categories to which the web application belongs.
- The categories member is only meant as a hint to
- catalogs or stores listing web applications and it is expected that
- these will make a best effort to find appropriate categories (or
- category) under which to list the web application. Like search
- engines and meta keywords, catalogs and stores are not required to
- honor this hint.
+ The categories member is only meant as a hint to catalogs or
+ stores listing web applications and it is expected that these will
+ make a best effort to find appropriate categories (or category) under
+ which to list the web application. Like search engines and meta
+ keywords, catalogs and stores are not required to honor this hint.
The steps for processing the
- This specification does not define the particular CategoryTypes
- for a the categories member. However, the working group
- maintains a CategoryTypeshort_name
@@ -1885,9 +1880,8 @@
description
member
description
@@ -1919,16 +1913,16 @@
scope
member is
given by the following algorithm. The algorithm takes a
manifest manifest, a URL manifest
- URL, a URL document URL, and a URL
- start URL . This algorithm returns a URL or
+ URL, a URL document URL, and a URL start
+ URL . This algorithm returns a URL or
undefined
.
@@ -1995,13 +1989,13 @@
icons
member
};
display
member
@@ -2121,27 +2115,25 @@
orientation
member
start_url
member
start_url
member
@@ -2258,9 +2249,9 @@
Document
of the top-level browsing context.
+ Issue a developer warning that the start_url
+ needs to be same-origin as Document
of the
+ top-level browsing context.
Privacy consideration: start_url tracking
"start_url":
- "index.html?launcher=homescreen"
). This can be useful for
- analytics and possibly other customizations. However, it is also
- conceivable that developers could encode strings into the start_url
- that uniquely identify the user (e.g., a server assigned
- UUID). This is fingerprinting/privacy sensitive
- information that the user might not be aware of.
+ It's conceivable that the start_url could be crafted to
+ indicate that the application was launched from outside the browser
+ (e.g., "start_url": "index.html?launcher=homescreen"
).
+ This can be useful for analytics and possibly other customizations.
+ However, it is also conceivable that developers could encode
+ strings into the start_url that uniquely identify the user (e.g., a
+ server assigned UUID). This is fingerprinting/privacy
+ sensitive information that the user might not be aware of.
serviceworker
member
theme_color
member
theme_color
@@ -2470,11 +2458,11 @@
manifest
The steps for processing the
related_applications
member are given by the following algorithm. The algorithm
takes a manifest as an argument. This algorithm returns a list of
- ExternalApplicationResources applications, which can be empty.
+ ExternalApplicationResources applications, which
+ can be empty.
s for a the categories member. However,
+ the working group maintains a list of known
values in our wiki.
false
. If the
+ The prefer_related_applications member is a boolean value
+ that is used as a hint for the user agent to say that related
+ applications should be preferred over the web application. The
+ user agent MUST consider the missing value as equivalent to have it
+ set to false
. If the
prefer_related_applications
is set to true
,
and the user agent wants to suggest to install the web application,
the user agent might want to suggest installing one of the related
@@ -2599,18 +2588,18 @@
background_color
member
categories
member
categories
@@ -2720,9 +2707,9 @@
Manifest authors are encouraged to use lower-case.
screenshots
member
- The screenshots - member is an array of ImageResources, representing the - web application in common usage scenarios. + The screenshots member is an array of + ImageResources, representing the web application in common + usage scenarios.
iarc_rating_id
member
- The iarc_rating_id - member is a string that represents an ID value of the - IARC rating of the web application. It is intended to be used to - determine which ages the web application is appropriate for. + The iarc_rating_id member is a string that + represents an ID value of the IARC rating of the web application. It + is intended to be used to determine which ages the web application is + appropriate for.
- The steps for processing the iarc_rating_id
- member is given by the following algorithm. The algorithm takes
- a manifest as an argument. This algorithm returns a string
+ The steps for processing the iarc_rating_id member
+ is given by the following algorithm. The algorithm takes a
+ manifest as an argument. This algorithm returns a string
or undefined
.
- Each ImageResource - represents an image that is used as part of a web application, suitable - to use in various contexts depending on the semantics of the member - that is using the object (e.g., an icon that is part of an application - menu, etc.). For an image resource, this specification provides - developers with a means of specifying the dimensions, and media type of - an image (i.e., a "responsive image" solution [[RESPIMG-USECASES]]). A - user agent can use these values to select an image that is best suited - to display on the end-user's device or most closely matches the - end-user's preferences. + Each ImageResource represents an image that is used as part + of a web application, suitable to use in various contexts depending on + the semantics of the member that is using the object (e.g., an icon + that is part of an application menu, etc.). For an image resource, this + specification provides developers with a means of specifying the + dimensions, and media type of an image (i.e., a "responsive image" + solution [[RESPIMG-USECASES]]). A user agent can use these values to + select an image that is best suited to display on the end-user's device + or most closely matches the end-user's preferences.
- User agents may modify the images associated with an ImageResource - to better match the platform’s visual style before displaying it to the - user, for example by rounding the corners or painting it in a specific color. - It is recommended that developers prepare their image resources for such - scenarios to avoid losing important information through, e.g., change - of color or clipped corners. + User agents may modify the images associated with an + ImageResource to better match the platform’s visual style before + displaying it to the user, for example by rounding the corners or + painting it in a specific color. It is recommended that developers + prepare their image resources for such scenarios to avoid losing + important information through, e.g., change of color or clipped + corners.
To fetch the image associated with an ImageResource,
- the user agent MUST run the steps to fetch an image resource.
-
- The algorithm takes an image URL (ImageResource.src),
- the manifest URL, and the document (Document
)
- from which the manifest was linked. It returns a Response:
+ the user agent MUST run the steps to fetch an image
+ resource. The algorithm takes an image URL
+ (ImageResource.src), the manifest URL, and the
+ document (Document
) from which the manifest
+ was linked. It returns a Response:
purpose
member
- The purpose member is an unordered set of - unique space-separated tokens that are ASCII - case-insensitive. The allowed values are the icon - purposes. + The purpose member is an unordered set of unique + space-separated tokens that are ASCII case-insensitive. + The allowed values are the icon purposes.
When an ImageResource is used as an icon, a @@ -2941,9 +2927,9 @@
The icon purposes are as follows: @@ -2966,8 +2952,8 @@
The steps for processing a purpose
member of an
image are given by the following algorithm. The algorithm takes
- an ImageResource image. This algorithm will return a
- set.
+ an ImageResource image. This algorithm will return
+ a set.
sizes
member
- The sizes member of an ImageResource
- is a string consisting of an unordered set of unique
+ The sizes member of an ImageResource is a
+ string consisting of an unordered set of unique
space-separated tokens which are ASCII case-insensitive
that represents the dimensions of an image. Each keyword is either an
ASCII case-insensitive match for the string "
The steps for processing a sizes
member of an
image are given by the following algorithm. The algorithm takes
- an ImageResource image. This algorithm will return a
- set.
+ an ImageResource image. This algorithm will return
+ a set.
src
member
- The src member of an - ImageResource is a URL from which a user agent can fetch - the image's data. + The src member of an ImageResource is a URL + from which a user agent can fetch the image's data.
The steps for processing the src
member of an
image are given by the following algorithm. The algorithm takes
- a ImageResource icon, and a URL manifest
- URL , which is the URL from which the
+ a ImageResource icon, and a URL
+ manifest URL , which is the URL from which the
manifest was fetched. This algorithm will return a
URL or undefined
.
type
member
- The type member of an ImageResource is - a hint as to the media type of the image. The purpose of this member - is to allow a user agent to ignore images of media types it does not - support. + The type member of an ImageResource is a hint as to + the media type of the image. The purpose of this member is to allow a + user agent to ignore images of media types it does not support.
There is no default MIME type for image resources. However, for the @@ -3187,13 +3171,13 @@
- The steps for processing an array of image resources are given by - the following algorithm. The algorithm takes a manifest, a URL - manifest URL, which is the URL from which the + The steps for processing an array of image resources are + given by the following algorithm. The algorithm takes a manifest, a + URL manifest URL, which is the URL from which the manifest was fetched, and a string that represents the member name of the member which contains the array of - ImageResources. This algorithm returns a sequence of ImageResources, - which can be empty. + ImageResources. This algorithm returns a sequence of + ImageResources, which can be empty.
platform
member
- The platform member represents the - platform to which a containing object applies. + The platform member represents the platform to + which a containing object applies.
The following object types can make use of this member: @@ -3299,16 +3284,15 @@
This specification does not define the particular values for a the - platform member. However, the working group - maintains a list of known - platform values in our wiki. + platform member. However, the working group maintains a + list of + known platform values in our wiki.
The steps for processing the platform
member of an
application are given by the following algorithm. The algorithm
- takes an ExternalApplicationResource application. This
- algorithm will return a string or undefined
.
+ takes an ExternalApplicationResource application.
+ This algorithm will return a string or undefined
.
- A ServiceWorkerRegistration dictionary represents a service worker - registration for the web application. + A ServiceWorkerRegistration dictionary represents a service + worker registration for the web application.
dictionary ServiceWorkerRegistration { @@ -3433,8 +3417,8 @@
type
member- The type member of a - ServiceWorkerRegistration dictionary is the service worker's type member of a ServiceWorkerRegistration + dictionary is the service worker's worker type.
@@ -3475,15 +3459,16 @@
use_cache
member
- The use_cache member of a - ServiceWorkerRegistration dictionary determines whether the user agent - cache - should be used when fetching the service worker. + The use_cache member of a ServiceWorkerRegistration + dictionary determines whether the user agent cache should + be used when fetching the service worker.
The steps for processing the use_cache
member of a
@@ -3515,7 +3500,8 @@
- Each ExternalApplicationResources represents an application related to - the web application. An application resource has the following - properties: + Each ExternalApplicationResources represents an application + related to the web application. An application resource has the + following properties:
The steps for processing the url member of an
application are given by the following algorithm. The algorithm
- takes an ExternalApplicationResource application. This
- algorithm will return an URL or undefined
.
+ takes an ExternalApplicationResource application.
+ This algorithm will return an URL or undefined
.
The id member of an ExternalApplicationResource - dictionary represents the id which is used to represent the application - on the platform. + dictionary represents the id which is used to represent the + application on the platform.
The steps for processing the id
member of an
application are given by the following algorithm. The algorithm
- takes an ExternalApplicationResource application. This
- algorithm will return a string or undefined
.
+ takes an ExternalApplicationResource application.
+ This algorithm will return a string or undefined
.
The min_version member of an ExternalApplicationResource dictionary represents the minimum - version of the application that is considered related to this web app. - This version is a string with platform-specific syntax and semantics. + version of the application that is considered related to this web + app. This version is a string with platform-specific syntax and + semantics.
The steps for processing the min_version
member of
an application are given by the following algorithm. The
- algorithm takes an ExternalApplicationResource application.
- This algorithm will return a string or undefined
.
+ algorithm takes an ExternalApplicationResource
+ application. This algorithm will return a string or
+ undefined
.
fingerprints
member
- The fingerprints member - of an ExternalApplicationResource dictionary represents a set - of cryptographic fingerprints used for verifying the application. - It is given as an array of fingerprint objects. + The fingerprints member of an + ExternalApplicationResource dictionary represents a set of + cryptographic fingerprints used for verifying the application. It is + given as an array of fingerprint + objects.
A fingerprint object has two properties: type
@@ -3730,9 +3719,10 @@
The steps for processing the fingerprints
member of
an application are given by the following algorithm. The
- algorithm takes an ExternalApplicationResource application.
- This algorithm will return a list of fingerprint objects, possibly empty.
+ algorithm takes an ExternalApplicationResource
+ application. This algorithm will return a list of
+ fingerprint objects, possibly
+ empty.
+ We need to catch throws associated with enumerations in IDL + conversion as the spec might gain new values over time not supported + by all exising browsers. +
"{}"
.
Object
:
"{}"
.
dir
member with manifest as the
- argument.
+ start_url
member with manifest,
- manifest URL, and document URL as arguments.
+ start_url
+ member with manifest, manifest URL, and
+ document URL as arguments.
serviceworker
member with manifest,
- manifest URL, and serviceworker as arguments.
+ display
+ member with manifest as the argument.
display
member with manifest as the
- argument.
+ lang
member
+ with manifest as the argument.
orientation
member with manifest and
- display mode as arguments.
+ scope
member
+ with manifest, manifest URL, document
+ URL, start URL as arguments.
name
- member with manifest as the argument.
+ theme_color
+ member with manifest as argument.
description
member with manifest as the
+ background_color
member with manifest as
argument.
lang
- member with manifest as the argument.
- short_name
member with manifest as the
- argument.
+ categories
+ member with manifest as argument.
scope
- member with manifest, manifest URL,
- document URL, start URL as arguments.
+ related_applications
member with manifest
as argument.
prefer_related_applications
member with
- manifest as argument.
- theme_color
member with manifest as
- argument.
- background_color
member with manifest as
- argument.
+ serviceworker
+ member with manifest, manifest URL, and
+ serviceworker as arguments.
categories
member with manifest as
- argument.
- iarc_rating_id
member with manifest as
- argument.
- "rtl"
.
- The steps for processing the dir
member is
- given by the following algorithm. The algorithm takes a
- manifest as an argument. This algorithm returns one of the
- text-direction values.
-
dir
".
- "ltr"
.
- The steps for processing the lang
member is
- given by the following algorithm. The algorithm takes a
- manifest as an argument. This algorithm returns a string
- or undefined
.
+ The steps for post-processing the lang
member
+ is given by the following algorithm. The algorithm takes a
+ WebAppManifest manifest as an argument. This
+ algorithm returns a DOMString?
.
lang
".
+ String
:
undefined
.
- false
, then:
- false
, then:
+ null
.
+ undefined
.
+ null
- The steps for processing the name
member is
- given by the following algorithm. The algorithm takes a
- manifest as an argument. This algorithm returns a string
- or undefined
.
-
name
".
- undefined
.
-
- The steps for processing the short_name
- member is given by the following algorithm. The algorithm takes
- a manifest as an argument. This algorithm returns a string
- or undefined
.
-
short_name
".
- undefined
.
-
- The steps for processing the description
- member is given by the following algorithm. The algorithm takes
- a manifest as an argument. This algorithm returns a string
- or undefined
.
-
description
".
- undefined
.
-
- The steps for processing the scope
member is
- given by the following algorithm. The algorithm takes a
- manifest manifest, a URL manifest
- URL, a URL document URL, and a URL start
- URL . This algorithm returns a URL or
- undefined
.
+ The steps for post-processing the scope
+ member is given by the following algorithm. The algorithm takes
+ a WebAppManifest manifest, a URL
+ manifest URL, a URL document URL, and a
+ URL start URL . This algorithm returns a URL or
+ null
.
scope
".
+ undefined
", issue
- a developer warning that the type is unsupported.
- undefined
.
- String
or V is
+ the empty string, then return null
.
undefined
.
+ null
.
Document
of the application
context.
- undefined
.
+ null
.
undefined
.
+ null
.
- The icons member is processed using the steps for - processing an array of image resources. -
If there are multiple equally appropriate icons in icons, a user agent MUST use the last one declared in order at the time that @@ -2075,38 +1915,18 @@
- The steps for processing the display
member
- are given by the following algorithm. The algorithm takes a manifest
- manifest as an argument, and returns a string.
+ The steps for post-processing the display
+ member are given by the following algorithm. The algorithm
+ takes a WebAppManifest manifest as an argument, and
+ returns a DisplayModeType.
display
" as the argument.
- null
return the
+ fallback display mode's value.
- The steps for processing the orientation
- member are given by the following algorithm. The algorithm
- takes a manifest manifest and display mode
- display mode as an argument, and returns a string.
-
orientation
".
- undefined
.
- undefined
.
-
- The steps for processing the start_url
member
- are given by the following algorithm. The algorithm takes a
- manifest manifest, a URL manifest
- URL , and a URL document URL. This algorithm
- returns a URL.
+ The steps for post-processing the start_url
+ member are given by the following algorithm. The algorithm
+ takes a WebAppManifest manifest, a URL
+ manifest URL, and a URL document URL.
+ This algorithm returns a URL.
start_url
".
+ undefined
", issue
- a developer warning that the type is unsupported.
- String
or V is
+ the empty string, return a new URL whose input is
+ document URL.
The steps for processing the serviceworker
member are given by the following algorithm. The algorithm
- takes a manifest manifest. This algorithm returns a
- registration object registration, which can be
- undefined
.
+ takes a WebAppManifest manifest. This algorithm
+ returns a registration object registration', which
+ can be null
.
serviceworker
".
+ null
, return
+ null
.
src
member of a service worker with
- unprocessed registration and manifest URL.
- undefined
, or if the result of
- running is origin potentially trustworthy with the origin of
- src is Not Trusted
, issue a developer
- warning, abort these steps and return undefined
.
- src
, scope
, type
- and use_cache
. All properties initially set to
- undefined
.
+ registration and manifest URL.
src
property to be
- src.
+ Not Trusted
,
+ issue a developer warning, abort these steps and return
+ null
.
scope
member of a service worker
- passing unprocessed registration.
- undefined
, issue a
- developer warning, abort these steps and return
- undefined
.
- scope
- property to be scope.
+ passing registration.
type
member of a service worker
- passing unprocessed registration.
- undefined
, issue a
- developer warning, abort these steps and return
- undefined
.
- type
- property to be type.
+ passing registration.
use_cache
member of a service
- worker passing unprocessed registration.
+ workerundefined
, issue a
- developer warning, abort these steps and return
- undefined
.
- use_cache
- property to be use cache.
+
- The steps for processing the theme_color
+ The steps for post-processing the theme_color
member are given by the following algorithm. The algorithm
- takes a manifest as an argument. This algorithm returns a
- string or undefined
.
+ takes a WebAppManifest manifest as an argument.
+ This algorithm returns a USVString?
.
theme_color
".
+ undefined
.
- String
return
+ null
.
undefined
.
+ with V as input. If parsing returns a syntax error, return
+ undefined
.
undefined
.
+ null
.
The steps for processing the related_applications
member are given by the following algorithm. The algorithm
- takes a manifest as an argument. This algorithm returns a list of
- ExternalApplicationResources applications, which
- can be empty.
+ takes a WebAppManifest manifest as an argument.
+ This algorithm returns an
+ Array<ExternalApplicationResource>.
related_applications
".
+ null
:
platform
member of an
- application with potential application.
- undefined
, move
- onto the next item if any are left.
- id
member of an
- application with potential application.
+ url
member of an
- application with potential application.
+ undefined
, move onto the next item if any are
- left.
+ min_version
member
- of an application with potential application.
+ fingerprints
member
- of an application with potential application.
+ url
member of an
+ application with V.
platform
, id
, url
,
- min_version
, and fingerprints
- respectively set to platform, id,
- url, minVersion, and
- fingerprints.
+ fingerprints
member of an application with
+ V.
undefined
:
-
- The steps for processing the
- prefer_related_applications
member are given by
- the following algorithm. The algorithm takes a manifest as an
- argument. This algorithm returns a boolean.
-
prefer_related_applications
".
- false
.
-
- The steps for processing the background_color
+ The steps for post-processing the background_color
member are given by the following algorithm. The algorithm
- takes a manifest as an argument. This algorithm returns a
- string or undefined
.
+ takes a WebAppManifest manifest as an argument.
+ This algorithm returns a USVString?
.
background_color
".
+ undefined
.
- String
return
+ null
.
undefined
.
+ with V as input. If parsing returns a syntax error, return
+ null
.
undefined
.
+ null
.
- The steps for processing the categories
+ The steps for post-processing the categories
member are given by the following algorithm. The algorithm
- takes a manifest as an argument. This algorithm returns an
- array of strings or undefined
.
+ takes a WebAppManifest manifest as an argument.
+ This algorithm returns an Array<USVString>
.
categories
".
+ undefined
+ @@ -2707,8 +2383,8 @@
- This specification does not define the particular - CategoryTypes for a the categories member. However, + This specification does not define the particular values for + USVStrings for a the categories member. However, the working group maintains a list of known values in our wiki. @@ -2734,29 +2410,6 @@
- The steps for processing the iarc_rating_id member
- is given by the following algorithm. The algorithm takes a
- manifest as an argument. This algorithm returns a string
- or undefined
.
-
iarc_rating_id
".
- undefined
.
- The following shows a very simple manifest with the @@ -2950,51 +2603,40 @@
- The steps for processing a purpose
member of an
+ The steps for processing the purpose
member of an
image are given by the following algorithm. The algorithm takes
an ImageResource image. This algorithm will return
a set.
purpose
" as the argument.
+ undefined
", issue
- a developer warning that the type is unsupported.
- "any"
to
+ S.
- The steps for processing a sizes
member of an
+ The steps for processing the sizes
member of an
image are given by the following algorithm. The algorithm takes
an ImageResource image. This algorithm will return
a set.
sizes
" as the argument.
+ String
, return
+ null
.
undefined
", issue
- a developer warning that the type is unsupported.
- undefined
.
-
- sizes
attribute and let keywords be the
+
+ sizes
attribute and let keywords be the
result.
undefined
.
src
" as the argument.
- undefined
", issue a
- developer warning that the type is unsupported.
- undefined
.
- undefined
.
+ String
, return
+ null
.
undefined
.
type
" as the argument.
+ undefined
", issue a
- developer warning that the type is unsupported.
- undefined
.
- String
, return
+ null
.
- The steps for processing an array of image resources are - given by the following algorithm. The algorithm takes a manifest, a - URL manifest URL, which is the URL from which the + The steps for post-processing ImageResource members + are given by the following algorithm. The algorithm takes a manifest, + a URL manifest URL, which is the URL from which the manifest was fetched, and a string that represents the member name of the member which contains the array of ImageResources. This algorithm returns a sequence of ImageResources, which can be empty.
false
.
- src
member of an image
- with potential image and manifest URL.
- undefined
, move onto
- the next item in images (if any are left).
- src
, type
, and
- sizes
. All properties initially set to
- undefined
.
- src
property to be
- src.
- type
member of an image
- passing potential image.
- undefined
, set
- image's type
property to be
- type.
- sizes
member of an
- image passing potential image.
- undefined
, set
- image's sizes
property to be
- sizes.
- purpose
property to
- be the result of running the steps for processing a
- purpose
member of an image passing
- potential image.
- undefined
:
- false
+ src
member of an
+ image with V and manifest URL.
+ type
member of an
+ image with V and manifest URL.
+ sizes
member of an
+ image with V and manifest URL.
+ purpose
member of an
+ image with V and manifest URL.
+
- The steps for processing the platform
member of an
- application are given by the following algorithm. The algorithm
- takes an ExternalApplicationResource application.
- This algorithm will return a string or undefined
.
-
platform
" as the argument.
- undefined
.
- undefined
.
src
" as the argument.
- undefined
", issue a
- developer warning that the type is unsupported.
- undefined
.
- undefined
.
+ String
or
+ V is the empty string, then return null
.
undefined
.
scope
" as the argument.
+ null
, return null
.
undefined
", issue a
- developer warning that the type is unsupported and return
- undefined
.
- null
.
- undefined
.
- type
" as the argument.
- undefined
", issue a
- developer warning that the type is unsupported and return
- undefined
.
- "classic"
.
- undefined
.
- null
, return
+ "classic"
.
use_cache
" as the argument.
+ undefined
", issue a
- developer warning that the type is unsupported and return
- undefined
.
- false
- null
, return false
.
undefined
.
url
" as the argument.
+ undefined
.
- null
, return null
.
undefined
.
+ null
.
- The steps for processing the id
member of an
- application are given by the following algorithm. The algorithm
- takes an ExternalApplicationResource application.
- This algorithm will return a string or undefined
.
-
id
" as the argument.
- undefined
.
-
- The steps for processing the min_version
member of
- an application are given by the following algorithm. The
- algorithm takes an ExternalApplicationResource
- application. This algorithm will return a string or
- undefined
.
-
min_version
" as the argument.
- undefined
.
- fingerprints
member of
an application are given by the following algorithm. The
algorithm takes an ExternalApplicationResource
- application. This algorithm will return a list of
+ application. This algorithm will return an array of
fingerprint objects, possibly
empty.
fingerprints
" as the
- argument.
- type
" as an argument.
+ value
" as an argument.
+ String
, then
+ issue a developer warning that the type is unsupported,
+ and move on to the next item (if any are left).
type
member set to type and its
value
member set to value.
+ The algorithm to convert a ECMAScript object to IDL dictionary + value is defined in [[!WEBIDL]]. +
The manifest-src,
From 278816fcfcc3fd2805a546c4928552809a0ef928 Mon Sep 17 00:00:00 2001
From: Kenneth Rohde Christiansen
an installation process's UI.
Document
's
of switching to another display mode.
- When the display
member is missing, or if there is no
- valid display
member, the user agent uses the
- browser
display mode as the default display
- mode. As such, the user agent is REQUIRED to support the
- browser
display mode.
+ When the display member is
+ missing, or if there is no valid display member, the user agent uses the
+ browser display mode as the default display mode.
+ As such, the user agent is REQUIRED to support the browser
+ display mode.
Each display mode, except browser
, has a
@@ -1453,18 +1454,15 @@
start_url
member with manifest, manifest URL, and
document URL as arguments.
display
- member with manifest as the argument.
- lang
member
with manifest as the argument.
@@ -1472,7 +1470,7 @@ scope
member
with manifest, manifest URL, document
- URL, start URL as arguments.
+ URL, manifest["start_url"] as arguments.
theme_color
@@ -1497,14 +1495,14 @@ related_applications
member with manifest
as argument.
serviceworker
- member with manifest, manifest URL, and
- serviceworker as arguments.
+ running the steps for post-processing the
+ serviceworker
member with manifest,
+ manifest URL, and serviceworker as arguments.
dictionary WebAppManifest { - TextDirectionType? dir; - DOMString? lang; - USVString? name; - USVString? short_name; - USVString? description; - sequence<ImageResource>? icons; - sequence<ImageResource>? screenshots; - sequence<USVString>? categories; - DOMString? iarc_rating_id; - USVString? start_url; - DisplayModeType? display; - OrientationLockType? orientation; - USVString? theme_color; - USVString? background_color; - USVString? scope; - ServiceWorkerRegistration? serviceworker; - sequence<ExternalApplicationResource>? related_applications; - boolean? prefer_related_applications; + TextDirectionType dir; + DOMString lang; + USVString name; + USVString short_name; + USVString description; + sequence<ImageResource> icons; + sequence<ImageResource> screenshots; + sequence<USVString> categories; + DOMString iarc_rating_id; + USVString start_url; + DisplayModeType display = "browser"; + OrientationLockType orientation; + USVString theme_color; + USVString background_color; + USVString scope; + ServiceWorkerRegistration serviceworker; + sequence<ExternalApplicationResource> related_applications; + boolean prefer_related_applications; };
@@ -1704,18 +1702,19 @@
DOMString?
.
String
:
+ String
:
false
, then:
+ value as the argument returns false
,
+ then:
null
.
+ undefined
.
null
+ undefined
null
.
+ undefined
.
String
or V is
- the empty string, then return null
.
+ String
or value
+ is the empty string, then return undefined
.
null
.
+ undefined
.
Document
of the application
context.
null
.
+ undefined
.
null
.
+ undefined
.
- The steps for post-processing the display
- member are given by the following algorithm. The algorithm
- takes a WebAppManifest manifest as an argument, and
- returns a DisplayModeType.
null
return the
- fallback display mode's value.
- String
or V is
- the empty string, return a new URL whose input is
- document URL.
+ String
or value
+ is the empty string, return a new URL whose input
+ is document URL.
- The steps for processing the serviceworker
+ The steps for post-processing the serviceworker
member are given by the following algorithm. The algorithm
takes a WebAppManifest manifest. This algorithm
- returns a registration object registration', which
- can be null
.
+ returns a registration object registration, which
+ can be undefined
.
null
, return
- null
.
+ undefined
, return
+ undefined
.
src
member of a service worker with
- registration and manifest URL.
+ post-processing the src
member of a service worker
+ with registration and manifest URL.
Not Trusted
,
issue a developer warning, abort these steps and return
- null
.
+ undefined.
scope
member of a service worker
+ post-processing the scope
member of a service worker
passing registration.
type
member of a service worker
+ post-processing the type
member of a service worker
passing registration.
use_cache
member of a service
+ for post-processing the use_cache
member of a service
worker passing registration.
USVString?
.
String
return
- null
.
+ String
+ return undefined
.
undefined
.
+ with value as input. If parsing returns a syntax error,
+ return undefined
.
null
.
+ undefined
.
- The steps for processing the related_applications
- member are given by the following algorithm. The algorithm
- takes a WebAppManifest manifest as an argument.
- This algorithm returns an
+ The steps for post-processing the
+ related_applications
member are given by the
+ following algorithm. The algorithm takes a WebAppManifest
+ manifest as an argument. This algorithm returns an
Array<ExternalApplicationResource>.
null
:
+ undefined
:
url
member of
+ an application with app.
url
member of an
- application with V.
- fingerprints
member of an application with
- V.
+ app.
USVString?
.
String
return
- null
.
+ String
+ return undefined
.
null
.
+ with value as input. If parsing returns a syntax error,
+ return undefined
.
null
.
+ undefined
.
Array<USVString>
.
@@ -2384,8 +2342,8 @@
This specification does not define the particular values for - USVStrings for a the categories member. However, - the working group maintains a USVStrings for the categories member. However, the + working group maintains a list of known values in our wiki.
@@ -2603,20 +2561,20 @@
- The steps for processing the purpose
member of an
- image are given by the following algorithm. The algorithm takes
- an ImageResource image. This algorithm will return
- a set.
+ The steps for post-processing the purpose
member of
+ an image are given by the following algorithm. The algorithm
+ takes an ImageResource image. This algorithm will
+ return a set.
"any"
to
- S.
+ "any"
+ to set.
- The steps for processing the sizes
member of an
- image are given by the following algorithm. The algorithm takes
- an ImageResource image. This algorithm will return
- a set.
+ The steps for post-processing the sizes
member of
+ an image are given by the following algorithm. The algorithm
+ takes an ImageResource image. This algorithm will
+ return a set.
String
, return
- null
.
+ String
,
+ return undefined
.
- sizes
attribute and let keywords be the
+
+ sizes
attribute and let keywords be the
result.
- The steps for processing the src
member of an
+ The steps for post-processing the src
member of an
image are given by the following algorithm. The algorithm takes
a ImageResource icon, and a URL
manifest URL , which is the URL from which the
@@ -2728,10 +2686,10 @@
URL or
undefined
.
String
, return
- null
.
+ String
,
+ return undefined
.
- The steps for processing the type
member of an
+ The steps for post-processing the type
member of an
image are given by the following algorithm. The algorithm takes
an image object as an argument, and returns either a
string or undefined
.
String
, return
- null
.
+ String
,
+ return undefined
.
false
- src
member of an
- image with V and manifest URL.
- type
member of an
- image with V and manifest URL.
- sizes
member of an
- image with V and manifest URL.
- purpose
member of an
- image with V and manifest URL.
- undefined
:
+ src
+ member of an image with entry and
+ manifest URL.
+ type
+ member of an image with entry and
+ manifest URL.
+ sizes
+ member of an image with entry and
+ manifest URL.
+ purpose
member of an image with
+ entry and manifest URL.
+
- The steps for processing the src
member of a
+ The steps for post-processing the src
member of a
service worker are given by the following algorithm. The
algorithm takes a ServiceWorkerRegistration
registration, and a URL manifest URL,
@@ -2903,12 +2863,12 @@
undefined
.
String
or
- V is the empty string, then return null
.
+ String
or
+ V is the empty string, then return undefined
.
- The steps for processing the scope
member of a
+ The steps for post-processing the scope
member of a
service worker are given by the following algorithm. The
algorithm takes a ServiceWorkerRegistration
registration, and a URL manifest URL,
@@ -2931,11 +2891,12 @@
undefined
.
null
, return null
.
+ undefined
, return
+ undefined
.
- The steps for processing the type
member of a
+ The steps for post-processing the type
member of a
service worker are given by the following algorithm. The
algorithm takes a ServiceWorkerRegistration
registration, and a URL manifest URL,
@@ -2959,12 +2920,12 @@
fetched. This algorithm will return a string.
null
, return
+ undefined
, return
"classic"
.
- The steps for processing the use_cache
member of a
- service worker are given by the following algorithm. The
+ The steps for post-processing the use_cache
member
+ of a service worker are given by the following algorithm. The
algorithm takes a serviceworkerregistration
registration, and a URL manifest URL,
which is the URL from which the manifest was
fetched. This algorithm will return a boolean.
null
, return false
.
+ undefined
, return
+ false
.
- The steps for processing the url member of an
+ The steps for post-processing the url member of an
application are given by the following algorithm. The algorithm
takes an ExternalApplicationResource application.
This algorithm will return an URL or undefined
.
null
, return null
.
+ undefined
, return
+ undefined
.
null
.
+ undefined
.
- The steps for processing the fingerprints
member of
- an application are given by the following algorithm. The
- algorithm takes an ExternalApplicationResource
+ The steps for post-processing the fingerprints
+ member of an application are given by the following algorithm.
+ The algorithm takes an ExternalApplicationResource
application. This algorithm will return an array of
fingerprint objects, possibly
empty.
String
, then
issue a developer warning that the type is unsupported,
@@ -3183,11 +3147,11 @@ type
member set to type and its
value
member set to value.
true
, false
, and null
. Strict
- type checking is not enforced by this specification. Instead, each
- member's definition specifies the steps required to process a
+ true
, false
, and undefined
.
+ Strict type checking is not enforced by this specification. Instead,
+ each member's definition specifies the steps required to process a
particular member and what to do when a type does not match what is
expected.
@@ -3786,9 +3750,9 @@
To allow the community can easily find extensions, please add your
From e4bfa1cf9b14c95e7cb3843dba110e9935a5b835 Mon Sep 17 00:00:00 2001
From: Kenneth Rohde Christiansen
@@ -2080,30 +2080,24 @@
dictionary WebAppManifest {
- TextDirectionType dir;
+ TextDirectionType dir = "auto";
DOMString lang;
USVString name;
USVString short_name;
@@ -1575,7 +1575,7 @@
USVString scope;
ServiceWorkerRegistration serviceworker;
sequence<ExternalApplicationResource> related_applications;
- boolean prefer_related_applications;
+ boolean prefer_related_applications = "false";
};
undefined
, return
undefined
.
src
member of a service worker
- with registration and manifest URL.
+ src
member of a service
+ worker with registration and manifest URL.
Not Trusted
,
- issue a developer warning, abort these steps and return
- undefined
.
+ with the origin of registration["src"] is Not
+ Trusted
, issue a developer warning, abort these steps
+ and return undefined
.
scope
member of a service worker
- passing registration.
+ scope
member of a
+ service worker passing registration.
type
member of a service worker
- passing registration.
+ type
member of a
+ service worker passing registration.
use_cache
member of a service
- worker passing registration.
-
The prefer_related_applications member is a boolean value
that is used as a hint for the user agent to say that related
- applications should be preferred over the web application. The
- user agent MUST consider the missing value as equivalent to have it
- set to false
. If the
+ applications should be preferred over the web application. If the
prefer_related_applications
is set to true
,
and the user agent wants to suggest to install the web application,
the user agent might want to suggest installing one of the related
@@ -2842,7 +2834,7 @@
required USVString src;
USVString scope;
USVString type;
- boolean use_cache;
+ boolean use_cache = "false";
};
should
be used when fetching the service worker.
"https://w3c.github.io/ServiceWorker/#dfn-use-cache">cache
- The steps for post-processing the use_cache
member
- of a service worker are given by the following algorithm. The
- algorithm takes a serviceworkerregistration
- registration, and a URL manifest URL,
- which is the URL from which the manifest was
- fetched. This algorithm will return a boolean.
-
undefined
, return
- false
.
- src
member of a service
- worker with registration and manifest URL.
+ worker with registration["src"] and manifest
+ URL.
Not
@@ -2091,11 +2092,7 @@
scope
member of a
- service worker passing registration.
- type
member of a
- service worker passing registration.
+ service worker passing registration["scope"].
url
member of
- an application with app.
- fingerprints
member of an application with
- app.
+ an application with app["url"].
The steps for post-processing the src
member of a
service worker are given by the following algorithm. The
- algorithm takes a ServiceWorkerRegistration
- registration, and a URL manifest URL,
- which is the URL from which the manifest was
- fetched. This algorithm will return a URL or
- undefined
.
+ algorithm takes a USVString source URL, and a
+ URL manifest URL, which is the URL from
+ which the manifest was fetched. This algorithm will return
+ a URL or undefined
.
String
or
- V is the empty string, then return undefined
.
+ String
+ or source URL is the empty string, then return
+ undefined
.
The steps for post-processing the scope
member of a
service worker are given by the following algorithm. The
- algorithm takes a ServiceWorkerRegistration
- registration, and a URL manifest URL,
- which is the URL from which the manifest was
- fetched. This algorithm will return a URL or
- undefined
.
+ algorithm takes a USVString scope URL, and a
+ URL manifest URL, which is the URL from
+ which the manifest was fetched. This algorithm will return
+ a URL or undefined
.
undefined
, return
- undefined
.
+ undefined
, return
+ undefined
- The steps for post-processing the type
member of a
- service worker are given by the following algorithm. The
- algorithm takes a ServiceWorkerRegistration
- registration, and a URL manifest URL,
- which is the URL from which the manifest was
- fetched. This algorithm will return a string.
-
undefined
, return
- "classic"
.
- @@ -2984,8 +2954,8 @@
fingerprints
@@ -3040,17 +3010,16 @@
The steps for post-processing the url member of an
application are given by the following algorithm. The algorithm
- takes an ExternalApplicationResource application.
- This algorithm will return an URL or undefined
.
+ takes a USVString application URL. This algorithm
+ will return an URL or undefined
.
undefined
, return
+ undefined
, return
undefined
.
undefined
.
+ undefined
.
fingerprints
member
+ dictionary Fingerprint { + USVString type; + USVString value; + }; +
- The fingerprints member of an - ExternalApplicationResource dictionary represents a set of - cryptographic fingerprints used for verifying the application. It is - given as an array of fingerprint - objects. -
-
- A fingerprint object has two properties: type
- and value
. Each of these are strings, but their syntax
- and semantics are platform-defined.
+ The fingerprints member of an
+ ExternalApplicationResource dictionary represents an array of
+ Fingerprints.
- The steps for post-processing the fingerprints
- member of an application are given by the following algorithm.
- The algorithm takes an ExternalApplicationResource
- application. This algorithm will return an array of
- fingerprint objects, possibly
- empty.
+ Each Fingerprints represents a set of cryptographic
+ fingerprints used for verifying the application. A fingerprint has
+ the following two properties: type and value.
+ Each of these are strings, but their syntax and semantics are
+ platform-defined.
String
, then
- issue a developer warning that the type is unsupported,
- and move on to the next item (if any are left).
- type
member set to type and its
- value
member set to value.
- Document
's
the user agent uses the first link
element in
tree order and ignores all subsequent link
element with a manifest
link type (even if the first
- element was erroneous). See the steps for obtaining a
+ element was erroneous). See the steps for obtaining a
manifest.
- To obtain a manifest, the user agent MUST run the steps for obtaining a manifest. The + To obtain a manifest, the user agent MUST run the steps for + obtaining a manifest. The appropriate time to obtain the manifest is left up to implementations. A user agent MAY opt to delay fetching a manifest until after the document and its other resources have been fully @@ -1318,10 +1318,10 @@
- The steps for processing a manifest are given by the + The steps for processing a manifest are given by the following algorithm. The algorithm takes a text string as an argument, which represents a manifest, and a URL manifest URL, which represents the location of the @@ -1456,53 +1456,53 @@
start_url
- member with manifest, manifest URL, and
- document URL as arguments.
+ running post-processing the start_url
member
+ given manifest["start_url"], manifest
+ URL, and document URL.
lang
member
- with manifest as the argument.
+ post-processing the lang
member given
+ manifest["lang"].
scope
member
- with manifest, manifest URL, document
- URL, manifest["start_url"] as arguments.
+ post-processing the scope
member given
+ manifest["scope"], manifest URL,
+ document URL, and manifest["start_url"].
theme_color
- member with manifest as argument.
+ running post-processing the theme_color
member
+ given manifest["theme_color"].
background_color
member with manifest as
- argument.
+ of running post-processing the background_color
+ member given manifest["background_color"].
categories
- member with manifest as argument.
+ running post-processing the categories
member
+ given manifest["categories"].
"icons"
.
"screenshots"
.
related_applications
member with manifest
- as argument.
+ result of running post-processing the
+ related_applications
member given
+ manifest["related_applications"].
serviceworker
member with manifest,
- manifest URL, and serviceworker as arguments.
+ running post-processing the serviceworker
member
+ given manifest["serviceworker"], manifest
+ URL, and serviceworker.
- The steps for post-processing the lang
member
+ The steps for post-processing the lang
member
is given by the following algorithm. The algorithm takes a
WebAppManifest manifest as an argument. This
algorithm returns a DOMString?
.
@@ -1770,24 +1770,20 @@
- The steps for post-processing the scope
+ The steps for post-processing the scope
member is given by the following algorithm. The algorithm takes
- a WebAppManifest manifest, a URL
- manifest URL, a URL document URL, and a
- URL start URL . This algorithm returns a URL or
+ an USVString scope URL, a URL manifest
+ URL, a URL document URL, and a URL start
+ URL. This algorithm returns a URL or
undefined
.
String
or value
- is the empty string, then return undefined
.
+ undefined
.
- The steps for post-processing the start_url
+ The steps for post-processing the start_url
member are given by the following algorithm. The algorithm
- takes a WebAppManifest manifest, a URL
+ takes a USVString start URL, a URL
manifest URL, and a URL document URL.
This algorithm returns a URL.
String
or value
- is the empty string, return a new URL whose input
- is document URL.
+
- The steps for post-processing the serviceworker
+ The steps for post-processing the serviceworker
member are given by the following algorithm. The algorithm
- takes a WebAppManifest manifest. This algorithm
- returns a registration object registration, which
- can be undefined
.
+ takes a ServiceWorkerRegistration registration.
+ This algorithm returns a ServiceWorkerRegistration
+ registration, which can be undefined
.
undefined
, return
undefined
.
src
member of a service
- worker with registration["src"] and manifest
+ src
member of a service
+ worker given registration["src"] and manifest
URL.
undefined
.
scope
member of a
- service worker passing registration["scope"].
+ scope
member of a service
+ worker given registration["scope"].
- The steps for post-processing the theme_color
+ The steps for post-processing the theme_color
member are given by the following algorithm. The algorithm
- takes a WebAppManifest manifest as an argument.
- This algorithm returns a USVString?
.
+ takes a USVString theme color as an argument. This
+ algorithm returns a USVString?
.
String
- return undefined
.
- undefined
.
- The steps for post-processing the
+ The steps for post-processing the
related_applications
member are given by the
- following algorithm. The algorithm takes a WebAppManifest
- manifest as an argument. This algorithm returns an
+ following algorithm. The algorithm takes a
+ sequence<ExternalApplicationResource> related
+ applications as an argument. This algorithm returns an
Array<ExternalApplicationResource>.
undefined
:
url
member of
- an application with app["url"].
+ url
member of an
+ application given app["url"].
- The steps for post-processing the background_color
+ The steps for post-processing the background_color
member are given by the following algorithm. The algorithm
- takes a WebAppManifest manifest as an argument.
+ takes a USVString background color as an argument.
This algorithm returns a USVString?
.
String
- return undefined
.
- undefined
.
+ undefined
.
- The steps for post-processing the categories
+ The steps for post-processing the categories
member are given by the following algorithm. The algorithm
- takes a WebAppManifest manifest as an argument.
- This algorithm returns an Array<USVString>
.
+ takes a sequence<USVString> categories as an
+ argument. This algorithm returns an
+ Array<USVString>
.
- The steps for post-processing the purpose
member of
+ The steps for post-processing the purpose
member of
an image are given by the following algorithm. The algorithm
takes an ImageResource image. This algorithm will
return a set.
@@ -2625,7 +2604,7 @@
display context (and ignore any that are inappropriate).
- The steps for post-processing the sizes
member of
+ The steps for post-processing the sizes
member of
an image are given by the following algorithm. The algorithm
takes an ImageResource image. This algorithm will
return a set.
@@ -2662,7 +2641,7 @@
from which a user agent can fetch the image's data.
- The steps for post-processing the src
member of an
+ The steps for post-processing the src
member of an
image are given by the following algorithm. The algorithm takes
a ImageResource icon, and a URL
manifest URL , which is the URL from which the
@@ -2695,7 +2674,7 @@
must expect the resource to be an image.
- The steps for post-processing the
- The steps for post-processing ImageResource members
+ The steps for post-processing ImageResource members
are given by the following algorithm. The algorithm takes a manifest,
a URL manifest URL, which is the URL from which the
manifest was fetched, and a string that represents the
@@ -2741,24 +2720,24 @@ type
member of an
+ The steps for post-processing the type
member of an
image are given by the following algorithm. The algorithm takes
an image object as an argument, and returns either a
string or undefined
.
@@ -2719,7 +2698,7 @@
Post-processing an array of image resources
the expression ({}).
src
- member of an image with entry and
- manifest URL.
+ post-processing the src
member of an
+ image given entry and manifest
+ URL.
type
- member of an image with entry and
- manifest URL.
+ post-processing the type
member of an
+ image given entry and manifest
+ URL.
sizes
- member of an image with entry and
- manifest URL.
+ post-processing the sizes
member of an
+ image given entry and manifest
+ URL.
purpose
member of an image with
- entry and manifest URL.
+ running post-processing the purpose
member
+ of an image given entry and manifest
+ URL.
- The steps for post-processing the src
member of a
+ The steps for post-processing the src
member of a
service worker are given by the following algorithm. The
algorithm takes a USVString source URL, and a
URL manifest URL, which is the URL from
@@ -2864,7 +2843,7 @@
dictionary is the service worker's associated scope URL.
- The steps for post-processing the scope
member of a
+ The steps for post-processing the scope
member of a
service worker are given by the following algorithm. The
algorithm takes a USVString scope URL, and a
URL manifest URL, which is the URL from
@@ -3008,7 +2987,7 @@
found.
- The steps for post-processing the url member of an
+ The steps for post-processing the url member of an
application are given by the following algorithm. The algorithm
takes a USVString application URL. This algorithm
will return an URL or undefined
.
@@ -3636,7 +3615,7 @@
Notes:
This specification is designed to be extensible. Other specifications
are encouraged to define new members for the manifest. However, in
doing so, please follow the conventions used in this specification.
- In particular, use the extension point to hook into the
- steps for processing a manifest. Also, be sure to specify the
- steps for post-processing your particular member in the manner set
- forth in this specification. This will help keep this part of the
- platform consistent.
+ In particular, use the extension point to hook into the steps
+ for processing a manifest. Also, be sure to specify the steps
+ for post-processing your particular member in the manner set forth in
+ this specification. This will help keep this part of the platform
+ consistent.
To allow the community can easily find extensions, please add your
From 54af83494d9280f7f37cd9117dd4ae139e98443e Mon Sep 17 00:00:00 2001
From: Kenneth Rohde Christiansen
"to idl dictionary value">converting json to a
WebAppManifest dictionary.
start_url
member
- given manifest["start_url"], manifest
+ given manifest["start_url"], manifest
URL, and document URL.
lang
member given
- manifest["lang"].
+ manifest["lang"].
scope
member given
- manifest["scope"], manifest URL,
- document URL, and manifest["start_url"].
+ manifest["scope"], manifest URL,
+ document URL, and manifest["start_url"].
theme_color
member
- given manifest["theme_color"].
+ given manifest["theme_color"].
background_color
- member given manifest["background_color"].
+ member given manifest["background_color"].
categories
member
- given manifest["categories"].
+ given manifest["categories"].
"icons"
.
"screenshots"
.
related_applications
member given
- manifest["related_applications"].
+ manifest["related_applications"].
serviceworker
member
- given manifest["serviceworker"], manifest
+ given manifest["serviceworker"], manifest
URL, and serviceworker.
DOMString?
.
String
:
undefined
, return
undefined
.
src
member of a service
- worker given registration["src"] and manifest
+ worker given registration["src"] and manifest
URL.
Not
+ with the origin of registration["src"] is Not
Trusted
, issue a developer warning, abort these steps
and return undefined
.
scope
member of a service
- worker given registration["scope"].
+ workerundefined
:
url
member of an
- application given app["url"].
+ application given app["url"].
undefined
.
String
,
return undefined
.
@@ -2680,7 +2680,7 @@ undefined
.
String
,
return undefined
.
@@ -2714,27 +2714,27 @@ undefined
:
+ undefined
:
src
member of an
image given entry and manifest
URL.
type
member of an
image given entry and manifest
URL.
sizes
member of an
image given entry and manifest
URL.
purpose
member
of an image given entry and manifest
URL.