Skip to content

Commit 781ce4c

Browse files
committed
Add id member
1 parent 26842d0 commit 781ce4c

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

index.html

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,8 @@ <h2>
201201
</li>
202202
<li>[=manifest/theme_color=]
203203
</li>
204+
<li>[=manifest/id=]
205+
</li>
204206
</ul>
205207
<aside class="note">
206208
<p>
@@ -242,6 +244,7 @@ <h3>
242244
"sizes": "128x128"
243245
}],
244246
"scope": "/",
247+
"id": "superracer",
245248
"start_url": "/start.html",
246249
"display": "fullscreen",
247250
"orientation": "landscape",
@@ -808,6 +811,48 @@ <h3>
808811
</p>
809812
</section>
810813
</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>
811856
<section>
812857
<h3>
813858
`theme_color` member
@@ -1084,6 +1129,9 @@ <h3>
10841129
<li>[=Process the `start_url` member=] passing |json|, |manifest|,
10851130
|manifest URL|, and |document URL|.
10861131
</li>
1132+
<li>[=Process the `id` member=] passing |json|, |manifest| and
1133+
|document URL|.
1134+
</li>
10871135
<li>[=Process the `scope` member=] passing |json|, |manifest|, and
10881136
|manifest URL|.
10891137
</li>

0 commit comments

Comments
 (0)