diff --git a/index.html b/index.html index 5d3d9552f..6d690470d 100644 --- a/index.html +++ b/index.html @@ -502,6 +502,8 @@

|json:ordered map| and [=ordered map=] |manifest:ordered map|:

    +
  1. Set |manifest|["dir"] to "auto". +
  2. If |json|["dir"] doesn't [=map/exist=] or if |json|["dir"] is not a [=string=], return.
  3. @@ -679,6 +681,8 @@

    |json:ordered map| and [=ordered map=] |manifest:ordered map|:

      +
    1. Set |manifest|["display"] to "browser". +
    2. If |json|["display"] doesn't [=map/exist=] or |json|["display"] is not a a [=string=], return.
    3. @@ -773,6 +777,8 @@

      |manifest URL:URL|, and [=URL=] |document URL:URL|:

        +
      1. Set |manifest|["start_url"] to |document URL|. +
      2. If |json|["start_url"] doesn't [=map/exist=] or |json|["start_url"] is not a [=string=], return.
      3. @@ -784,8 +790,8 @@

      4. If |start URL| is failure, return.
      5. -
      6. If |start URL| is not same origin as document - URL, return. +
      7. If |start URL| is not same origin as |document URL|, + return.
      8. Otherwise, set |manifest|["start_url"] to |start URL|.
      9. @@ -859,8 +865,8 @@

        [=URL/within scope=].

        - To process the `id` member, given [=ordered map=] |json:JSON|, - [=ordered map=] |manifest:ordered map|: + To process the `id` member, given [=ordered map=] + |json:JSON|, [=ordered map=] |manifest:ordered map|:

        1. Set |manifest|["id"] to |manifest|["start_url"]. @@ -1267,21 +1273,14 @@

        -
      10. Let |manifest:ordered map| be a new [=ordered map=] «[ - "display" → "browser", "dir" → "auto", "start_url" → |document URL| - ]». +
      11. Let |manifest:ordered map| be an empty [=ordered map=].
      12. [=Process the `dir` member=] passing |json| and |manifest|.
      13. [=Process the `lang` member=] passing |json| and |manifest|.
      14. -
      15. [=list/For each=] |member:string| of [=list=] « "name", - "short_name" »: -
          -
        1. [=Process a text member=] passing |json|, |manifest|, and - |member|. -
        2. -
        +
      16. [=Process a text member=] passing |json|, |manifest|, and + "name".
      17. [=Process a text member=] passing |json|, |manifest|, and "short_name". @@ -1291,8 +1290,7 @@

      18. [=Process the `start_url` member=] passing |json|, |manifest|, |manifest URL|, and |document URL|.
      19. -
      20. [=Process the `id` member=] passing |json|, |manifest| and - |document URL|. +
      21. [=Process the `id` member=] passing |json| and |manifest|.
      22. If the [=document=]'s [=document|processed manifest=] is not null, and [=document=]'s [=document|processed manifest=]'s id is @@ -1302,13 +1300,11 @@

      23. [=Process the `scope` member=] passing |json|, |manifest|, and |manifest URL|.
      24. -
      25. [=list/For each=] |member:string| of [=list=] « "theme_color", - "background_color" »: -
          -
        1. [=Process a color member=] passing |json|, |manifest|, and - |member|. -
        2. -
        +
      26. [=Process a color member=] passing |json|, |manifest|, and + "theme_color". +
      27. +
      28. [=Process a color member=] passing |json|, |manifest|, and + "background_color".
      29. [=Process the `display` member=] passing |json| and |manifest|.
      30. @@ -1329,7 +1325,7 @@

        algorithm.

      31. Let [=document=]'s - processed manifest be |manifest|. + processed manifest be |manifest|.
      @@ -1987,9 +1983,8 @@

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

      @@ -1998,7 +1993,7 @@

      To process a shortcut, given [=ordered map=] |item:ordered - map| and |scope:URL|,: + map| and |scope:URL|,:

      1. Return failure if it's the case that: @@ -2020,8 +2015,8 @@

      2. If |url| is failure, return failure.
      3. -
      4. If |url| is not [=manifest/within scope=] of |scope|, - return failure. +
      5. If |url| is not [=manifest/within scope=] of |scope|, return + failure.
      6. Let |shortcut:ordered map| be |ordered map| «[ "url" → |url|, "name" → |item|["name"] ]». @@ -2207,8 +2202,8 @@

        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. + could install the web application into a list of bookmarks + within the user agent itself.

        @@ -2248,62 +2243,61 @@

        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=]. + 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. + 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=]. + 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 + 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. + 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|. + application context=] passing |manifest|, |target URL| and |POST + resource|.

        - 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=]. + 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. Let |traversable| be the result of running the steps to [=create - a fresh top-level traversable=] with |target URL| and - |POST resource|. + a fresh top-level traversable=] with |target URL| and |POST + resource|.
        3. -
        4. Let |browsing context| be the |traversable|'s - active browsing context. +
        5. Let |browsing context| be the |traversable|'s active browsing context.
        6. [=Apply=] |manifest| to |browsing context|.