|
201 | 201 | </li>
|
202 | 202 | <li>[=manifest/theme_color=]
|
203 | 203 | </li>
|
| 204 | + <li>[=manifest/id=] |
| 205 | + </li> |
204 | 206 | </ul>
|
205 | 207 | <aside class="note">
|
206 | 208 | <p>
|
|
242 | 244 | "sizes": "128x128"
|
243 | 245 | }],
|
244 | 246 | "scope": "/",
|
| 247 | + "id": "superracer", |
245 | 248 | "start_url": "/start.html",
|
246 | 249 | "display": "fullscreen",
|
247 | 250 | "orientation": "landscape",
|
@@ -808,6 +811,48 @@ <h3>
|
808 | 811 | </p>
|
809 | 812 | </section>
|
810 | 813 | </section>
|
| 814 | + <section> |
| 815 | + <h3> |
| 816 | + `id` member |
| 817 | + </h3> |
| 818 | + <p> |
| 819 | + The [=manifest's=] <code><dfn data-export="" data-dfn-for= |
| 820 | + "manifest">id</dfn></code> member is a <a>string</a> that |
| 821 | + represents the <dfn>id</dfn> for the application. It is used by user |
| 822 | + agents and third party entities to uniquely identify the application |
| 823 | + globally. |
| 824 | + </p> |
| 825 | + <p> |
| 826 | + To <dfn>process the `id` member</dfn>, given [=object=] |
| 827 | + |json:JSON|, [=ordered map=] |manifest:ordered map|, and [=URL=] |
| 828 | + |document URL:URL|: |
| 829 | + </p> |
| 830 | + <ol class="algorithm"> |
| 831 | + <li>If the type of |json|["id"] is not [=string=], return. |
| 832 | + </li> |
| 833 | + <li>If |json|["start_url"] is the empty string, return. |
| 834 | + </li> |
| 835 | + <li>Let |id:URL| be the result of [=URL Parser|parsing=] |
| 836 | + |json|["id"], using the origin of <var>document URL</var> as the base URL. |
| 837 | + </li> |
| 838 | + <li>If |id| is failure, return. |
| 839 | + </li> |
| 840 | + <li>If |id| is not <a>same origin</a> as <var>document |
| 841 | + URL</var>, return. |
| 842 | + </li> |
| 843 | + <li>Otherwise, set |manifest|["id"] to |start URL|. |
| 844 | + </li> |
| 845 | + </ol> |
| 846 | + <aside class="example"> |
| 847 | + <p> |
| 848 | + For example, if the value of [=manifest/start_url=] is |
| 849 | + <samp>../start_point.html</samp>, and the manifest's URL is |
| 850 | + <samp>https://example.com/resources/manifest.webmanifest</samp>, |
| 851 | + then the result of [=URL parser|parsing=] would be |
| 852 | + <samp>https://example.com/start_point.html</samp>. |
| 853 | + </p> |
| 854 | + </aside> |
| 855 | + </section> |
811 | 856 | <section>
|
812 | 857 | <h3>
|
813 | 858 | `theme_color` member
|
@@ -1084,6 +1129,9 @@ <h3>
|
1084 | 1129 | <li>[=Process the `start_url` member=] passing |json|, |manifest|,
|
1085 | 1130 | |manifest URL|, and |document URL|.
|
1086 | 1131 | </li>
|
| 1132 | + <li>[=Process the `id` member=] passing |json|, |manifest| and |
| 1133 | + |document URL|. |
| 1134 | + </li> |
1087 | 1135 | <li>[=Process the `scope` member=] passing |json|, |manifest|, and
|
1088 | 1136 | |manifest URL|.
|
1089 | 1137 | </li>
|
|
0 commit comments