Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add id member to manifest #988

Merged
merged 42 commits into from
Oct 5, 2021
Merged
Changes from 2 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
41b3b90
Add id member to manifest
philloooo Jul 15, 2021
d3885d2
Describe how a manifest can be updated with id
philloooo Jul 15, 2021
eb70381
address comments
philloooo Jul 20, 2021
fb3c3ff
Add example table
philloooo Jul 20, 2021
997c58a
re-order list
philloooo Jul 20, 2021
1d053f4
Merge branch 'gh-pages' into manifest-id
philloooo Jul 20, 2021
4afda14
quote all data
philloooo Jul 20, 2021
1817348
Update index.html
philloooo Aug 13, 2021
f743f90
update algorithm
philloooo Aug 13, 2021
93f83b7
Merge branch 'manifest-id' of github.com:philloooo/manifest into mani…
philloooo Aug 13, 2021
3659d38
Update index.html
philloooo Aug 13, 2021
c4016be
Merge branch 'manifest-id' of github.com:philloooo/manifest into mani…
philloooo Aug 13, 2021
5218606
update manifest update description
philloooo Aug 13, 2021
490a948
Clarify id equivalence
philloooo Aug 16, 2021
4e05505
refence url/equal concept in manifest update
philloooo Aug 16, 2021
e6c7461
remove vscode file
philloooo Aug 17, 2021
2cda2d4
Merge branch 'gh-pages' into manifest-id
philloooo Aug 19, 2021
4612577
Merge branch 'gh-pages' into manifest-id
philloooo Aug 27, 2021
73515ef
Update index.html
marcoscaceres Sep 21, 2021
b73baed
Update index.html
marcoscaceres Sep 21, 2021
579667e
Update index.html
marcoscaceres Sep 21, 2021
23c5ac7
Update index.html
marcoscaceres Sep 21, 2021
6c29909
Update index.html
marcoscaceres Sep 21, 2021
d29435f
Update index.html
marcoscaceres Sep 21, 2021
e1ab8a3
address some comments
philloooo Sep 21, 2021
d689b76
add more examples
philloooo Sep 21, 2021
66a1661
Update index.html
philloooo Sep 23, 2021
a006387
Update index.html
philloooo Sep 23, 2021
171575c
Update index.html
philloooo Sep 23, 2021
d4a7ac1
Update index.html
philloooo Sep 23, 2021
a222c0d
Update index.html
philloooo Sep 23, 2021
571f64c
update example for empty string
philloooo Sep 23, 2021
ee923ad
update processing algorithm
philloooo Sep 23, 2021
f9ca5a0
remove ascii code example
philloooo Sep 23, 2021
3a97b9e
Re-phrase identity equality section
philloooo Sep 24, 2021
bb5b117
remove fragment from default and processed id
philloooo Sep 27, 2021
3a70f20
Apply suggestions from code review
marcoscaceres Sep 29, 2021
f9d4edb
Update index.html
marcoscaceres Sep 29, 2021
f89eda6
remove manifest update
philloooo Sep 29, 2021
2fc8a9e
fix
philloooo Sep 29, 2021
f0817f0
Update index.html
marcoscaceres Oct 5, 2021
e753dc5
Apply suggestions from code review
marcoscaceres Oct 5, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ <h2>
</li>
<li>[=manifest/theme_color=]
</li>
<li>[=manifest/id=]
philloooo marked this conversation as resolved.
Show resolved Hide resolved
</li>
</ul>
<aside class="note">
<p>
Expand Down Expand Up @@ -242,6 +244,7 @@ <h3>
"sizes": "128x128"
}],
"scope": "/",
"id": "superracer",
"start_url": "/start.html",
"display": "fullscreen",
"orientation": "landscape",
Expand Down Expand Up @@ -808,6 +811,53 @@ <h3>
</p>
</section>
</section>
<section>
<h3>
`id` member
</h3>
<p>
The [=manifest's=] <code><dfn data-export="" data-dfn-for=
"manifest">id</dfn></code> member is a <a>string</a> that
represents the <dfn>id</dfn> for the application.
marcoscaceres marked this conversation as resolved.
Show resolved Hide resolved
</p>
<p>The |id| is used by user agents uniquely identify the application
philloooo marked this conversation as resolved.
Show resolved Hide resolved
globally. When |id| is changed, it's recognized as a new app and
philloooo marked this conversation as resolved.
Show resolved Hide resolved
philloooo marked this conversation as resolved.
Show resolved Hide resolved
can be installed separately. When id is not changed, it can be used
philloooo marked this conversation as resolved.
Show resolved Hide resolved
to find installed application to perform manifest update.
</p>
<p>
The |id| can also be used by third party entities such as PWA stores
philloooo marked this conversation as resolved.
Show resolved Hide resolved
to uniquely identify and reference web apps
</p>
<p>
To <dfn>process the `id` member</dfn>, given [=object=]
|json:JSON|, [=ordered map=] |manifest:ordered map|.:
philloooo marked this conversation as resolved.
Show resolved Hide resolved
</p>
<ol class="algorithm">
<li>If the type of |json|["id"] is not [=string=], return.
</li>
<li>Let |id:URL| be the result of [=URL Parser|parsing=]
philloooo marked this conversation as resolved.
Show resolved Hide resolved
(<var>start URL's origin</var> + "/" + |json|["id"]).
</li>
<li>If |id| is failure, return.
</li>
<li>Otherwise, set |manifest|["id"] to |start URL|.
philloooo marked this conversation as resolved.
Show resolved Hide resolved
</li>
</ol>
<aside class="example">
<p>
For example, if the |start URL| is
philloooo marked this conversation as resolved.
Show resolved Hide resolved
<samp>https://example.com/resources/start</samp>,
and the value of [=manifest/id=] is <samp>"1"</samp>, then the
processed result is <samp>https://example.com/1</samp>. If the
value of [=manifest/id=] is <samp>""</samp>, then the processed
philloooo marked this conversation as resolved.
Show resolved Hide resolved
result is <samp>https://example.com/</samp>. If [=manifest/id=]
not specified, then the processed result is
<samp>https://example.com/start</samp>.
philloooo marked this conversation as resolved.
Show resolved Hide resolved

</p>
</aside>
</section>
<section>
<h3>
`theme_color` member
Expand Down Expand Up @@ -1084,6 +1134,9 @@ <h3>
<li>[=Process the `start_url` member=] passing |json|, |manifest|,
|manifest URL|, and |document URL|.
</li>
<li>[=Process the `id` member=] passing |json|, |manifest| and
|document URL|.
</li>
<li>[=Process the `scope` member=] passing |json|, |manifest|, and
|manifest URL|.
</li>
Expand Down Expand Up @@ -1209,6 +1262,13 @@ <h3>
Updating the manifest
</h3>
<aside class="issue" data-number="446"></aside>
marcoscaceres marked this conversation as resolved.
Show resolved Hide resolved
<p>
marcoscaceres marked this conversation as resolved.
Show resolved Hide resolved
marcoscaceres marked this conversation as resolved.
Show resolved Hide resolved
User agents MAY re-fetch and update a manifest for an installed web
philloooo marked this conversation as resolved.
Show resolved Hide resolved
application and apply updated manifest to its <a>application
philloooo marked this conversation as resolved.
Show resolved Hide resolved
context</a>. When a manifest is processed, user agents can
philloooo marked this conversation as resolved.
Show resolved Hide resolved
determine whether it's an installed application that can be updated
or a new application by comparing application's [=manifest/id=].
philloooo marked this conversation as resolved.
Show resolved Hide resolved
</p>
</section>
</section>
</section>
Expand Down