|
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,53 @@ <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. |
| 822 | + </p> |
| 823 | + <p>The |id| is used by user agents uniquely identify the application |
| 824 | + globally. When |id| is changed, it's recognized as a new app and |
| 825 | + can be installed separately. When id is not changed, it can be used |
| 826 | + to find installed application to perform manifest update. |
| 827 | + </p> |
| 828 | + <p> |
| 829 | + The |id| can also be used by third party entities such as PWA stores |
| 830 | + to uniquely identify and reference web apps |
| 831 | + </p> |
| 832 | + <p> |
| 833 | + To <dfn>process the `id` member</dfn>, given [=object=] |
| 834 | + |json:JSON|, [=ordered map=] |manifest:ordered map|.: |
| 835 | + </p> |
| 836 | + <ol class="algorithm"> |
| 837 | + <li>If the type of |json|["id"] is not [=string=], return. |
| 838 | + </li> |
| 839 | + <li>Let |id:URL| be the result of [=URL Parser|parsing=] |
| 840 | + (<var>start URL's origin</var> + "/" + |json|["id"]). |
| 841 | + </li> |
| 842 | + <li>If |id| is failure, return. |
| 843 | + </li> |
| 844 | + <li>Otherwise, set |manifest|["id"] to |start URL|. |
| 845 | + </li> |
| 846 | + </ol> |
| 847 | + <aside class="example"> |
| 848 | + <p> |
| 849 | + For example, if the |start URL| is |
| 850 | + <samp>https://example.com/resources/start</samp>, |
| 851 | + and the value of [=manifest/id=] is <samp>"1"</samp>, then the |
| 852 | + processed result is <samp>https://example.com/1</samp>. If the |
| 853 | + value of [=manifest/id=] is <samp>""</samp>, then the processed |
| 854 | + result is <samp>https://example.com/</samp>. If [=manifest/id=] |
| 855 | + not specified, then the processed result is |
| 856 | + <samp>https://example.com/start</samp>. |
| 857 | + |
| 858 | + </p> |
| 859 | + </aside> |
| 860 | + </section> |
811 | 861 | <section> |
812 | 862 | <h3> |
813 | 863 | `theme_color` member |
@@ -1084,6 +1134,9 @@ <h3> |
1084 | 1134 | <li>[=Process the `start_url` member=] passing |json|, |manifest|, |
1085 | 1135 | |manifest URL|, and |document URL|. |
1086 | 1136 | </li> |
| 1137 | + <li>[=Process the `id` member=] passing |json|, |manifest| and |
| 1138 | + |document URL|. |
| 1139 | + </li> |
1087 | 1140 | <li>[=Process the `scope` member=] passing |json|, |manifest|, and |
1088 | 1141 | |manifest URL|. |
1089 | 1142 | </li> |
|
0 commit comments