Skip to content

Commit

Permalink
Add IDL section and define IDL for some of the members
Browse files Browse the repository at this point in the history
  • Loading branch information
kenchris committed Sep 19, 2017
1 parent 8c837b6 commit fa084d2
Showing 1 changed file with 44 additions and 30 deletions.
74 changes: 44 additions & 30 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -295,34 +295,33 @@ <h3>
<code>short_name</code>).
</p>
</section>
<section>
<section data-link-for="webappmanifest">
<h3>
Application's name
</h3>
<p>
The <dfn>application's name</dfn> is derived from either the
<a><code>name</code> member</a> or <a><code>short_name</code>
member</a> (if either is present) - otherwise, it is generated by the
<a><code>name</code></a> member or <a><code>short_name</code></a>
member (if either is present) - otherwise, it is generated by the
user agent or provided by the end-user.
</p>
<p>
When either member is missing from the manifest, a user agent MAY use
the <a><code>name</code> member</a> as a fallback for the
<a><code>short_name</code> member</a> or vice versa.
the <a><code>name</code></a> member as a fallback for the
<a><code>short_name</code></a> member or vice versa.
</p>
<p>
If the <a data-lt="name member"><code>name</code></a> and <a data-lt=
"short_name member"><code>short_name</code></a> members are
If the <a><code>name</code></a> and <a><code>short_name</code></a> members are
undefined, the user agent SHOULD assign a default name (e.g.,
"Untitled"). Alternatively, a user agent MAY allow the end-user to
input some text that can serve as the <a>application's name</a>.
</p>
<p>
When both the <a data-lt="name member"><code>name</code></a> and
<a data-lt="short_name member"><code>short_name</code></a> members
When both the <a><code>name</code></a> and
<a><code>short_name</code></a> members
are present, it is left up to implementations to decide which member
is best suited for the space available (e.g., the
<a><code>short_name</code> member</a> might be better suited for the
<a><code>short_name</code></a> member might be better suited for the
space available underneath an icon).
</p>
</section>
Expand Down Expand Up @@ -1592,17 +1591,26 @@ <h3>
<div class="issue" data-number="446"></div>
</section>
</section>
<section>
<section data-dfn-for="webappmanifest" data-link-for="webappmanifest">
<h2>
Manifest and its members
</h2>
<p>
A <dfn>manifest</dfn> is a JSON document that contains startup
parameters and application defaults for when a web application is
launched. A manifest consists of a top-level <a>object</a> that
contains zero or more members. Each of the members are defined below,
as well as how their values are processed.
launched. A manifest consists of a top-level <dfn>WebAppManifest</dfn>
<a>object</a> that contains zero or more members.
Each of the members are defined below, as well as how their values are processed.
</p>
<pre class="idl">
dictionary WebAppManifest {
DirType? dir;
DOMString? lang;
DOMString? name;
DOMString? short_name;
DOMString? description;
};
</pre>
<p>
Every manifest has an associated <dfn>manifest URL</dfn>, which is the
[[!URL]] from which the <a>manifest</a> was fetched.
Expand All @@ -1612,45 +1620,48 @@ <h3>
<code>dir</code> member
</h3>
<p>
The <dfn><code>dir</code> member</dfn> specifies the <dfn>base
The <code><dfn>dir</dfn></code> member specifies the <dfn>base
direction</dfn> for the <a>directionality-capable members</a> of the
<a>manifest</a>. The <code>dir</code> member's value can be set to
one of the <a>text-direction values</a>.
</p>
<pre class="idl">
enum DirType { "ltr", "rtl", "auto" };
</pre>
<p>
The <dfn>directionality-capable members</dfn> are:
</p>
<ul>
<li>
<a><code>description</code> member</a>.
<a><code>description</code></a> member.
</li>
<li>
<a><code>name</code> member</a>.
<a><code>name</code></a> member.
</li>
<li>
<a><code>short_name</code> member</a>.
<a><code>short_name</code></a> member.
</li>
</ul>
<p>
The <dfn data-lt="text-direction value">text-direction values</dfn>
are the following, implying that the value of the
The <dfn data-lt="text-direction value">text-direction values</dfn> defined by
<dfn>DirType</dfn>, are the following, implying that the value of the
<a>directionality-capable members</a> is by default:
</p>
<dl>
<dl data-dfn-for="dirtype">
<dt>
<dfn data-lt="direction ltr">ltr</dfn>
<dfn>ltr</dfn>
</dt>
<dd>
left-to-right text.
</dd>
<dt>
<dfn data-lt="direction rtl">rtl</dfn>
<dfn>rtl</dfn>
</dt>
<dd>
right-to-left text.
</dd>
<dt>
<dfn data-lt="direction auto">auto</dfn>
<dfn>auto</dfn>
</dt>
<dd>
<a data-lt=
Expand All @@ -1663,7 +1674,7 @@ <h3>
end-user, the user agent MUST use the <a>base direction</a> to
compute directional runs and layout or position text correctly in
text containing mixed-direction sequences [[!BIDI]]. When the <a>base
direction</a> is "<a data-lt="direction auto">auto</a>" the user
direction</a> is "<a data-link-for="DirType">auto</a>" the user
agent MUST run the <a>steps to programmatically determine the
directionality of a member</a> - and use the resulting
<a>text-direction value</a> to assist in displaying the value of the
Expand Down Expand Up @@ -1729,7 +1740,7 @@ <h3>
<code>lang</code> member
</h3>
<p>
The <dfn id="member-lang"><code>lang</code> member</dfn> is a
The <code><dfn>lang</dfn></code> member is a
<a>language tag</a> (string) that specifies the primary language for
the values of the manifest's <a>directionality-capable members</a>
(as knowing the language can also help with directionality).
Expand Down Expand Up @@ -1794,7 +1805,7 @@ <h3>
<code title="">name</code> member
</h3>
<p>
The <dfn id="member-name"><code>name</code> member</dfn> is a
The <code><dfn>name</dfn></code> member is a
<a>string</a> that represents the name of the web application as it
is usually displayed to the user (e.g., amongst a list of other
applications, or as a label for an icon).
Expand Down Expand Up @@ -1828,7 +1839,7 @@ <h3>
<code title="">short_name</code> member
</h3>
<p>
The <dfn id="member-short_name"><code>short_name</code> member</dfn>
The <dfn><code>short_name</code></dfn> member
is a <a>string</a> that represents a short version of the name of the
web application. It is intended to be used where there is
insufficient space to display the full name of the web application.
Expand Down Expand Up @@ -1862,8 +1873,8 @@ <h3>
<code title="">description</code> member
</h3>
<p>
The <dfn id="member-description"><code>description</code>
member</dfn> allows the developer to describe the purpose of the web
The <dfn><code>description</code></dfn>
member allows the developer to describe the purpose of the web
application.
</p>
<p>
Expand Down Expand Up @@ -4454,6 +4465,9 @@ <h2>
proprietary tags/metadata, if they are present in a document).
</p>
</section>
<section id="idl-index" class="appendix">
<!-- All the Web IDL will magically appear here -->
</section>
<section class="appendix">
<h2>
JSON Schema
Expand Down

0 comments on commit fa084d2

Please sign in to comment.