Skip to content

Commit bfca9ef

Browse files
committed
add example
1 parent 781ce4c commit bfca9ef

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

index.html

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -824,32 +824,30 @@ <h3>
824824
</p>
825825
<p>
826826
To <dfn>process the `id` member</dfn>, given [=object=]
827-
|json:JSON|, [=ordered map=] |manifest:ordered map|, and [=URL=]
828-
|document URL:URL|:
827+
|json:JSON|, [=ordered map=] |manifest:ordered map|.:
829828
</p>
830829
<ol class="algorithm">
831830
<li>If the type of |json|["id"] is not [=string=], return.
832831
</li>
833-
<li>If |json|["start_url"] is the empty string, return.
834-
</li>
835832
<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.
833+
(<var>start URL's origin</var> + "/" + |json|["id"]).
837834
</li>
838835
<li>If |id| is failure, return.
839836
</li>
840-
<li>If |id| is not <a>same origin</a> as <var>document
841-
URL</var>, return.
842-
</li>
843837
<li>Otherwise, set |manifest|["id"] to |start URL|.
844838
</li>
845839
</ol>
846840
<aside class="example">
847841
<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>.
842+
For example, if the |start URL| is
843+
<samp>https://example.com/resources/start</samp>,
844+
and the value of [=manifest/id=] is <samp>"1"</samp>, then the
845+
processed result is <samp>https://example.com/1</samp>. If the
846+
value of [=manifest/id=] is <samp>""</samp>, then the processed
847+
result is <samp>https://example.com/</samp>. If [=manifest/id=]
848+
not specified, then the processed result is
849+
<samp>https://example.com/start</samp>.
850+
853851
</p>
854852
</aside>
855853
</section>

0 commit comments

Comments
 (0)