Skip to content

Commit ffd31c2

Browse files
chore: tidy up index.html (#1012)
Co-authored-by: marcoscaceres <[email protected]>
1 parent 8102fc5 commit ffd31c2

File tree

1 file changed

+127
-57
lines changed

1 file changed

+127
-57
lines changed

index.html

Lines changed: 127 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -819,23 +819,24 @@ <h3>
819819
`id` member
820820
</h3>
821821
<p>
822-
The [=manifest's=] <code><dfn data-export="" data-dfn-for=
823-
"manifest" id="identity">id</dfn></code> member is a <a>string</a> that
824-
represents the <dfn>identity</dfn> for the application.
825-
The [=identity=] takes the form of a URL, which is same origin as the
822+
The [=manifest's=] <code><dfn data-export="" data-dfn-for="manifest"
823+
id="identity">id</dfn></code> member is a <a>string</a> that
824+
represents the <dfn>identity</dfn> for the application. The
825+
[=identity=] takes the form of a URL, which is same origin as the
826826
start URL.
827827
</p>
828-
<p>The [=identity=] is used by user agents to uniquely identify the
829-
application universally. When the user agent sees a manifest with an
830-
[=identity=] that does not correspond to an already-installed
831-
application, it SHOULD treat that manifest as a description of a
832-
distinct application, even if it is served from the same URL as that of
833-
another application. When the user agent sees a manifest where
834-
|manifest|["id"] [=url/equal|equals=] the [=identity=] of an
835-
already-installed application, it SHOULD be used as a signal that this
836-
manifest is a replacement for the already-installed application's
837-
manifest, and not a distinct application, even if it is served from a
838-
different URL than the one seen previously.
828+
<p>
829+
The [=identity=] is used by user agents to uniquely identify the
830+
application universally. When the user agent sees a manifest with an
831+
[=identity=] that does not correspond to an already-installed
832+
application, it SHOULD treat that manifest as a description of a
833+
distinct application, even if it is served from the same URL as that
834+
of another application. When the user agent sees a manifest where
835+
|manifest|["id"] [=url/equal|equals=] the [=identity=] of an
836+
already-installed application, it SHOULD be used as a signal that
837+
this manifest is a replacement for the already-installed
838+
application's manifest, and not a distinct application, even if it is
839+
served from a different URL than the one seen previously.
839840
</p>
840841
<p class="note">
841842
The [=identity=] can be used by a service that collects lists of web
@@ -847,8 +848,8 @@ <h3>
847848
[=URL/within scope=].
848849
</p>
849850
<p>
850-
To <dfn>process the `id` member</dfn>, given [=object=]
851-
|json:JSON|, [=ordered map=] |manifest:ordered map|:
851+
To <dfn>process the `id` member</dfn>, given [=object=] |json:JSON|,
852+
[=ordered map=] |manifest:ordered map|:
852853
</p>
853854
<ol class="algorithm">
854855
<li>Set |manifest|["id"] to |manifest|["start_url"].
@@ -857,74 +858,143 @@ <h3>
857858
</li>
858859
<li>If |json|["id"] is the empty string, return.
859860
</li>
860-
<li>Let |base origin| be |manifest|["start_url"]'s [=url/origin=].</li>
861-
<li>Let |id:URL| be the result of [=URL Parser|parsing=] |json|["id"] with |base origin| as the base URL.
861+
<li>Let |base origin| be |manifest|["start_url"]'s [=url/origin=].
862+
</li>
863+
<li>Let |id:URL| be the result of [=URL Parser|parsing=] |json|["id"]
864+
with |base origin| as the base URL.
862865
</li>
863866
<li>If |id| is failure, return.
864867
</li>
865-
<li>If |id| is not [=same origin=] as |manifest|["start_url"], return.
868+
<li>If |id| is not [=same origin=] as |manifest|["start_url"],
869+
return.
870+
</li>
871+
<li>Set |manifest|["id"] to |id|.
866872
</li>
867-
<li>Set |manifest|["id"] to |id|.</li>
868873
</ol>
869874
<aside class="example">
870-
<p>Below table shows some example cases of the |identity| processing algorithm.</p>
875+
<p>
876+
Below table shows some example cases of the |identity| processing
877+
algorithm.
878+
</p>
871879
<table class="data">
872880
<tr>
873-
<th>|json|["id"]</th>
874-
<th>|manifest|["start_url"]</th>
875-
<th>|manifest|["id"]</th>
881+
<th>
882+
|json|["id"]
883+
</th>
884+
<th>
885+
|manifest|["start_url"]
886+
</th>
887+
<th>
888+
|manifest|["id"]
889+
</th>
876890
</tr>
877891
<tr>
878-
<td><i>undefined</i></td>
879-
<td>"https://example.com/my-app/start"</td>
880-
<td>"https://example.com/my-app/start"</td>
892+
<td>
893+
<i>undefined</i>
894+
</td>
895+
<td>
896+
"https://example.com/my-app/start"
897+
</td>
898+
<td>
899+
"https://example.com/my-app/start"
900+
</td>
881901
</tr>
882902
<tr>
883-
<td><i>undefined</i></td>
884-
<td>"https://example.com/my-app/#here"</td>
885-
<td>"https://example.com/my-app/#here"</td>
903+
<td>
904+
<i>undefined</i>
905+
</td>
906+
<td>
907+
"https://example.com/my-app/#here"
908+
</td>
909+
<td>
910+
"https://example.com/my-app/#here"
911+
</td>
886912
</tr>
887913
<tr>
888-
<td>""</td>
889-
<td>"https://example.com/my-app/start"</td>
890-
<td>"https://example.com/my-app/start"</td>
914+
<td>
915+
""
916+
</td>
917+
<td>
918+
"https://example.com/my-app/start"
919+
</td>
920+
<td>
921+
"https://example.com/my-app/start"
922+
</td>
891923
</tr>
892924
<tr>
893-
<td>"/"</td>
894-
<td>"https://example.com/my-app/start"</td>
895-
<td>"https://example.com/"</td>
925+
<td>
926+
"/"
927+
</td>
928+
<td>
929+
"https://example.com/my-app/start"
930+
</td>
931+
<td>
932+
"https://example.com/"
933+
</td>
896934
</tr>
897935
<tr>
898-
<td>"foo"</td>
899-
<td>"https://example.com/my-app/start"</td>
900-
<td>"https://example.com/foo"</td>
936+
<td>
937+
"foo"
938+
</td>
939+
<td>
940+
"https://example.com/my-app/start"
941+
</td>
942+
<td>
943+
"https://example.com/foo"
944+
</td>
901945
</tr>
902946
<tr>
903-
<td>"./foo"</td>
904-
<td>"https://example.com/my-app/start"</td>
905-
<td>"https://example.com/foo"</td>
947+
<td>
948+
"./foo"
949+
</td>
950+
<td>
951+
"https://example.com/my-app/start"
952+
</td>
953+
<td>
954+
"https://example.com/foo"
955+
</td>
906956
</tr>
907957
<tr>
908-
<td>"https://example.com/foo"</td>
909-
<td>"https://example.com/my-app/start"</td>
910-
<td>"https://example.com/foo"</td>
958+
<td>
959+
"https://example.com/foo"
960+
</td>
961+
<td>
962+
"https://example.com/my-app/start"
963+
</td>
964+
<td>
965+
"https://example.com/foo"
966+
</td>
911967
</tr>
912968
<tr>
913-
<td>"https://anothersite.com/foo"</td>
914-
<td>"https://example.com/my-app/start"</td>
915-
<td>"https://example.com/my-app/start"</td>
969+
<td>
970+
"https://anothersite.com/foo"
971+
</td>
972+
<td>
973+
"https://example.com/my-app/start"
974+
</td>
975+
<td>
976+
"https://example.com/my-app/start"
977+
</td>
916978
</tr>
917979
<tr>
918-
<td>"😀"</td>
919-
<td>"https://example.com/my-app/start"</td>
920-
<td>"https://example.com/%F0%9F%98%80"</td>
980+
<td>
981+
"😀"
982+
</td>
983+
<td>
984+
"https://example.com/my-app/start"
985+
</td>
986+
<td>
987+
"https://example.com/%F0%9F%98%80"
988+
</td>
921989
</tr>
922990
</table>
923-
<p>Since [=manifest/id=] is resolved against [=manifest/start_url=]'s [=URL/origin=], providing
924-
"../foo", "foo", "/foo", "./foo" all resolves to the same [=identifier=]. It is
925-
As such, best practice is to use a leading "/" to be explicit that
926-
the id is a root-relative url path. Also, standard
927-
encoding/decoding rules are apply to the id processing algorithm, as per the [[[URL]]].
991+
<p>
992+
Since [=manifest/id=] is resolved against [=manifest/start_url=]'s
993+
[=URL/origin=], providing "../foo", "foo", "/foo", "./foo" all
994+
resolves to the same [=identifier=]. It is As such, best practice
995+
is to use a leading "/" to be explicit that the id is a
996+
root-relative url path. Also, standard encoding/decoding rules are
997+
apply to the id processing algorithm, as per the [[[URL]]].
928998
</p>
929999
</aside>
9301000
</section>

0 commit comments

Comments
 (0)