Skip to content

Commit 35dad17

Browse files
committed
tidy
1 parent bbc8c4f commit 35dad17

File tree

1 file changed

+155
-132
lines changed

1 file changed

+155
-132
lines changed

index.html

Lines changed: 155 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,11 @@ <h3>
136136
<dfn data-export="" data-dfn-for="display mode">unframed</dfn>
137137
</dt>
138138
<dd>
139-
The isolated web application does not have any host-native title bar
140-
or [=window controls=] visible and with the web contents extended to
141-
the whole title bar area. The app can specify [=draggable region=]s
142-
in the web contents to create a customized title bar.
139+
The isolated web application does not have any host-native title
140+
bar or [=window controls=] visible and with the web contents
141+
extended to the whole title bar area. The app can specify
142+
[=draggable region=]s in the web contents to create a customized
143+
title bar.
143144
</dd>
144145
<dt>
145146
[=display mode/window-controls-overlay=]
@@ -1621,48 +1622,52 @@ <h3>
16211622
`scope_extensions` member
16221623
</h3>
16231624
<p>
1624-
The [=manifest's=] <code><dfn data-export="" data-dfn-for="manifest">
1625-
scope_extensions</dfn></code> member represents a list of an
1626-
application's desired [=scope extensions=].
1625+
The [=manifest's=] <code><dfn data-export="" data-dfn-for=
1626+
"manifest">scope_extensions</dfn></code> member represents a list of an
1627+
application's desired [=scope extensions=].
16271628
</p>
16281629
<p>
16291630
A <dfn>scope extension</dfn> extends the [=manifest/navigation scope of
1630-
a manifest=] by describing additional [=URLs=] that should be treated as
1631-
being [=within extended scope=].
1631+
a manifest=] by describing additional [=URLs=] that should be treated
1632+
as being [=within extended scope=].
16321633
</p>
16331634
<p>
1634-
The user agent MUST [=process the scope_extensions member=] and
1635-
[=validate scope extensions=] before it can [=apply extended scope=]
1636-
to allow additional [=URLs=] to be [=within extended scope=].
1635+
The user agent MUST [=process the scope_extensions member=] and
1636+
[=validate scope extensions=] before it can [=apply extended scope=] to
1637+
allow additional [=URLs=] to be [=within extended scope=].
16371638
</p>
16381639
<p>
16391640
A [=URL=] |target:URL| is <dfn>within extended scope</dfn> of a
16401641
|manifest:processed manifest| if the |target| is [=manifest/within
1641-
scope=] of the manifest or [=matches a validated scope extension=].
1642+
scope=] of the manifest or [=matches a validated scope extension=].
16421643
</p>
16431644
<p>
1644-
A [=URL=] |target:URL| <dfn>matches a validated scope extension</dfn> if
1645-
the following algorithm returns `true`, given [=URL=] |target:URL| and
1646-
[=list=] |validated_scope_extensions:list|:
1645+
A [=URL=] |target:URL| <dfn>matches a validated scope extension</dfn>
1646+
if the following algorithm returns `true`, given [=URL=] |target:URL|
1647+
and [=list=] |validated_scope_extensions:list|:
16471648
</p>
16481649
<ol class="algorithm">
16491650
<li>[=list/For each=] |entry:ordered map| of
1650-
|validated_scope_extensions:list|:
1651+
|validated_scope_extensions:list|:
16511652
<ol>
1652-
<li>
1653-
If |entry| is not an [=ordered map=], or |entry|["scope"] does not
1654-
[=map/exist=] or is not a [=URL=], continue.</li>
1653+
<li>If |entry| is not an [=ordered map=], or |entry|["scope"] does
1654+
not [=map/exist=] or is not a [=URL=], continue.
1655+
</li>
16551656
<li>Let [=URL=] |resolved_scope:URL| be |entry:ordered
1656-
map|["scope"]. </li>
1657+
map|["scope"].
1658+
</li>
16571659
<li>If |target| is [=URL/within scope=] of |resolved_scope|, return
1658-
`true`.</li>
1660+
`true`.
1661+
</li>
16591662
</ol>
1660-
<li>Return `false`.</li>
1663+
</li>
1664+
<li>Return `false`.
1665+
</li>
16611666
</ol>
16621667
<aside class="note">
1663-
The [=manifest's=] `scope` member only allows URLs to be considered for scope
1664-
from a single [=origin=]. The `scope_extensions` member allows URLs to
1665-
be considered from multiple [=origins=].
1668+
The [=manifest's=] `scope` member only allows URLs to be considered for
1669+
scope from a single [=origin=]. The `scope_extensions` member allows
1670+
URLs to be considered from multiple [=origins=].
16661671
</aside>
16671672
<section class="informative">
16681673
<h2>
@@ -1672,8 +1677,8 @@ <h2>
16721677
The following example shows a [=manifest=] for an application which
16731678
uses the `scope_extensions` member.
16741679
</p>
1675-
<pre class="example json"
1676-
title="https://example.com/manifest.webmanifest">
1680+
<pre class="example json" title=
1681+
"https://example.com/manifest.webmanifest">
16771682
{
16781683
"id": "https://example.com/app",
16791684
"name": "My App",
@@ -1691,145 +1696,163 @@ <h2>
16911696
</pre>
16921697
<p>
16931698
The following shows 2 [=web-app-origin-association=] files which can
1694-
be downloaded from the `.well-known` path of the [=origins=] listed
1699+
be downloaded from the `.well-known` path of the [=origins=] listed
16951700
in the `scope_extensions` member.
16961701
</p>
1697-
<pre class="example json"
1698-
title="https://example.co.uk/.well-known/web-app-origin-association">
1702+
<pre class="example json" title=
1703+
"https://example.co.uk/.well-known/web-app-origin-association">
16991704
{
17001705
"https://example.com/app": {
17011706
"scope": "/app"
17021707
}
17031708
}
17041709
</pre>
1705-
<pre class="example json"
1706-
title="https://help.example.com/.well-known/web-app-origin-association">
1710+
<pre class="example json" title=
1711+
"https://help.example.com/.well-known/web-app-origin-association">
17071712
{
17081713
"https://example.com/app": {
17091714
"scope": "/"
17101715
}
17111716
}
17121717
</pre>
1713-
<p>
1714-
The navigation scope of this app consists of URLs that are
1718+
<p>
1719+
The navigation scope of this app consists of URLs that are
17151720
[=URL/within scope=] of any of these [=URLs=]:
1716-
`https://example.com/app`, `https://example.co.uk/app`, and
1717-
`https://help.example.com`.
1721+
`https://example.com/app`, `https://example.co.uk/app`, and
1722+
`https://help.example.com`.
17181723
</p>
17191724
</section>
17201725
<section>
1721-
<h2>Processing the `scope_extensions` member</h2>
1722-
<p>
1723-
To <dfn>process the `scope_extensions` member</dfn>, given [=ordered
1724-
map=] |json:ordered map|, [=ordered map=] |manifest:ordered map|, and
1725-
[=URL=] |manifest_id:URL|:
1726-
</p>
1727-
<ol class="algorithm">
1728-
<li>Let |processedScopeExtensions:list| be a new [=list=].
1729-
</li>
1730-
<li>Set |manifest|["scope_extensions"] to |processedScopeExtensions|.
1731-
</li>
1732-
<li>If |json|["scope_extensions"] does not [=map/exist=] or is not a
1726+
<h2>
1727+
Processing the `scope_extensions` member
1728+
</h2>
1729+
<p>
1730+
To <dfn>process the `scope_extensions` member</dfn>, given [=ordered
1731+
map=] |json:ordered map|, [=ordered map=] |manifest:ordered map|, and
1732+
[=URL=] |manifest_id:URL|:
1733+
</p>
1734+
<ol class="algorithm">
1735+
<li>Let |processedScopeExtensions:list| be a new [=list=].
1736+
</li>
1737+
<li>Set |manifest|["scope_extensions"] to |processedScopeExtensions|.
1738+
</li>
1739+
<li>If |json|["scope_extensions"] does not [=map/exist=] or is not a
17331740
[=list=], return.
1734-
</li>
1735-
<li>[=list/For each=] |entry:ordered map| of |json|["scope_extensions"]:
1736-
<ol>
1737-
<li>If |entry|["type"] or |entry|["origin"] do not [=map/exist=],
1741+
</li>
1742+
<li>[=list/For each=] |entry:ordered map| of
1743+
|json|["scope_extensions"]:
1744+
<ol>
1745+
<li>If |entry|["type"] or |entry|["origin"] do not [=map/exist=],
17381746
[=iteration/continue=].
1739-
</li>
1740-
<li>If |entry|["type"] is not "origin", [=iteration/continue=].
1741-
</li>
1742-
<li>If |entry|["origin"] is not a [=string=],
1747+
</li>
1748+
<li>If |entry|["type"] is not "origin", [=iteration/continue=].
1749+
</li>
1750+
<li>If |entry|["origin"] is not a [=string=],
17431751
[=iteration/continue=].
1744-
</li>
1745-
<li>Let [=URL=] |origin_url:URL| be the result of [=URL
1752+
</li>
1753+
<li>Let [=URL=] |origin_url:URL| be the result of [=URL
17461754
Parser|parsing=] |entry|["origin"].
1747-
</li>
1748-
<li>If |origin_url| is a valid |URL| with [=URL/scheme=] "https",
1755+
</li>
1756+
<li>If |origin_url| is a valid |URL| with [=URL/scheme=] "https",
17491757
set |entry|["origin"] to the [=URL/origin=] of |origin_url|.
1750-
<li>Else [=iteration/continue=].</li>
1751-
<li>Validate |entry| using the algorithm from [=validate scope
1752-
extensions=], given [=ordered map=] |entry:ordered map| and
1753-
[=URL=] |manifest_id:URL|.
1754-
</li>
1755-
<li>If the previous step returned an error, [=iteration/continue=].
1756-
</li>
1757-
<li>
1758-
Else, set |entry|["scope"] to the returned [=URL=].
1759-
</li>
1760-
<li>[=list/Append=] |entry| to |processedScopeExtensions|.
1761-
</li>
1762-
</ol>
1763-
</li>
1764-
</ol>
1765-
<aside class="note">
1766-
`origin` is the only type of scope extension entry that is currently
1767-
specified. Other types may be added in the future to support different
1768-
use cases.
1769-
</aside>
1758+
</li>
1759+
<li>Else [=iteration/continue=].
1760+
</li>
1761+
<li>Validate |entry| using the algorithm from [=validate scope
1762+
extensions=], given [=ordered map=] |entry:ordered map| and
1763+
[=URL=] |manifest_id:URL|.
1764+
</li>
1765+
<li>If the previous step returned an error,
1766+
[=iteration/continue=].
1767+
</li>
1768+
<li>Else, set |entry|["scope"] to the returned [=URL=].
1769+
</li>
1770+
<li>[=list/Append=] |entry| to |processedScopeExtensions|.
1771+
</li>
1772+
</ol>
1773+
</li>
1774+
</ol>
1775+
<aside class="note">
1776+
`origin` is the only type of scope extension entry that is currently
1777+
specified. Other types may be added in the future to support
1778+
different use cases.
1779+
</aside>
17701780
</section>
17711781
<section class="informative">
1772-
<h3>The web-app-origin-association file</h3>
1773-
<p>A <dfn>web-app-origin-association</dfn> file is a JSON file that can
1782+
<h3>
1783+
The web-app-origin-association file
1784+
</h3>
1785+
<p>
1786+
A <dfn>web-app-origin-association</dfn> file is a JSON file that can
17741787
be used to [=validate scope extensions=]. It confirm an association
1775-
between the origin it is in with one or more web applications. It
1776-
identifies apps uniquely by referencing manifest [=manifest/ids=].
1788+
between the origin it is in with one or more web applications. It
1789+
identifies apps uniquely by referencing manifest [=manifest/ids=].
17771790
</p>
17781791
<p>
17791792
Given [=origin=] |origin:origin|, a [=web-app-origin-association=]
1780-
file is expected to be downloadable from
1793+
file is expected to be downloadable from
17811794
<code>[origin]/.well-known/web-app-origin-association</code>.
17821795
</p>
17831796
</section>
17841797
<section>
1785-
<h2>Validating scope extensions</h2>
1786-
<p>
1787-
To <dfn>validate scope extensions</dfn>, given [=ordered map=]
1788-
|extension:ordered map| and [=URL=] |manifest_id:URL|:
1789-
</p>
1790-
<ol class="algorithm">
1791-
<li>Let [=URL=] |origin_url:URL| be the [=URL=] of the [=URL/origin=]
1792-
|extension|["origin"].</li>
1793-
<li>Let [=URL=] |download_url:URL| be the result of [=URL
1794-
Parser|parsing=] "/.well-known/web-app-origin-association" using
1798+
<h2>
1799+
Validating scope extensions
1800+
</h2>
1801+
<p>
1802+
To <dfn>validate scope extensions</dfn>, given [=ordered map=]
1803+
|extension:ordered map| and [=URL=] |manifest_id:URL|:
1804+
</p>
1805+
<ol class="algorithm">
1806+
<li>Let [=URL=] |origin_url:URL| be the [=URL=] of the [=URL/origin=]
1807+
|extension|["origin"].
1808+
</li>
1809+
<li>Let [=URL=] |download_url:URL| be the result of [=URL
1810+
Parser|parsing=] "/.well-known/web-app-origin-association" using
17951811
|origin_url| as the base [=URL=].
1796-
</li>
1797-
<li>Let [=ordered map=] |json:ordered map| be the result of a [=fetch=]
1798-
given |download_url|.
1799-
</li>
1800-
<li>If the [=fetch=] failed, return an error.
1801-
</li>
1802-
<li>If |json|[|manifest_id|] does not [=map/exist=] or is not an
1803-
[=ordered map=], return an error.</li>
1804-
<li>Let [=string=] |scope:string| be "/".</li>
1805-
<li>If |json|[|manifest_id|]["scope"] [=map/exists=] and is a
1806-
[=string=], set |scope| to |json|[|manifest_id|]["scope"].
1807-
</li>
1808-
<li>Let [=URL=] |resolved_scope:URL| be the result of [=URL
1809-
Parser|parsing=] |scope| with |extension|["origin"] as the base
1812+
</li>
1813+
<li>Let [=ordered map=] |json:ordered map| be the result of a
1814+
[=fetch=] given |download_url|.
1815+
</li>
1816+
<li>If the [=fetch=] failed, return an error.
1817+
</li>
1818+
<li>If |json|[|manifest_id|] does not [=map/exist=] or is not an
1819+
[=ordered map=], return an error.
1820+
</li>
1821+
<li>Let [=string=] |scope:string| be "/".
1822+
</li>
1823+
<li>If |json|[|manifest_id|]["scope"] [=map/exists=] and is a
1824+
[=string=], set |scope| to |json|[|manifest_id|]["scope"].
1825+
</li>
1826+
<li>Let [=URL=] |resolved_scope:URL| be the result of [=URL
1827+
Parser|parsing=] |scope| with |extension|["origin"] as the base
18101828
[=URL=].
1811-
</li>
1812-
<li>Return |resolved_scope|.</li>
1813-
</ol>
1814-
</section>
1815-
<section>
1816-
<h2>Applying scope extensions</h2>
1817-
<p>The user agent MAY choose to apply <dfn>apply extended scope</dfn> in
1818-
some scenarios and [=manifest/scope=] in others.
1819-
</p>
1820-
<p>
1821-
If the [=application context=]'s [=navigable/active document=]'s [=URL=]
1822-
is not [=manifest/within scope=] but is [=within extended scope=], the
1823-
user agent SHOULD provide UI that allows the user to determine the
1824-
[=URL=] or at least its [=origin=], including whether it is served over
1825-
a secure connection. This UI SHOULD differ from any UI used when the
1826-
[=URL=] is not [=manifest/within scope=] of the [=application
1827-
context=]'s [=Document/processed manifest=], in order to make it obvious
1828-
that the user is still navigating the intended contents of the
1829-
application but also keep the user informed of the privacy and security
1830-
implications of navigating to a different [=origin=].
1831-
</p>
1832-
</section>
1829+
</li>
1830+
<li>Return |resolved_scope|.
1831+
</li>
1832+
</ol>
1833+
</section>
1834+
<section>
1835+
<h2>
1836+
Applying scope extensions
1837+
</h2>
1838+
<p>
1839+
The user agent MAY choose to apply <dfn>apply extended scope</dfn> in
1840+
some scenarios and [=manifest/scope=] in others.
1841+
</p>
1842+
<p>
1843+
If the [=application context=]'s [=navigable/active document=]'s
1844+
[=URL=] is not [=manifest/within scope=] but is [=within extended
1845+
scope=], the user agent SHOULD provide UI that allows the user to
1846+
determine the [=URL=] or at least its [=origin=], including whether
1847+
it is served over a secure connection. This UI SHOULD differ from any
1848+
UI used when the [=URL=] is not [=manifest/within scope=] of the
1849+
[=application context=]'s [=Document/processed manifest=], in order
1850+
to make it obvious that the user is still navigating the intended
1851+
contents of the application but also keep the user informed of the
1852+
privacy and security implications of navigating to a different
1853+
[=origin=].
1854+
</p>
1855+
</section>
18331856
</section>
18341857
<section>
18351858
<h2>

0 commit comments

Comments
 (0)