Skip to content

Commit fa084d2

Browse files
committed
Add IDL section and define IDL for some of the members
1 parent 8c837b6 commit fa084d2

File tree

1 file changed

+44
-30
lines changed

1 file changed

+44
-30
lines changed

index.html

Lines changed: 44 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -295,34 +295,33 @@ <h3>
295295
<code>short_name</code>).
296296
</p>
297297
</section>
298-
<section>
298+
<section data-link-for="webappmanifest">
299299
<h3>
300300
Application's name
301301
</h3>
302302
<p>
303303
The <dfn>application's name</dfn> is derived from either the
304-
<a><code>name</code> member</a> or <a><code>short_name</code>
305-
member</a> (if either is present) - otherwise, it is generated by the
304+
<a><code>name</code></a> member or <a><code>short_name</code></a>
305+
member (if either is present) - otherwise, it is generated by the
306306
user agent or provided by the end-user.
307307
</p>
308308
<p>
309309
When either member is missing from the manifest, a user agent MAY use
310-
the <a><code>name</code> member</a> as a fallback for the
311-
<a><code>short_name</code> member</a> or vice versa.
310+
the <a><code>name</code></a> member as a fallback for the
311+
<a><code>short_name</code></a> member or vice versa.
312312
</p>
313313
<p>
314-
If the <a data-lt="name member"><code>name</code></a> and <a data-lt=
315-
"short_name member"><code>short_name</code></a> members are
314+
If the <a><code>name</code></a> and <a><code>short_name</code></a> members are
316315
undefined, the user agent SHOULD assign a default name (e.g.,
317316
"Untitled"). Alternatively, a user agent MAY allow the end-user to
318317
input some text that can serve as the <a>application's name</a>.
319318
</p>
320319
<p>
321-
When both the <a data-lt="name member"><code>name</code></a> and
322-
<a data-lt="short_name member"><code>short_name</code></a> members
320+
When both the <a><code>name</code></a> and
321+
<a><code>short_name</code></a> members
323322
are present, it is left up to implementations to decide which member
324323
is best suited for the space available (e.g., the
325-
<a><code>short_name</code> member</a> might be better suited for the
324+
<a><code>short_name</code></a> member might be better suited for the
326325
space available underneath an icon).
327326
</p>
328327
</section>
@@ -1592,17 +1591,26 @@ <h3>
15921591
<div class="issue" data-number="446"></div>
15931592
</section>
15941593
</section>
1595-
<section>
1594+
<section data-dfn-for="webappmanifest" data-link-for="webappmanifest">
15961595
<h2>
15971596
Manifest and its members
15981597
</h2>
15991598
<p>
16001599
A <dfn>manifest</dfn> is a JSON document that contains startup
16011600
parameters and application defaults for when a web application is
1602-
launched. A manifest consists of a top-level <a>object</a> that
1603-
contains zero or more members. Each of the members are defined below,
1604-
as well as how their values are processed.
1601+
launched. A manifest consists of a top-level <dfn>WebAppManifest</dfn>
1602+
<a>object</a> that contains zero or more members.
1603+
Each of the members are defined below, as well as how their values are processed.
16051604
</p>
1605+
<pre class="idl">
1606+
dictionary WebAppManifest {
1607+
DirType? dir;
1608+
DOMString? lang;
1609+
DOMString? name;
1610+
DOMString? short_name;
1611+
DOMString? description;
1612+
};
1613+
</pre>
16061614
<p>
16071615
Every manifest has an associated <dfn>manifest URL</dfn>, which is the
16081616
[[!URL]] from which the <a>manifest</a> was fetched.
@@ -1612,45 +1620,48 @@ <h3>
16121620
<code>dir</code> member
16131621
</h3>
16141622
<p>
1615-
The <dfn><code>dir</code> member</dfn> specifies the <dfn>base
1623+
The <code><dfn>dir</dfn></code> member specifies the <dfn>base
16161624
direction</dfn> for the <a>directionality-capable members</a> of the
16171625
<a>manifest</a>. The <code>dir</code> member's value can be set to
16181626
one of the <a>text-direction values</a>.
16191627
</p>
1628+
<pre class="idl">
1629+
enum DirType { "ltr", "rtl", "auto" };
1630+
</pre>
16201631
<p>
16211632
The <dfn>directionality-capable members</dfn> are:
16221633
</p>
16231634
<ul>
16241635
<li>
1625-
<a><code>description</code> member</a>.
1636+
<a><code>description</code></a> member.
16261637
</li>
16271638
<li>
1628-
<a><code>name</code> member</a>.
1639+
<a><code>name</code></a> member.
16291640
</li>
16301641
<li>
1631-
<a><code>short_name</code> member</a>.
1642+
<a><code>short_name</code></a> member.
16321643
</li>
16331644
</ul>
16341645
<p>
1635-
The <dfn data-lt="text-direction value">text-direction values</dfn>
1636-
are the following, implying that the value of the
1646+
The <dfn data-lt="text-direction value">text-direction values</dfn> defined by
1647+
<dfn>DirType</dfn>, are the following, implying that the value of the
16371648
<a>directionality-capable members</a> is by default:
16381649
</p>
1639-
<dl>
1650+
<dl data-dfn-for="dirtype">
16401651
<dt>
1641-
<dfn data-lt="direction ltr">ltr</dfn>
1652+
<dfn>ltr</dfn>
16421653
</dt>
16431654
<dd>
16441655
left-to-right text.
16451656
</dd>
16461657
<dt>
1647-
<dfn data-lt="direction rtl">rtl</dfn>
1658+
<dfn>rtl</dfn>
16481659
</dt>
16491660
<dd>
16501661
right-to-left text.
16511662
</dd>
16521663
<dt>
1653-
<dfn data-lt="direction auto">auto</dfn>
1664+
<dfn>auto</dfn>
16541665
</dt>
16551666
<dd>
16561667
<a data-lt=
@@ -1663,7 +1674,7 @@ <h3>
16631674
end-user, the user agent MUST use the <a>base direction</a> to
16641675
compute directional runs and layout or position text correctly in
16651676
text containing mixed-direction sequences [[!BIDI]]. When the <a>base
1666-
direction</a> is "<a data-lt="direction auto">auto</a>" the user
1677+
direction</a> is "<a data-link-for="DirType">auto</a>" the user
16671678
agent MUST run the <a>steps to programmatically determine the
16681679
directionality of a member</a> - and use the resulting
16691680
<a>text-direction value</a> to assist in displaying the value of the
@@ -1729,7 +1740,7 @@ <h3>
17291740
<code>lang</code> member
17301741
</h3>
17311742
<p>
1732-
The <dfn id="member-lang"><code>lang</code> member</dfn> is a
1743+
The <code><dfn>lang</dfn></code> member is a
17331744
<a>language tag</a> (string) that specifies the primary language for
17341745
the values of the manifest's <a>directionality-capable members</a>
17351746
(as knowing the language can also help with directionality).
@@ -1794,7 +1805,7 @@ <h3>
17941805
<code title="">name</code> member
17951806
</h3>
17961807
<p>
1797-
The <dfn id="member-name"><code>name</code> member</dfn> is a
1808+
The <code><dfn>name</dfn></code> member is a
17981809
<a>string</a> that represents the name of the web application as it
17991810
is usually displayed to the user (e.g., amongst a list of other
18001811
applications, or as a label for an icon).
@@ -1828,7 +1839,7 @@ <h3>
18281839
<code title="">short_name</code> member
18291840
</h3>
18301841
<p>
1831-
The <dfn id="member-short_name"><code>short_name</code> member</dfn>
1842+
The <dfn><code>short_name</code></dfn> member
18321843
is a <a>string</a> that represents a short version of the name of the
18331844
web application. It is intended to be used where there is
18341845
insufficient space to display the full name of the web application.
@@ -1862,8 +1873,8 @@ <h3>
18621873
<code title="">description</code> member
18631874
</h3>
18641875
<p>
1865-
The <dfn id="member-description"><code>description</code>
1866-
member</dfn> allows the developer to describe the purpose of the web
1876+
The <dfn><code>description</code></dfn>
1877+
member allows the developer to describe the purpose of the web
18671878
application.
18681879
</p>
18691880
<p>
@@ -4454,6 +4465,9 @@ <h2>
44544465
proprietary tags/metadata, if they are present in a document).
44554466
</p>
44564467
</section>
4468+
<section id="idl-index" class="appendix">
4469+
<!-- All the Web IDL will magically appear here -->
4470+
</section>
44574471
<section class="appendix">
44584472
<h2>
44594473
JSON Schema

0 commit comments

Comments
 (0)