diff --git a/index.html b/index.html index 62d0556ba..f2f401e95 100644 --- a/index.html +++ b/index.html @@ -1986,18 +1986,10 @@

When shortcut item shortcut having - manifest is invoked, run the following steps: + manifest is invoked, run the steps to + [=launch a web application=] with manifest and + shortcut.url.

-
    -
  1. Let url be shortcut.url. -
  2. -
  3. Let browsing context be the result of creating a new - top-level browsing context. -
  4. -
  5. - Navigate browsing context to url. -
  6. -

@@ -2203,18 +2195,19 @@

bookmark, as opening a web page from a traditional bookmark will not have the manifest's properties applied to it.

-

+

For example, on user agents that support installation, a web application could be presented and launched in a way that, to the end-user, is indistinguishable from native applications: such as appearing as a labeled icon on the home screen, launcher, or start - menu. When launched, the manifest is applied by the user agent - to the top-level browsing context prior to the start URL - being loaded. This gives the user agent an opportunity to apply the - relevant values of the manifest, possibly changing the display - mode and screen orientation of the web application. Alternatively, - and again as an example, the user agent could install the web - application into a list of bookmarks within the user agent itself. + menu. When [=launching a web application=], the manifest is + applied by the user agent to the top-level browsing + context prior to the start URL being loaded. This gives the + user agent an opportunity to apply the relevant values of the manifest, + possibly changing the display mode and screen orientation of the + web application. Alternatively, and again as an example, the user agent + could install the web application into a list of bookmarks within + the user agent itself.

@@ -2249,6 +2242,74 @@

available underneath an icon).

+
+

+ Launching a web application +

+

+ At the discretion of the operating system or user agent, run the steps + to [=launch a web application=] with a + [=Document/processed manifest=]. +

+

+ This would typically take place when the user selects an [=installed=] + web app from an app launching UI surface e.g., a home screen, launcher + or start menu. +

+

+ The steps to + launch a web + application is given by the following algorithm. The algorithm + takes a [=Document/processed manifest=] |manifest:processed manifest|, + an optional [=URL=] |target URL:URL|, an optional [=POST resource=] + |POST resource| and returns an [=application context=]. +

+

+ |target URL|, if given, MUST be [=manifest/within scope=] of + |manifest|. +

+

+ Other specifications MAY replace this algorithm's steps with their own + steps. This replacement will take effect for all invocations of + [=launch a web application=]. +

+

+ This algorithm is replaceable to allow an experimental + launch_handler + manifest field to configure the behavior of all web application + launches. The replacement algorithm invokes [=create a new + application context=] by default but under certain conditions behaves + differently. +

+
    +
  1. Return the result of running the steps to [=create a new + application context=] passing |manifest|, |target URL| and + |POST resource|. +
  2. +
+

+ The steps to create a new application context + is given by the following algorithm. The algorithm takes a + [=Document/processed manifest=] |manifest:processed manifest|, + an optional [=URL=] |target URL:URL|, an optional [=POST resource=] + |POST resource| and returns an [=application context=]. +

+
    +
  1. If |target URL| was not given, set |target URL| to [=start URL=]. +
  2. +
  3. Let |traversable| be the result of running the steps to [=create + a fresh top-level traversable=] with |target URL| and + |POST resource|. +
  4. +
  5. Let |browsing context| be the |traversable|'s + active browsing context. +
  6. +
  7. [=Apply=] |manifest| to |browsing context|. +
  8. +
  9. Return |browsing context|. +
  10. +
+

Privacy and security considerations