diff --git a/index.html b/index.html index d1ccdba8d..57699009c 100644 --- a/index.html +++ b/index.html @@ -1078,12 +1078,6 @@

The output from inputting an JSON document into this algorithm is a processed manifest.

-

- We need to catch throws associated with enumerations in IDL - conversion as the spec might gain new values over time not supported - by all existing browsers. This is especially important as we rely on - enums not defined in this specification. -

  1. Let json be the result of [=parse JSON from bytes=] text. If parsing throws an error: @@ -1112,6 +1106,16 @@

    value|converting=] json to a WebAppManifest dictionary.

  2. +
  3. Set |manifest|["{{dir}}"] to the result of running [=processing + the `dir` member=] given |manifest|["{{dir}}"]. +
  4. +
  5. Set |manifest|["{{display}}"] to the result of running + [=processing the `display` member=] given |manifest|["{{display}}"]. +
  6. +
  7. Set |manifest|["{{orientation}}"] to the result of running + [=processing the `orientation` member=] given + |manifest|["{{orientation}}"]. +
  8. Set manifest["start_url"] to the result of running processing the start_url member given manifest["start_url"], manifest URL, and @@ -1161,6 +1165,27 @@

  9. Return manifest.
+
+

+ Processing enumeration members +

+

+ The steps for processing an enumeration member are given + by the following algorithm. The algorithm takes a [=DOMString=] + |value| and a [=set=] of |supported values|. This algorithm returns + a `DOMString?`. +

+
    +
  1. Set |value| to [=ascii lowercased=] |value|. +
  2. +
  3. If |supported values| [=set/contain|contains=] |value|, then return + |value|. +
  4. +
  5. Otherwise, [=issue a developer warning=] that |value| is not + supported and return `undefined`. +
  6. +
+

@@ -1260,7 +1285,7 @@

           dictionary WebAppManifest {
-             TextDirectionType dir = "auto";
+             DOMString dir = "auto";
              DOMString lang;
              USVString name;
              USVString short_name;
@@ -1270,8 +1295,8 @@ 

sequence<USVString> categories; DOMString iarc_rating_id; USVString start_url; - DisplayModeType display = "browser"; - OrientationLockType orientation; + DOMString display = "browser"; + DOMString orientation; USVString theme_color; USVString background_color; USVString scope; @@ -1293,9 +1318,6 @@

dir member

-
-            enum TextDirectionType { "ltr", "rtl", "auto" };
-        

The dir member specifies the base direction for the localizable members of the manifest. The dir @@ -1347,8 +1369,8 @@

- When displaying the localizable members to an end-user, - if the base direction is ltr or rtl: + When displaying the localizable members to an end-user, if the + base direction is ltr or rtl:

  1. If the member is being @@ -1363,6 +1385,20 @@

    if the base direction is rtl.

+

+ The steps for processing the `dir` member is given by the + following algorithm. The algorithm takes a [=DOMString=] |value| as + an argument. This algorithm returns a `DOMString`. +

+
    +
  1. Let |value| be [=processing an enumeration member=] given |value| + and [=TextDirectionType=]. +
  2. +
  3. If |value| is undefined, then return "{{auto}}". +
  4. +
  5. Otherwise, return |value|. +
  6. +

@@ -1580,19 +1616,25 @@

display member

-
-          enum DisplayModeType {
-            "fullscreen",
-            "standalone",
-            "minimal-ui",
-            "browser"
-          };
-        

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.

+

+ The steps for processing the `display` member is given by + the following algorithm. The algorithm takes a [=DOMString=] |value| + as an argument. This algorithm returns a `DOMString`. +

+
    +
  1. Let |value| [=processing an enumeration member=] given |value| + and [=DisplayModeType=]. +
  2. +
  3. If |value| is `undefined`, then return "{{browser}}". +
  4. +
  5. Return |value|. +
  6. +

@@ -1634,6 +1676,16 @@

orientation of a top-level browsing context (such as via [[SCREEN-ORIENTATION]] API).

+

+ The steps for processing the `orientation` member is given + by the following algorithm. The algorithm takes a [=DOMString=] + |value| as an argument. This algorithm returns a `DOMString?`. +

+
    +
  1. Return [=processing an enumeration member=] given |value| and + {{OrientationLockType}}. +
  2. +