[html5] r2803 - [e] (0) Pimp My Spec changes... (should be no actual difference here)
whatwg at whatwg.org
whatwg at whatwg.org
Thu Feb 12 17:06:14 PST 2009
Author: ianh
Date: 2009-02-12 17:06:13 -0800 (Thu, 12 Feb 2009)
New Revision: 2803
Modified:
index
Log:
[e] (0) Pimp My Spec changes... (should be no actual difference here)
Modified: index
===================================================================
--- index 2009-02-12 10:46:18 UTC (rev 2802)
+++ index 2009-02-13 01:06:13 UTC (rev 2803)
@@ -1,4 +1,8 @@
-<!DOCTYPE html><html lang=en-US-x-hixie><title>HTML 5</title><link href=/style/specification rel=stylesheet><link href=/images/icon rel=icon><style type=text/css>
+<!DOCTYPE html><html lang=en-US-x-hixie><head>
+ <title>HTML 5</title>
+ <link href=/style/specification rel=stylesheet>
+ <link href=/images/icon rel=icon>
+ <style type=text/css>
h4 + .element, h4 + div + .element { margin-top: -2.5em; padding-top: 2em; }
h4 + p + .element { margin-top: -5em; padding-top: 4em; }
.element { background: #EEFFEE; color: black; margin: 0 0 1em -1em; padding: 0 1em 0.25em 0.75em; border-left: solid #99FF99 0.25em; }
@@ -18,7 +22,9 @@
.rfc2119.m\ust::after { content: '\2605'; }
.rfc2119.s\hould::after { content: '\2606'; }
[hidden] { display: none; }
- </style><link href=status.css rel=stylesheet><script>
+ </style>
+ <link href=status.css rel=stylesheet>
+ <script>
function load(script) {
var e = document.createElement('script');
e.setAttribute('src', script);
@@ -29,15 +35,18 @@
load('dfn.js');
load('toc.js');
}
- </script><body class=draft onload=init()>
+ </script>
+ </head>
+ <body class=draft onload=init()>
<div class=head>
<p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
<h1>HTML 5</h1>
- <h2 class="no-num no-toc" id=draft-recommendation-—-date:-01-jan-1901>Draft Recommendation — 12 February 2009</h2>
+ <h2 class="no-num no-toc" id=draft-recommendation-—-date:-01-jan-1901>Draft Recommendation — 13 February 2009</h2>
<p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
<p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
- <dl><dt>Multiple-page version:</dt>
+ <dl>
+ <dt>Multiple-page version:</dt>
<dd><strong><a href=http://www.whatwg.org/specs/web-apps/current-work/multipage/>http://whatwg.org/html5</a></strong></dd>
<dt>One-page version:</dt>
<dd><a href=http://www.whatwg.org/specs/web-apps/current-work/>http://www.whatwg.org/specs/web-apps/current-work/</a></dd>
@@ -55,14 +64,17 @@
<dd>To view and vote on feedback: <a href=http://www.whatwg.org/issues/>http://www.whatwg.org/issues/</a></dd>
<dt>Editor:</dt>
<dd>Ian Hickson, Google, ian at hixie.ch</dd>
- </dl><p class=copyright>© Copyright 2004-2009 Apple Computer, Inc.,
+ </dl>
+ <p class=copyright>© Copyright 2004-2009 Apple Computer, Inc.,
Mozilla Foundation, and Opera Software ASA.</p>
<p class=copyright>You are granted a license to use, reproduce
and create derivative works of this document.</p>
</div>
- <hr><h2 class="no-num no-toc" id=abstract>Abstract</h2>
+ <hr>
+ <h2 class="no-num no-toc" id=abstract>Abstract</h2>
+
<p>This specification evolves HTML and its related APIs to ease the
authoring of Web-based applications. Additions include context
menus, a direct-mode graphics canvas, a full duplex client-server
@@ -169,7 +181,9 @@
if (on)
doUpdate();
}
- </script><div id=configUI><p id=updatesUI><label><input id=updatesEnabled onchange=configureUpdates(this.checked) type=checkbox> Watch
+ </script>
+
+ <div id=configUI><p id=updatesUI><label><input id=updatesEnabled onchange=configureUpdates(this.checked) type=checkbox> Watch
for updates</label></div>
<p id=updatesStatus></p>
@@ -178,8 +192,10 @@
document.getElementById('updatesEnabled').checked = true;
configureUpdates(true);
}
- </script><h3 class="no-num no-toc" id=stability-0>Stability</h3>
+ </script>
+ <h3 class="no-num no-toc" id=stability-0>Stability</h3>
+
<p>Different parts of this specification are at different levels of
maturity.</p>
@@ -1098,9 +1114,12 @@
<li><a class=no-num href=#references>References</a></li>
<li><a class=no-num href=#acknowledgements>Acknowledgements</a></ol>
<!--end-toc-->
- <hr><h2 id=introduction><span class=secno>1 </span>Introduction</h2>
+ <hr>
+ <h2 id=introduction><span class=secno>1 </span>Introduction</h2>
+
+
<h3 id=background><span class=secno>1.1 </span>Background</h3>
<p><em>This section is non-normative.</em></p>
@@ -1355,8 +1374,11 @@
<p>This specification is divided into the following major
sections:</p>
- <dl><dt><a href=#infrastructure>Common Infrastructure</a></dt>
+ <dl>
+
+ <dt><a href=#infrastructure>Common Infrastructure</a></dt>
+
<dd>The conformance classes, algorithms, definitions, and the
common underpinnings of the rest of the specification.</dd>
@@ -1379,7 +1401,7 @@
<dt><a href=#browsers>Web Browsers</a></dt>
- <dd>HTML documents do not exist in a vacuum — this section
+ <dd>HTML documents do not exist in a vacuum — this section
defines many of the features that affect environments that deal
with multiple pages, links between pages, and running scripts.</dd>
@@ -1407,7 +1429,9 @@
to parse HTML.</dd>
- </dl><p>There are also a couple of appendices, defining <a href=#rendering>rendering rules</a> for Web browsers and listing
+ </dl>
+
+ <p>There are also a couple of appendices, defining <a href=#rendering>rendering rules</a> for Web browsers and listing
<a href=#no>areas that are out of scope</a> for this
specification.</p>
@@ -1517,13 +1541,16 @@
<code>svg:rect</code>, it refers to a name with the local name <var title="">localName</var> and the namespace given by the prefix, as
defined by the following table:</p>
- <dl><dt><code title="">xml</code></dt>
+ <dl>
+ <dt><code title="">xml</code></dt>
<dd><code>http://www.w3.org/XML/1998/namespace</code></dd>
<dt><code title="">html</code></dt>
<dd><code>http://www.w3.org/1999/xhtml</code></dd>
<dt><code title="">svg</code></dt>
<dd><code>http://www.w3.org/2000/svg</code></dd>
- </dl><p>Attribute names are said to be <dfn id=xml-compatible>XML-compatible</dfn> if they
+ </dl>
+
+ <p>Attribute names are said to be <dfn id=xml-compatible>XML-compatible</dfn> if they
match the <a href=http://www.w3.org/TR/REC-xml/#NT-Name><code title="">Name</code></a> production defined in XML, they contain no
U+003A COLON (:) characters, and their first three characters are
not an <a href=#ascii-case-insensitive>ASCII case-insensitive</a> match for the string
@@ -1670,8 +1697,10 @@
<p>User agents fall into several (overlapping) categories with
different conformance requirements.</p>
- <dl><dt id=interactive>Web browsers and other interactive user agents</dt>
+ <dl>
+ <dt id=interactive>Web browsers and other interactive user agents</dt>
+
<dd>
<p>Web browsers that support <a href=#xhtml5>XHTML</a> must process
@@ -1785,14 +1814,18 @@
<p>To put it another way, there are three types of conformance
criteria:</p>
- <ol><li>Criteria that can be expressed in a DTD.</li>
+ <ol>
+ <li>Criteria that can be expressed in a DTD.</li>
+
<li>Criteria that cannot be expressed by a DTD, but can still be
checked by a machine.</li>
<li>Criteria that can only be checked by a human.</li>
- </ol><p>A conformance checker must check for the first two. A simple
+ </ol>
+
+ <p>A conformance checker must check for the first two. A simple
DTD-based validator only checks for the first class of errors and
is therefore not a conforming conformance checker according to
this specification.</p>
@@ -1869,7 +1902,9 @@
</dd>
- </dl><p>Some conformance requirements are phrased as requirements on
+ </dl>
+
+ <p>Some conformance requirements are phrased as requirements on
elements, attributes, methods or objects. Such requirements fall
into two categories: those describing content model restrictions,
and those describing implementation behavior. The former category
@@ -1926,8 +1961,10 @@
<p>This specification relies on several other underlying
specifications.</p>
- <dl><dt>XML</dt>
+ <dl>
+ <dt>XML</dt>
+
<dd>
<p>Implementations that support XHTML5 must support some version
@@ -1940,8 +1977,8 @@
<dd>
- <p>The Document Object Model (DOM) is a representation — a
- model — of a document and its content. The DOM is not just
+ <p>The Document Object Model (DOM) is a representation — a
+ model — of a document and its content. The DOM is not just
an API; the conformance criteria of HTML implementations are
defined, in this specification, in terms of operations on the DOM.
<a href=#refsDOM3CORE>[DOM3CORE]</a></p>
@@ -1972,7 +2009,9 @@
</dd>
- </dl><p>This specification does not require support of any particular
+ </dl>
+
+ <p>This specification does not require support of any particular
network transport protocols, style sheet language, scripting
language, or any of the DOM and WebAPI specifications beyond those
described above. However, the language described by this
@@ -2120,7 +2159,9 @@
following algorithm must be run, with <var title="">characters</var>
being the set of characters that can be collected:</p>
- <ol><li><p>Let <var title="">input</var> and <var title="">position</var> be the same variables as those of the same
+ <ol>
+
+ <li><p>Let <var title="">input</var> and <var title="">position</var> be the same variables as those of the same
name in the algorithm that invoked these steps.</li>
<li><p>Let <var title="">result</var> be the empty string.</li>
@@ -2131,7 +2172,9 @@
<li><p>Return <var title="">result</var>.</li>
- </ol><p>The step <dfn id=skip-whitespace>skip whitespace</dfn> means that the user agent
+ </ol>
+
+ <p>The step <dfn id=skip-whitespace>skip whitespace</dfn> means that the user agent
must <a href=#collect-a-sequence-of-characters>collect a sequence of characters</a> that are <a href=#space-character title="space character">space characters</a>. The step <dfn id=skip-white_space-characters>skip
White_Space characters</dfn> means that the user agent must
<a href=#collect-a-sequence-of-characters>collect a sequence of characters</a> that are
@@ -2182,7 +2225,9 @@
or an error. Leading spaces are ignored. Trailing spaces and indeed
any trailing garbage characters are ignored.</p>
- <ol><li><p>Let <var title="">input</var> be the string being
+ <ol>
+
+ <li><p>Let <var title="">input</var> be the string being
parsed.</li>
<li><p>Let <var title="">position</var> be a pointer into <var title="">input</var>, initially pointing at the start of the
@@ -2211,8 +2256,10 @@
<p>If the next character is one of U+0030 DIGIT ZERO (0) .. U+0039
DIGIT NINE (9):</p>
- <ol><li>Multiply <var title="">value</var> by ten.</li>
+ <ol>
+ <li>Multiply <var title="">value</var> by ten.</li>
+
<li>Add the value of the current character (0..9) to <var title="">value</var>.</li>
<li>Advance <var title="">position</var> to the next
@@ -2222,12 +2269,17 @@
algorithm (that's the step within which these substeps find
themselves).</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>Return <var title="">value</var>.</li>
- </ol><h5 id=signed-integers><span class=secno>2.4.3.2 </span>Signed integers</h5>
+ </ol>
+
+ <h5 id=signed-integers><span class=secno>2.4.3.2 </span>Signed integers</h5>
+
<p>A string is a <dfn id=valid-integer>valid integer</dfn> if it consists of one of
more characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT
NINE (9), optionally prefixed with a U+002D HYPHEN-MINUS ("-")
@@ -2249,7 +2301,9 @@
are ignored. Trailing spaces and trailing garbage characters are
ignored.</p>
- <ol><li><p>Let <var title="">input</var> be the string being
+ <ol>
+
+ <li><p>Let <var title="">input</var> be the string being
parsed.</li>
<li><p>Let <var title="">position</var> be a pointer into <var title="">input</var>, initially pointing at the start of the
@@ -2269,15 +2323,19 @@
<p>If the character indicated by <var title="">position</var> (the
first character) is a U+002D HYPHEN-MINUS ("-") character:</p>
- <ol><li>Let <var title="">sign</var> be "negative".</li>
+ <ol>
+ <li>Let <var title="">sign</var> be "negative".</li>
+
<li>Advance <var title="">position</var> to the next
character.</li>
<li>If <var title="">position</var> is past the end of <var title="">input</var>, return an error.</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>If the next character is not one of U+0030 DIGIT ZERO (0)
.. U+0039 DIGIT NINE (9), then return an error.</li>
@@ -2290,8 +2348,10 @@
<p>If the next character is one of U+0030 DIGIT ZERO (0) .. U+0039
DIGIT NINE (9):</p>
- <ol><li>Multiply <var title="">value</var> by ten.</li>
+ <ol>
+ <li>Multiply <var title="">value</var> by ten.</li>
+
<li>Add the value of the current character (0..9) to <var title="">value</var>.</li>
<li>Advance <var title="">position</var> to the next
@@ -2301,32 +2361,45 @@
algorithm (that's the step within which these substeps find
themselves).</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>If <var title="">sign</var> is "positive", return <var title="">value</var>, otherwise return 0-<var title="">value</var>.</li>
- </ol><h5 id=real-numbers><span class=secno>2.4.3.3 </span>Real numbers</h5>
+ </ol>
+
+ <h5 id=real-numbers><span class=secno>2.4.3.3 </span>Real numbers</h5>
+
<p>A string is a <dfn id=valid-floating-point-number>valid floating point number</dfn> if it
consists of:</p>
- <ol class=brief><li>Optionally, a U+002D HYPHEN-MINUS ("-") character.</li>
+ <ol class=brief>
+ <li>Optionally, a U+002D HYPHEN-MINUS ("-") character.</li>
+
<li>A series of one or more characters in the range U+0030 DIGIT
ZERO (0) to U+0039 DIGIT NINE (9).</li>
<li>Optionally:
- <ol><li>A single U+002E FULL STOP (".") character.</li>
+ <ol>
+ <li>A single U+002E FULL STOP (".") character.</li>
+
<li>A series of one or more characters in the range U+0030 DIGIT
ZERO (0) to U+0039 DIGIT NINE (9).</li>
- </ol></li>
+ </ol>
+ </li>
+
<li>Optionally:
- <ol><li>Either a U+0065 LATIN SMALL LETTER E character or a U+0045
+ <ol>
+
+ <li>Either a U+0065 LATIN SMALL LETTER E character or a U+0045
LATIN CAPITAL LETTER E character.</li>
<li>Optionally, a U+002D HYPHEN-MINUS ("-") character or U+002B
@@ -2335,9 +2408,13 @@
<li>A series of characters in the range U+0030 DIGIT ZERO (0) to
U+0039 DIGIT NINE (9).</li>
- </ol></li>
+ </ol>
- </ol><p>A <a href=#valid-floating-point-number>valid floating point number</a> represents the number
+ </li>
+
+ </ol>
+
+ <p>A <a href=#valid-floating-point-number>valid floating point number</a> represents the number
obtained by multiplying the significand by ten raised to the power
of the exponent, where the significand is the first number,
interpreted as base ten (including the decimal point and the number
@@ -2351,7 +2428,7 @@
number if there is one). If there is no E, then the exponent is
treated as zero.</p>
- <p class=note>The values ±Infinity and NaN are not <a href=#valid-floating-point-number title="valid floating point number">valid floating point
+ <p class=note>The values ±Infinity and NaN are not <a href=#valid-floating-point-number title="valid floating point number">valid floating point
numbers</a>.</p>
<p>The <dfn id=best-representation-of-the-floating-point-number>best representation of the floating point number</dfn>
@@ -2366,7 +2443,9 @@
error. Leading spaces are ignored. Trailing spaces and garbage
characters are ignored.</p>
- <ol><li><p>Let <var title="">input</var> be the string being
+ <ol>
+
+ <li><p>Let <var title="">input</var> be the string being
parsed.</li>
<li><p>Let <var title="">position</var> be a pointer into <var title="">input</var>, initially pointing at the start of the
@@ -2387,15 +2466,19 @@
<p>If the character indicated by <var title="">position</var> is a
U+002D HYPHEN-MINUS ("-") character:</p>
- <ol><li>Change <var title="">value</var> and <var title="">divisor</var> to −1.</li>
+ <ol>
+ <li>Change <var title="">value</var> and <var title="">divisor</var> to −1.</li>
+
<li>Advance <var title="">position</var> to the next
character.</li>
<li>If <var title="">position</var> is past the end of <var title="">input</var>, return an error.</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>If the character indicated by <var title="">position</var>
is not one of U+0030 DIGIT ZERO (0) .. U+0039 DIGIT NINE (9), then
return an error.</li>
@@ -2413,7 +2496,9 @@
<li><p>If the character indicated by <var title="">position</var>
is a U+002E FULL STOP ("."), run these substeps:</p>
- <ol><li><p>Advance <var title="">position</var> to the next
+ <ol>
+
+ <li><p>Advance <var title="">position</var> to the next
character.</li>
<li><p>If <var title="">position</var> is past the end of <var title="">input</var>, or if the character indicated by <var title="">position</var> is not one of U+0030 DIGIT ZERO (0)
@@ -2436,13 +2521,17 @@
to the step labeled <i>fraction loop</i> in these
substeps.</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>If the character indicated by <var title="">position</var>
is a U+0065 LATIN SMALL LETTER E character or a U+0045 LATIN
CAPITAL LETTER E character, run these substeps:</p>
- <ol><li><p>Advance <var title="">position</var> to the next
+ <ol>
+
+ <li><p>Advance <var title="">position</var> to the next
character.</li>
<li><p>If <var title="">position</var> is past the end of <var title="">input</var>, then return <var title="">value</var>.</li>
@@ -2452,23 +2541,31 @@
<p>If the character indicated by <var title="">position</var> is
a U+002D HYPHEN-MINUS ("-") character:</p>
- <ol><li>Change <var title="">exponent</var> to −1.</li>
+ <ol>
+ <li>Change <var title="">exponent</var> to −1.</li>
+
<li>Advance <var title="">position</var> to the next
character.</li>
<li><p>If <var title="">position</var> is past the end of <var title="">input</var>, then return <var title="">value</var>.</li>
- </ol><p>Otherwise, if the character indicated by <var title="">position</var> is a U+002B PLUS SIGN ("+")
+ </ol>
+
+ <p>Otherwise, if the character indicated by <var title="">position</var> is a U+002B PLUS SIGN ("+")
character:</p>
- <ol><li>Advance <var title="">position</var> to the next
+ <ol>
+
+ <li>Advance <var title="">position</var> to the next
character.</li>
<li><p>If <var title="">position</var> is past the end of <var title="">input</var>, then return <var title="">value</var>.</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>If the character indicated by <var title="">position</var>
is not one of U+0030 DIGIT ZERO (0) .. U+0039 DIGIT NINE (9),
then return <var title="">value</var>.</li>
@@ -2480,12 +2577,17 @@
<li><p>Multiply <var title="">value</var> by ten raised to the
<var title="">exponent</var>th power.</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>Return <var title="">value</var>.</li>
- </ol><h5 id=ratios><span class=secno>2.4.3.4 </span>Ratios</h5>
+ </ol>
+
+ <h5 id=ratios><span class=secno>2.4.3.4 </span>Ratios</h5>
+
<p class=note>The algorithms described in this section are used by
the <code><a href=#the-progress-element>progress</a></code> and <code><a href=#the-meter-element>meter</a></code> elements.</p>
@@ -2495,30 +2597,53 @@
associated with each denominator punctuation character</dfn>, as
shown in the table below.</p>
- <table><thead><tr><th colspan=2>Denominator Punctuation Character</th>
+ <table>
+ <thead>
+ <tr>
+ <th colspan=2>Denominator Punctuation Character</th>
<th>Value</th>
- <tbody><tr><td>U+0025 PERCENT SIGN</td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>U+0025 PERCENT SIGN</td>
<td>%</td>
<td>100</td>
- <tr><td>U+066A ARABIC PERCENT SIGN</td>
- <td>٪</td>
+ </tr>
+ <tr>
+ <td>U+066A ARABIC PERCENT SIGN</td>
+ <td>٪</td>
<td>100</td>
- <tr><td>U+FE6A SMALL PERCENT SIGN</td>
- <td>﹪</td>
+ </tr>
+ <tr>
+ <td>U+FE6A SMALL PERCENT SIGN</td>
+ <td>﹪</td>
<td>100</td>
- <tr><td>U+FF05 FULLWIDTH PERCENT SIGN</td>
- <td>%</td>
+ </tr>
+ <tr>
+ <td>U+FF05 FULLWIDTH PERCENT SIGN</td>
+ <td>%</td>
<td>100</td>
- <tr><td>U+2030 PER MILLE SIGN</td>
- <td>‰</td>
+ </tr>
+ <tr>
+ <td>U+2030 PER MILLE SIGN</td>
+ <td>‰</td>
<td>1000</td>
- <tr><td>U+2031 PER TEN THOUSAND SIGN</td>
- <td>‱</td>
+ </tr>
+ <tr>
+ <td>U+2031 PER TEN THOUSAND SIGN</td>
+ <td>‱</td>
<td>10000</td>
- </table><p>The <dfn id=steps-for-finding-one-or-two-numbers-of-a-ratio-in-a-string>steps for finding one or two numbers of a ratio in a
+ </tr>
+ </tbody>
+ </table>
+
+ <p>The <dfn id=steps-for-finding-one-or-two-numbers-of-a-ratio-in-a-string>steps for finding one or two numbers of a ratio in a
string</dfn> are as follows:</p>
- <ol><li>If the string is empty, then return nothing and abort these
+ <ol>
+
+ <li>If the string is empty, then return nothing and abort these
steps.</li>
<li><a href=#find-a-number>Find a number</a> in the string according to the
@@ -2576,11 +2701,15 @@
<li>Otherwise, return <var title="">number1</var> and
<var title="">number2</var>.</li>
- </ol><p>The algorithm to <dfn id=find-a-number>find a number</dfn> is as follows. It is
+ </ol>
+
+ <p>The algorithm to <dfn id=find-a-number>find a number</dfn> is as follows. It is
given a string and a starting position, and returns either nothing,
a number, or an error condition.</p>
- <ol><li>Starting at the given starting position, ignore all characters
+ <ol>
+
+ <li>Starting at the given starting position, ignore all characters
in the given string until the first character that is either a
U+002E FULL STOP or one of the ten characters in the range U+0030
DIGIT ZERO to U+0039 DIGIT NINE.</li>
@@ -2605,7 +2734,10 @@
<li>Return <var title="">number</var>.</li>
- </ol><h5 id=percentages-and-dimensions><span class=secno>2.4.3.5 </span>Percentages and lengths</h5>
+ </ol>
+
+
+ <h5 id=percentages-and-dimensions><span class=secno>2.4.3.5 </span>Percentages and lengths</h5>
<!--(percentages are not used in html5)
<p>A string is a <dfn>valid dimension value</dfn> if it consists of
a character in the range U+0031 DIGIT ONE (1) to U+0039 DIGIT NINE
@@ -2631,7 +2763,9 @@
equal to 1.0, or an error; if a number is returned, then it is
further categorised as either a percentage or a length.</p>
- <ol><li><p>Let <var title="">input</var> be the string being
+ <ol>
+
+ <li><p>Let <var title="">input</var> be the string being
parsed.</li>
<li><p>Let <var title="">position</var> be a pointer into <var title="">input</var>, initially pointing at the start of the
@@ -2667,7 +2801,9 @@
<p>If the next character is a U+002E FULL STOP character (.):</p>
- <ol><li><p>Advance <var title="">position</var> to the next
+ <ol>
+
+ <li><p>Advance <var title="">position</var> to the next
character.</li>
<li><p>If the next character is not one of U+0030 DIGIT ZERO (0)
@@ -2682,8 +2818,10 @@
<li><p>Increment <var title="">value</var> by <var title="">fraction</var>.</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>If <var title="">position</var> is past the end of <var title="">input</var>, return <var title="">value</var> as a
length.</li>
@@ -2692,8 +2830,12 @@
<li><p>Return <var title="">value</var> as a length.</li>
- </ol><h5 id=lists-of-integers><span class=secno>2.4.3.6 </span>Lists of integers</h5>
+ </ol>
+
+
+ <h5 id=lists-of-integers><span class=secno>2.4.3.6 </span>Lists of integers</h5>
+
<p>A <dfn id=valid-list-of-integers>valid list of integers</dfn> is a number of <a href=#valid-integer title="valid integer">valid integers</a> separated by U+002C
COMMA characters, with no other characters (e.g. no <a href=#space-character title="space character">space characters</a>). In addition, there
might be restrictions on the number of integers that can be given,
@@ -2702,7 +2844,9 @@
<p>The <dfn id=rules-for-parsing-a-list-of-integers>rules for parsing a list of integers</dfn> are as
follows:</p>
- <ol><li><p>Let <var title="">input</var> be the string being
+ <ol>
+
+ <li><p>Let <var title="">input</var> be the string being
parsed.</li>
<li><p>Let <var title="">position</var> be a pointer into <var title="">input</var>, initially pointing at the start of the
@@ -2744,14 +2888,18 @@
<li><p><em>Parser:</em> If the character in the string <var title="">input</var> at position <var title="">position</var>
is:</p>
- <dl class=switch><dt>A U+002D HYPHEN-MINUS character</dt>
+ <dl class=switch>
+ <dt>A U+002D HYPHEN-MINUS character</dt>
+
<dd>
<p>Follow these substeps:</p>
- <ol><li>If <var title="">got number</var> is true, let <var title="">finished</var> be true.</li>
+ <ol>
+ <li>If <var title="">got number</var> is true, let <var title="">finished</var> be true.</li>
+
<li>If <var title="">finished</var> is true, skip to the next
step in the overall set of steps.</li>
@@ -2762,9 +2910,11 @@
<li>Let <var title="">started</var> be true.</li>
- </ol></dd>
+ </ol>
+ </dd>
+
<dt>A character in the range U+0030 DIGIT ZERO .. U+0039 DIGIT
NINE</dt>
@@ -2772,7 +2922,9 @@
<p>Follow these substeps:</p>
- <ol><li>If <var title="">finished</var> is true, skip to the next
+ <ol>
+
+ <li>If <var title="">finished</var> is true, skip to the next
step in the overall set of steps.</li>
<li>Multiply <var title="">value</var> by ten.</li>
@@ -2784,9 +2936,11 @@
<li>Let <var title="">got number</var> be true.</li>
- </ol></dd>
+ </ol>
+ </dd>
+
<dt>A U+0020 SPACE character</dt>
<dt>A U+002C COMMA character</dt>
<dt>A U+003B SEMICOLON character</dt>
@@ -2795,7 +2949,9 @@
<p>Follow these substeps:</p>
- <ol><li>If <var title="">got number</var> is false, return the <var title="">numbers</var> list and abort. This happens if an entry
+ <ol>
+
+ <li>If <var title="">got number</var> is false, return the <var title="">numbers</var> list and abort. This happens if an entry
in the list has no digits, as in "<code title="">1,2,x,4</code>".</li>
<li>If <var title="">negated</var> is true, then negate <var title="">value</var>.</li>
@@ -2804,9 +2960,11 @@
<li>Jump to step 4 in the overall set of steps.</li>
- </ol></dd>
+ </ol>
+ </dd>
+
<!-- <dt>A U+002E FULL STOP character</dt> -->
<dt>A character in the range U+0001 .. U+001F, <!-- space --> U+0021 .. U+002B, <!-- comma --> U+002D .. U+002F, <!-- digits --> U+003A, <!-- semicolon --> U+003C .. U+0040, <!-- a-z --> U+005B .. U+0060, <!-- A-Z --> U+007b .. U+007F
(i.e. any other non-alphabetic ASCII character)</dt>
@@ -2908,16 +3066,20 @@
<p>Follow these substeps:</p>
- <ol><li>If <var title="">got number</var> is true, let <var title="">finished</var> be true.</li>
+ <ol>
+ <li>If <var title="">got number</var> is true, let <var title="">finished</var> be true.</li>
+
<li>If <var title="">finished</var> is true, skip to the next
step in the overall set of steps.</li>
<li>Let <var title="">negated</var> be false.</li>
- </ol></dd>
+ </ol>
+ </dd>
+
<dt>Any other character</dt>
<!-- alphabetic a-z A-Z, and non-ASCII -->
@@ -2925,7 +3087,9 @@
<p>Follow these substeps:</p>
- <ol><li>If <var title="">finished</var> is true, skip to the next
+ <ol>
+
+ <li>If <var title="">finished</var> is true, skip to the next
step in the overall set of steps.</li>
<li>Let <var title="">negated</var> be false.</li>
@@ -2936,10 +3100,14 @@
<var title="">numbers</var> list, and abort. (The value in <var title="">value</var> is not appended to the list first; it is
dropped.)</li>
- </ol></dd>
+ </ol>
- </dl></li>
+ </dd>
+ </dl>
+
+ </li>
+
<li><p>Advance <var title="">position</var> to the next character
in <var title="">input</var>, or to beyond the end of the string if
there are no more characters.</li>
@@ -2955,8 +3123,11 @@
<li><p>Return the <var title="">numbers</var> list and
abort.</li>
- </ol><h5 id=lists-of-dimensions><span class=secno>2.4.3.7 </span>Lists of dimensions</h5>
+ </ol>
+
+ <h5 id=lists-of-dimensions><span class=secno>2.4.3.7 </span>Lists of dimensions</h5>
+
<!-- no definition of a type since no conforming feature uses this
syntax (it's only used in cols="" and rows="" on <frameset> -->
@@ -2965,7 +3136,9 @@
of a number and a unit, the unit being one of <i>percentage</i>,
<i>relative</i>, and <i>absolute</i>.</p>
- <ol><li><p>Let <var title="">raw input</var> be the string being
+ <ol>
+
+ <li><p>Let <var title="">raw input</var> be the string being
parsed.</li>
<li><p>If the last character in <var title="">raw input</var> is a
@@ -2982,8 +3155,10 @@
<p>For each token in <var title="">raw tokens</var>, run the
following substeps:</p>
- <ol><li><p>Let <var title="">input</var> be the token.</li>
+ <ol>
+ <li><p>Let <var title="">input</var> be the token.</li>
+
<li><p>Let <var title="">position</var> be a pointer into <var title="">input</var>, initially pointing at the start of the
string.</li>
@@ -3005,7 +3180,9 @@
<p>If the character at <var title="">position</var> is a U+002E
FULL STOP character (.), run these substeps:</p>
- <ol><li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> consisting
+ <ol>
+
+ <li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> consisting
of <a href=#space-character title="space character">space characters</a> and
characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT
NINE (9). Let <var title="">s</var> be the resulting
@@ -3019,7 +3196,9 @@
<p>If <var title="">s</var> is not the empty string, run these
subsubsteps:</p>
- <ol><li><p>Let <var title="">length</var> be the number of
+ <ol>
+
+ <li><p>Let <var title="">length</var> be the number of
characters in <var title="">s</var> (after the spaces were
removed).</li>
@@ -3029,10 +3208,14 @@
<li><p>Increment <var title="">value</var> by <var title="">fraction</var>.</li>
- </ol></li>
+ </ol>
- </ol></li>
+ </li>
+ </ol>
+
+ </li>
+
<li><p><a href=#skip-whitespace>Skip whitespace</a>.</li>
<li>
@@ -3052,12 +3235,17 @@
the number given by <var title="">value</var> and the unit given
by <var title="">unit</var>.</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>Return the list <var title="">result</var>.</li>
- </ol><h4 id=dates-and-times><span class=secno>2.4.4 </span>Dates and times</h4>
+ </ol>
+
+ <h4 id=dates-and-times><span class=secno>2.4.4 </span>Dates and times</h4>
+
<p>In the algorithms below, the <dfn id=number-of-days-in-month-month-of-year-year>number of days in month <var title="">month</var> of year <var title="">year</var></dfn> is:
<em>31</em> if <var title="">month</var> is 1, 3, 5, 7, 8, 10, or
12; <em>30</em> if <var title="">month</var> is 4, 6, 9, or 11;
@@ -3081,20 +3269,26 @@
<var title="">year</var> and month <var title="">month</var> if it
consists of the following components in the given order:</p>
- <ol><li>Four or more <a href=#concept-datetime-digit title=concept-datetime-digit>digits</a>, representing <var title="">year</var>, where <var title="">year</var> > 0</li>
+ <ol>
+ <li>Four or more <a href=#concept-datetime-digit title=concept-datetime-digit>digits</a>, representing <var title="">year</var>, where <var title="">year</var> > 0</li>
+
<li>A U+002D HYPHEN-MINUS character (-)</li>
<li>Two <a href=#concept-datetime-digit title=concept-datetime-digit>digits</a>,
representing the month <var title="">month</var>, in the range
- 1 ≤ <var title="">month</var> ≤ 12</li>
+ 1 ≤ <var title="">month</var> ≤ 12</li>
- </ol><p>The rules to <dfn id=parse-a-month-string>parse a month string</dfn> are as follows. This
+ </ol>
+
+ <p>The rules to <dfn id=parse-a-month-string>parse a month string</dfn> are as follows. This
will either return a year and month, or nothing. If at any point the
algorithm says that it "fails", this means that it is aborted at
that point and returns nothing.</p>
- <ol><li><p>Let <var title="">input</var> be the string being
+ <ol>
+
+ <li><p>Let <var title="">input</var> be the string being
parsed.</li>
<li><p>Let <var title="">position</var> be a pointer into <var title="">input</var>, initially pointing at the start of the
@@ -3108,12 +3302,16 @@
<li><p>Return <var title="">year</var> and <var title="">month</var>.</li>
- </ol><p>The rules to <dfn id=parse-a-month-component>parse a month component</dfn>, given an <var title="">input</var> string and a <var title="">position</var>, are
+ </ol>
+
+ <p>The rules to <dfn id=parse-a-month-component>parse a month component</dfn>, given an <var title="">input</var> string and a <var title="">position</var>, are
as follows. This will either return a year and a month, or
nothing. If at any point the algorithm says that it "fails", this
means that it is aborted at that point and returns nothing.</p>
- <ol><li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> in the range
+ <ol>
+
+ <li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> in the range
U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). If the collected
sequence is not at least four characters long, then
fail. Otherwise, interpret the resulting sequence as a base-ten
@@ -3133,13 +3331,16 @@
number be the <var title="">month</var>.</li>
<li><p>If <var title="">month</var> is not a number in the range
- 1 ≤ <var title="">month</var> ≤ 12, then
+ 1 ≤ <var title="">month</var> ≤ 12, then
fail.</li>
<li><p>Return <var title="">year</var> and <var title="">month</var>.</li>
- </ol><h5 id=dates><span class=secno>2.4.4.2 </span>Dates</h5>
+ </ol>
+
+ <h5 id=dates><span class=secno>2.4.4.2 </span>Dates</h5>
+
<p>A <dfn id=concept-date title=concept-date>date</dfn> consists of a specific
proleptic Gregorian date with no timezone information, consisting of
a year, a month, and a day. <a href=#refsGREGORIAN>[GREGORIAN]</a></p>
@@ -3149,21 +3350,27 @@
<var title="">day</var> if it consists of the following components
in the given order:</p>
- <ol><li>A <a href=#valid-month-string>valid month string</a>, representing <var title="">year</var> and <var title="">month</var></li>
+ <ol>
+ <li>A <a href=#valid-month-string>valid month string</a>, representing <var title="">year</var> and <var title="">month</var></li>
+
<li>A U+002D HYPHEN-MINUS character (-)</li>
<li>Two <a href=#concept-datetime-digit title=concept-datetime-digit>digits</a>,
representing <var title="">day</var>, in the range
- 1 ≤ <var title="">day</var> ≤ <var title="">maxday</var> where <var title="">maxday</var> is the <a href=#number-of-days-in-month-month-of-year-year title="number of days in month month of year year">number of days
+ 1 ≤ <var title="">day</var> ≤ <var title="">maxday</var> where <var title="">maxday</var> is the <a href=#number-of-days-in-month-month-of-year-year title="number of days in month month of year year">number of days
in the month <var title="">month</var> and year <var title="">year</var></a></li>
- </ol><p>The rules to <dfn id=parse-a-date-string>parse a date string</dfn> are as follows. This
+ </ol>
+
+ <p>The rules to <dfn id=parse-a-date-string>parse a date string</dfn> are as follows. This
will either return a date, or nothing. If at any point the algorithm
says that it "fails", this means that it is aborted at that point
and returns nothing.</p>
- <ol><li><p>Let <var title="">input</var> be the string being
+ <ol>
+
+ <li><p>Let <var title="">input</var> be the string being
parsed.</li>
<li><p>Let <var title="">position</var> be a pointer into <var title="">input</var>, initially pointing at the start of the
@@ -3178,12 +3385,16 @@
<li><p>Return <var title="">date</var>.</li>
- </ol><p>The rules to <dfn id=parse-a-date-component>parse a date component</dfn>, given an <var title="">input</var> string and a <var title="">position</var>, are
+ </ol>
+
+ <p>The rules to <dfn id=parse-a-date-component>parse a date component</dfn>, given an <var title="">input</var> string and a <var title="">position</var>, are
as follows. This will either return a year, a month, and a day, or
nothing. If at any point the algorithm says that it "fails", this
means that it is aborted at that point and returns nothing.</p>
- <ol><li><p><a href=#parse-a-month-component>Parse a month component</a> to obtain <var title="">year</var> and <var title="">month</var>. If this returns
+ <ol>
+
+ <li><p><a href=#parse-a-month-component>Parse a month component</a> to obtain <var title="">year</var> and <var title="">month</var>. If this returns
nothing, then fail.</li>
<li><p>Let <var title="">maxday</var> be the <a href=#number-of-days-in-month-month-of-year-year>number of days
@@ -3200,13 +3411,16 @@
number be the <var title="">day</var>.</li>
<li><p>If <var title="">day</var> is not a number in the range
- 1 ≤ <var title="">month</var> ≤ <var title="">maxday</var>, then fail.</li>
+ 1 ≤ <var title="">month</var> ≤ <var title="">maxday</var>, then fail.</li>
<li><p>Return <var title="">year</var>, <var title="">month</var>,
and <var title="">day</var>.</li>
- </ol><h5 id=times><span class=secno>2.4.4.3 </span>Times</h5>
+ </ol>
+
+ <h5 id=times><span class=secno>2.4.4.3 </span>Times</h5>
+
<p>A <dfn id=concept-time title=concept-time>time</dfn> consists of a specific
time with no timezone information, consisting of an hour, a minute,
a second, and a fraction of a second.</p>
@@ -3216,9 +3430,11 @@
second <var title="">second</var> if it consists of the following
components in the given order:</p>
- <ol><li>Two <a href=#concept-datetime-digit title=concept-datetime-digit>digits</a>,
+ <ol>
+
+ <li>Two <a href=#concept-datetime-digit title=concept-datetime-digit>digits</a>,
representing <var title="">hour</var>, in the range
- 0 ≤ <var title="">hour</var> ≤ 23</li>
+ 0 ≤ <var title="">hour</var> ≤ 23</li>
<li>A U+003A COLON character (:)</li>
@@ -3228,25 +3444,35 @@
<li>Optionally (required if <var title="">second</var> is
non-zero):
- <ol><li>A U+003A COLON character (:)</li>
+ <ol>
+ <li>A U+003A COLON character (:)</li>
+
<li>Two <a href=#concept-datetime-digit title=concept-datetime-digit>digits</a>,
representing the integer part of <var title="">second</var>, in
- the range 0 ≤ <var title="">s</var> ≤ 59</li>
+ the range 0 ≤ <var title="">s</var> ≤ 59</li>
<li>Optionally (required if <var title="">second</var> is not an
integer):
- <ol><li>A 002E FULL STOP character (.)</li>
+ <ol>
+ <li>A 002E FULL STOP character (.)</li>
+
<li>One or more <a href=#concept-datetime-digit title=concept-datetime-digit>digits</a>, representing the
fractional part of <var title="">second</var></li>
- </ol></li>
+ </ol>
- </ol></li>
+ </li>
- </ol><p class=note>The <var title="">second</var> component cannot be
+ </ol>
+
+ </li>
+
+ </ol>
+
+ <p class=note>The <var title="">second</var> component cannot be
60 or 61; leap seconds cannot be represented.</p>
<p>The rules to <dfn id=parse-a-time-string>parse a time string</dfn> are as follows. This
@@ -3254,7 +3480,9 @@
says that it "fails", this means that it is aborted at that point
and returns nothing.</p>
- <ol><li><p>Let <var title="">input</var> be the string being
+ <ol>
+
+ <li><p>Let <var title="">input</var> be the string being
parsed.</li>
<li><p>Let <var title="">position</var> be a pointer into <var title="">input</var>, initially pointing at the start of the
@@ -3270,19 +3498,23 @@
<li><p>Return <var title="">time</var>.</li>
- </ol><p>The rules to <dfn id=parse-a-time-component>parse a time component</dfn>, given an <var title="">input</var> string and a <var title="">position</var>, are
+ </ol>
+
+ <p>The rules to <dfn id=parse-a-time-component>parse a time component</dfn>, given an <var title="">input</var> string and a <var title="">position</var>, are
as follows. This will either return an hour, a minute, and a second,
or nothing. If at any point the algorithm says that it "fails", this
means that it is aborted at that point and returns nothing.</p>
- <ol><li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> in the range
+ <ol>
+
+ <li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> in the range
U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). If the collected
sequence is not exactly two characters long, then fail. Otherwise,
interpret the resulting sequence as a base-ten integer. Let that
number be the <var title="">hour</var>.</li>
<li>If <var title="">hour</var> is not a number in the range
- 0 ≤ <var title="">hour</var> ≤ 23, then
+ 0 ≤ <var title="">hour</var> ≤ 23, then
fail.</li>
<li><p>If <var title="">position</var> is beyond the end of <var title="">input</var> or if the character at <var title="">position</var> is not a U+003A COLON character, then
@@ -3296,7 +3528,7 @@
number be the <var title="">minute</var>.</li>
<li>If <var title="">minute</var> is not a number in the range
- 0 ≤ <var title="">minute</var> ≤ 59, then
+ 0 ≤ <var title="">minute</var> ≤ 59, then
fail.</li>
<li><p>Let <var title="">second</var> be a string with the value
@@ -3308,7 +3540,9 @@
<var title="">input</var> and the character at <var title="">position</var> is a U+003A COLON, then run these
substeps:</p>
- <ol><li><p>Advance <var title="">position</var> to the next character
+ <ol>
+
+ <li><p>Advance <var title="">position</var> to the next character
in <var title="">input</var>.</li>
<li><p>If <var title="">position</var> is beyond the end of <var title="">input</var>, or at the last character in <var title="">input</var>, or if the next <em>two</em> characters in
@@ -3323,21 +3557,27 @@
last character in the sequence is a U+002E FULL STOP character,
then fail. Otherwise, let the collected string be <var title="">second</var> instead of its previous value.</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>Interpret <var title="">second</var> as a base-ten number
(possibly with a fractional part). Let <var title="">second</var>
be that number instead of the string version.</li>
<li><p>If <var title="">second</var> is not a number in the range
- 0 ≤ <var title="">second</var> < 60, then
+ 0 ≤ <var title="">second</var> < 60, then
fail.</li>
<li><p>Return <var title="">hour</var>, <var title="">minute</var>,
and <var title="">second</var>.</li>
- </ol><h5 id=local-dates-and-times><span class=secno>2.4.4.4 </span>Local dates and times</h5>
+ </ol>
+
+
+ <h5 id=local-dates-and-times><span class=secno>2.4.4.4 </span>Local dates and times</h5>
+
<p>A <dfn id=concept-datetime-local title=concept-datetime-local>local date and time</dfn>
consists of a specific proleptic Gregorian date, consisting of a
year, a month, and a day, and a time, consisting of an hour, a
@@ -3348,18 +3588,24 @@
representing a date and time if it consists of the following
components in the given order:</p>
- <ol><li>A <a href=#valid-date-string>valid date string</a> representing the date.</li>
+ <ol>
+ <li>A <a href=#valid-date-string>valid date string</a> representing the date.</li>
+
<li>A U+0054 LATIN CAPITAL LETTER T character.</li>
<li>A <a href=#valid-time-string>valid time string</a> representing the time.</li>
- </ol><p>The rules to <dfn id=parse-a-local-date-and-time-string>parse a local date and time string</dfn> are as
+ </ol>
+
+ <p>The rules to <dfn id=parse-a-local-date-and-time-string>parse a local date and time string</dfn> are as
follows. This will either return a date and time, or nothing. If at
any point the algorithm says that it "fails", this means that it is
aborted at that point and returns nothing.</p>
- <ol><li><p>Let <var title="">input</var> be the string being
+ <ol>
+
+ <li><p>Let <var title="">input</var> be the string being
parsed.</li>
<li><p>Let <var title="">position</var> be a pointer into <var title="">input</var>, initially pointing at the start of the
@@ -3383,8 +3629,12 @@
<li><p>Return <var title="">date</var> and <var title="">time</var>.</li>
- </ol><h5 id=global-dates-and-times><span class=secno>2.4.4.5 </span>Global dates and times</h5>
+ </ol>
+
+
+ <h5 id=global-dates-and-times><span class=secno>2.4.4.5 </span>Global dates and times</h5>
+
<p>A <dfn id=concept-datetime title=concept-datetime>global date and time</dfn>
consists of a specific proleptic Gregorian date, consisting of a
year, a month, and a day, and a time, consisting of an hour, a
@@ -3400,38 +3650,50 @@
representing a date, time, and a timezone offset if it consists of
the following components in the given order:</p>
- <ol><li>A <a href=#valid-date-string>valid date string</a> representing the date</li>
+ <ol>
+ <li>A <a href=#valid-date-string>valid date string</a> representing the date</li>
+
<li>A U+0054 LATIN CAPITAL LETTER T character</li>
<li>A <a href=#valid-time-string>valid time string</a> representing the time</li>
<li>Either:
- <ul><li>A U+005A LATIN CAPITAL LETTER Z character, allowed only if
+ <ul>
+
+ <li>A U+005A LATIN CAPITAL LETTER Z character, allowed only if
the time zone is UTC</li>
<li>Or:
- <ol><li>Either a U+002B PLUS SIGN character (+) or a U+002D
+ <ol>
+
+ <li>Either a U+002B PLUS SIGN character (+) or a U+002D
HYPHEN-MINUS (-) character, representing the sign of the
timezone offset</li>
<li>Two <a href=#concept-datetime-digit title=concept-datetime-digit>digits</a>,
representing the hours component <var title="">hour</var> of
- the timezone offset, in the range 0 ≤ <var title="">hour</var> ≤ 23</li>
+ the timezone offset, in the range 0 ≤ <var title="">hour</var> ≤ 23</li>
<li>A U+003A COLON character (:)</li>
<li>Two <a href=#concept-datetime-digit title=concept-datetime-digit>digits</a>,
representing the minutes component <var title="">minute</var>
- of the timezone offset, in the range 0 ≤ <var title="">minute</var> ≤ 59</li>
+ of the timezone offset, in the range 0 ≤ <var title="">minute</var> ≤ 59</li>
- </ol></li>
+ </ol>
- </ul></li>
+ </li>
- </ol><p class=note>This format allows for time zone offsets from -23:59
+ </ul>
+
+ </li>
+
+ </ol>
+
+ <p class=note>This format allows for time zone offsets from -23:59
to +23:59. In practice, however, the range of actual time zones is
-12:00 to +14:00, and the minutes component of actual time zones is
always either 00, 30, or 45.</p>
@@ -3441,8 +3703,10 @@
<p>The following are some examples of dates written as <a href=#valid-global-date-and-time-string title="valid global date and time string">valid global date and
time strings</a>.</p>
- <dl><dt>"<code>0037-12-13T00:00Z</code>"</dt>
+ <dl>
+ <dt>"<code>0037-12-13T00:00Z</code>"</dt>
+
<dd>Midnight UTC on the birthday of Nero (the Roman Emperor).</dd>
<dt>"<code>1979-10-14T12:00:00.001-04:00</code>"</dt>
@@ -3458,9 +3722,13 @@
UTC, which is not a real time zone currently, but is nonetheless
allowed.</dd>
- </dl><p>Several things are notable about these dates:</p>
+ </dl>
- <ul><li>Years with fewer than four digits have to be
+ <p>Several things are notable about these dates:</p>
+
+ <ul>
+
+ <li>Years with fewer than four digits have to be
zero-padded. The date "37-12-13" would not be a valid date.</li>
<li>To unambiguously identify a moment in time prior to the
@@ -3481,15 +3749,19 @@
<li>Time zones differ based on daylight savings time.</li>
- </ul></div>
+ </ul>
+ </div>
+
<p>The rules to <dfn id=parse-a-global-date-and-time-string>parse a global date and time string</dfn> are
as follows. This will either return a time in UTC, with associated
timezone information for round tripping or display purposes, or
nothing. If at any point the algorithm says that it "fails", this
means that it is aborted at that point and returns nothing.</p>
- <ol><li><p>Let <var title="">input</var> be the string being
+ <ol>
+
+ <li><p>Let <var title="">input</var> be the string being
parsed.</li>
<li><p>Let <var title="">position</var> be a pointer into <var title="">input</var>, initially pointing at the start of the
@@ -3523,18 +3795,24 @@
<li><p>Return <var title="">time</var> and <var title="">timezone</var>.</li>
- </ol><p>The rules to <dfn id=parse-a-timezone-component>parse a timezone component</dfn>, given an <var title="">input</var> string and a <var title="">position</var>, are
+ </ol>
+
+ <p>The rules to <dfn id=parse-a-timezone-component>parse a timezone component</dfn>, given an <var title="">input</var> string and a <var title="">position</var>, are
as follows. This will either return timezone hours and timezone
minutes, or nothing. If at any point the algorithm says that it
"fails", this means that it is aborted at that point and returns
nothing.</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>If the character at <var title="">position</var> is a U+005A
LATIN CAPITAL LETTER Z, then:</p>
- <ol><li><p>Let <var title="">timezone<sub title="">hours</sub></var>
+ <ol>
+
+ <li><p>Let <var title="">timezone<sub title="">hours</sub></var>
be 0.</li>
<li><p>Let <var title="">timezone<sub title="">minutes</sub></var> be 0.</li>
@@ -3542,11 +3820,15 @@
<li><p>Advance <var title="">position</var> to the next character
in <var title="">input</var>.</li>
- </ol><p>Otherwise, if the character at <var title="">position</var> is
+ </ol>
+
+ <p>Otherwise, if the character at <var title="">position</var> is
either a U+002B PLUS SIGN ("+") or a U+002D HYPHEN-MINUS ("-"),
then:</p>
- <ol><li><p>If the character at <var title="">position</var> is a
+ <ol>
+
+ <li><p>If the character at <var title="">position</var> is a
U+002B PLUS SIGN ("+"), let <var title="">sign</var> be
"positive". Otherwise, it's a U+002D HYPHEN-MINUS ("-"); let <var title="">sign</var> be "negative".</li>
@@ -3560,7 +3842,7 @@
integer. Let that number be the <var title="">timezone<sub title="">hours</sub></var>.</li>
<li>If <var title="">timezone<sub title="">hours</sub></var> is
- not a number in the range 0 ≤ <var title="">timezone<sub title="">hours</sub></var> ≤ 23, then fail.</li>
+ not a number in the range 0 ≤ <var title="">timezone<sub title="">hours</sub></var> ≤ 23, then fail.</li>
<li>If <var title="">sign</var> is "negative", then negate <var title="">timezone<sub title="">hours</sub></var>.</li>
@@ -3575,17 +3857,22 @@
integer. Let that number be the <var title="">timezone<sub title="">minutes</sub></var>.</li>
<li>If <var title="">timezone<sub title="">minutes</sub></var> is
- not a number in the range 0 ≤ <var title="">timezone<sub title="">minutes</sub></var> ≤ 59, then fail.</li>
+ not a number in the range 0 ≤ <var title="">timezone<sub title="">minutes</sub></var> ≤ 59, then fail.</li>
<li>If <var title="">sign</var> is "negative", then negate <var title="">timezone<sub title="">minutes</sub></var>.</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>Return <var title="">timezone<sub title="">hours</sub></var>
and <var title="">timezone<sub title="">minutes</sub></var>.</li>
- </ol><h5 id=weeks><span class=secno>2.4.4.6 </span>Weeks</h5>
+ </ol>
+
+ <h5 id=weeks><span class=secno>2.4.4.6 </span>Weeks</h5>
+
<p>A <dfn id=concept-week title=concept-week>week</dfn> consists of a week-year
number and a week number representing a seven day period. Each
week-year in this calendaring system has either 52 weeks or 53
@@ -3616,23 +3903,29 @@
week-year <var title="">year</var> and week <var title="">week</var>
if it consists of the following components in the given order:</p>
- <ol><li>Four or more <a href=#concept-datetime-digit title=concept-datetime-digit>digits</a>, representing <var title="">year</var>, where <var title="">year</var> > 0</li>
+ <ol>
+ <li>Four or more <a href=#concept-datetime-digit title=concept-datetime-digit>digits</a>, representing <var title="">year</var>, where <var title="">year</var> > 0</li>
+
<li>A U+002D HYPHEN-MINUS character (-)</li>
<li>A U+0057 LATIN CAPITAL LETTER W character</li>
<li>Two <a href=#concept-datetime-digit title=concept-datetime-digit>digits</a>,
representing the week <var title="">week</var>, in the range
- 1 ≤ <var title="">week</var> ≤ <var title="">maxweek</var>, where <var title="">maxweek</var> is the
+ 1 ≤ <var title="">week</var> ≤ <var title="">maxweek</var>, where <var title="">maxweek</var> is the
<a href=#week-number-of-the-last-day>week number of the last day</a> of week-year <var title="">year</var></li>
- </ol><p>The rules to <dfn id=parse-a-week-string>parse a week string</dfn> are as follows. This
+ </ol>
+
+ <p>The rules to <dfn id=parse-a-week-string>parse a week string</dfn> are as follows. This
will either return a week-year number and week number, or
nothing. If at any point the algorithm says that it "fails", this
means that it is aborted at that point and returns nothing.</p>
- <ol><li><p>Let <var title="">input</var> be the string being
+ <ol>
+
+ <li><p>Let <var title="">input</var> be the string being
parsed.</li>
<li><p>Let <var title="">position</var> be a pointer into <var title="">input</var>, initially pointing at the start of the
@@ -3665,7 +3958,7 @@
the last day</a> of year <var title="">year</var>.</li>
<li><p>If <var title="">week</var> is not a number in the range
- 1 ≤ <var title="">week</var> ≤ <var title="">maxweek</var>, then fail.</li>
+ 1 ≤ <var title="">week</var> ≤ <var title="">maxweek</var>, then fail.</li>
<li><p>If <var title="">position</var> is <em>not</em> beyond the
end of <var title="">input</var>, then fail.</li>
@@ -3673,20 +3966,27 @@
<li><p>Return the week-year number <var title="">year</var> and the
week number <var title="">week</var>.</li>
- </ol><h5 id=vaguer-moments-in-time><span class=secno>2.4.4.7 </span>Vaguer moments in time</h5>
+ </ol>
+
+ <h5 id=vaguer-moments-in-time><span class=secno>2.4.4.7 </span>Vaguer moments in time</h5>
+
<p>A <dfn id=date-or-time-string>date or time string</dfn> consists of either a <a href=#concept-date title=concept-date>date</a>, a <a href=#concept-time title=concept-time>time</a>, or a <a href=#concept-datetime title=concept-datetime>global date and time</a>.</p>
<p>A string is a <dfn id=valid-date-or-time-string>valid date or time string</dfn> if it is also
one of the following:</p>
- <ul><li>A <a href=#valid-date-string>valid date string</a>.</li>
+ <ul>
+ <li>A <a href=#valid-date-string>valid date string</a>.</li>
+
<li>A <a href=#valid-time-string>valid time string</a>.</li>
<li>A <a href=#valid-global-date-and-time-string>valid global date and time string</a>.</li>
- </ul><p>A string is a <dfn id=valid-date-or-time-string-in-content>valid date or time string in content</dfn> if
+ </ul>
+
+ <p>A string is a <dfn id=valid-date-or-time-string-in-content>valid date or time string in content</dfn> if
it consists of zero or more <a href=#white_space>White_Space</a> characters,
followed by a <a href=#valid-date-or-time-string>valid date or time string</a>, followed by
zero or more further <a href=#white_space>White_Space</a> characters.</p>
@@ -3698,7 +3998,9 @@
at any point the algorithm says that it "fails", this means that it
is aborted at that point and returns nothing.</p>
- <ol><li><p>Let <var title="">input</var> be the string being
+ <ol>
+
+ <li><p>Let <var title="">input</var> be the string being
parsed.</li>
<li><p>Let <var title="">position</var> be a pointer into <var title="">input</var>, initially pointing at the start of the
@@ -3769,8 +4071,11 @@
</li>
- </ol><h4 id=colors><span class=secno>2.4.5 </span>Colors</h4>
+ </ol>
+
+ <h4 id=colors><span class=secno>2.4.5 </span>Colors</h4>
+
<p>A <dfn id=simple-color>simple color</dfn> consists of three 8-bit numbers in the
range 0..255, representing the red, green, and blue components of
the color respectively, in the sRGB color space. <a href=#refsSRGB>[SRGB]</a></p>
@@ -3796,7 +4101,9 @@
value. This algorithm will either return a <a href=#simple-color>simple color</a>
or an error.</p>
- <ol><li><p>Let <var title="">input</var> be the string being
+ <ol>
+
+ <li><p>Let <var title="">input</var> be the string being
parsed.</li>
<li><p>If <var title="">input</var> is not exactly seven characters
@@ -3825,11 +4132,15 @@
<li><p>Return <var title="">result</var>.</p>
- </ol><p>The <dfn id=rules-for-serialising-simple-color-values>rules for serialising simple color values</dfn> given a
+ </ol>
+
+ <p>The <dfn id=rules-for-serialising-simple-color-values>rules for serialising simple color values</dfn> given a
<a href=#simple-color>simple color</a> are as given in the following
algorithm:</p>
- <ol><li><p>Let <var title="">result</var> be a string consisting of a
+ <ol>
+
+ <li><p>Let <var title="">result</var> be a string consisting of a
single U+0023 NUMBER SIGN (#) character.</li>
<li><p>Convert the red, green, and blue components in turn to
@@ -3842,14 +4153,20 @@
<li><p>Return <var title="">result</var>, which will be a
<a href=#valid-lowercase-simple-color>valid lowercase simple color</a>.</li>
- </ol><hr><p>Some obsolete legacy attributes parse colors in a more
+ </ol>
+
+ <hr>
+
+ <p>Some obsolete legacy attributes parse colors in a more
complicated manner, using the <dfn id=rules-for-parsing-a-legacy-color-value>rules for parsing a legacy color
value</dfn>, which are given in the following algorithm. When
invoked, the steps must be followed in the order given, aborting at
the first step that returns a value. This algorithm will either
return a <a href=#simple-color>simple color</a> or an error.</p>
- <ol><li><p>Let <var title="">input</var> be the string being
+ <ol>
+
+ <li><p>Let <var title="">input</var> be the string being
parsed.</li>
<li><p>If <var title="">input</var> is the empty string, then
@@ -3870,7 +4187,9 @@
LATIN CAPITAL LETTER F, and U+0061 LATIN SMALL LETTER A .. U+0066
LATIN SMALL LETTER F, then run these substeps:</p>
- <ol><li><p>Let <var title="">result</var> be a <a href=#simple-color>simple
+ <ol>
+
+ <li><p>Let <var title="">result</var> be a <a href=#simple-color>simple
color</a>.</p>
<li><p>Interpret the second character of <var title="">input</var> as a hexadecimal digit; let the red
@@ -3887,8 +4206,10 @@
<li><p>Return <var title="">result</var>.</p>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>Replace any characters in <var title="">input</var> that
have a Unicode codepoint greater than U+FFFF (i.e. any characters
that are not in the basic multilingual plane) with the
@@ -3943,7 +4264,11 @@
<li><p>Return <var title="">result</var>.</p>
- </ol><hr><p class=note>The <a href=#canvas-context-2d title=canvas-context-2d>2D graphics
+ </ol>
+
+ <hr>
+
+ <p class=note>The <a href=#canvas-context-2d title=canvas-context-2d>2D graphics
context</a> has a separate color syntax that also handles
opacity.</p>
@@ -3977,7 +4302,9 @@
<p>When a user agent has to <dfn id=split-a-string-on-spaces>split a string on spaces</dfn>, it
must use the following algorithm:</p>
- <ol><li><p>Let <var title="">input</var> be the string being
+ <ol>
+
+ <li><p>Let <var title="">input</var> be the string being
parsed.</li>
<li><p>Let <var title="">position</var> be a pointer into <var title="">input</var>, initially pointing at the start of the
@@ -3991,21 +4318,29 @@
<li><p>While <var title="">position</var> is not past the end of
<var title="">input</var>:</p>
- <ol><li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> that are not
+ <ol>
+
+ <li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> that are not
<a href=#space-character title="space character">space characters</a>.</li>
<li><p>Add the string collected in the previous step to <var title="">tokens</var>.</li>
<li><p><a href=#skip-whitespace>Skip whitespace</a></li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>Return <var title="">tokens</var>.</li>
- </ol><p>When a user agent has to <dfn id=remove-a-token-from-a-string>remove a token from a string</dfn>,
+ </ol>
+
+ <p>When a user agent has to <dfn id=remove-a-token-from-a-string>remove a token from a string</dfn>,
it must use the following algorithm:</p>
- <ol><li><p>Let <var title="">input</var> be the string being
+ <ol>
+
+ <li><p>Let <var title="">input</var> be the string being
modified.</li>
<li><p>Let <var title="">token</var> be the token being removed. It
@@ -4023,7 +4358,9 @@
<li><p>If the character at <var title="">position</var> is a
<a href=#space-character>space character</a>:
- <ol><li><p>Append the character at <var title="">position</var> to
+ <ol>
+
+ <li><p>Append the character at <var title="">position</var> to
the end of <var title="">output</var>.</li>
<li><p>Increment <var title="">position</var> so it points at the
@@ -4031,8 +4368,10 @@
<li><p>Return to step 5 in the overall set of steps.</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>Otherwise, the character at <var title="">position</var> is
the first character of a token. <a href=#collect-a-sequence-of-characters>Collect a sequence of
characters</a> that are not <a href=#space-character title="space character">space
@@ -4040,8 +4379,10 @@
<li><p>If <var title="">s</var> is exactly equal to <var title="">token</var>, then:</p>
- <ol><li><p><a href=#skip-whitespace>Skip whitespace</a> (in <var title="">input</var>).</li>
+ <ol>
+ <li><p><a href=#skip-whitespace>Skip whitespace</a> (in <var title="">input</var>).</li>
+
<li><p>Remove any <a href=#space-character title="space character">space
characters</a> currently at the end of <var title="">output</var>.</li>
@@ -4050,13 +4391,17 @@
the empty string, append a single U+0020 SPACE character at the
end of <var title="">output</var>.</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>Otherwise, append <var title="">s</var> to the end of <var title="">output</var>.</li>
<li><p>Return to step 6 in the overall set of steps.</li>
- </ol><p class=note>This causes any occurrences of the token to be
+ </ol>
+
+ <p class=note>This causes any occurrences of the token to be
removed from the string, and any spaces that were surrounding the
token to be collapsed to a single space, except at the start and end
of the string, where such spaces are removed.</p>
@@ -4074,8 +4419,8 @@
and optionally surrounded by <a href=#space-character title="space character">space
characters</a>.</p>
- <p class=example>For instance, the string "<code title=""> a ,b,,d d </code>" consists of four
- tokens: "a", "b", the empty string, and "d d". Leading and
+ <p class=example>For instance, the string "<code title=""> a ,b,,d d </code>" consists of four
+ tokens: "a", "b", the empty string, and "d d". Leading and
trailing whitespace around each token doesn't count as part of the
token, and the empty string can be a token.</p>
@@ -4089,7 +4434,9 @@
<p>When a user agent has to <dfn id=split-a-string-on-commas>split a string on commas</dfn>, it
must use the following algorithm:</p>
- <ol><li><p>Let <var title="">input</var> be the string being
+ <ol>
+
+ <li><p>Let <var title="">input</var> be the string being
parsed.</li>
<li><p>Let <var title="">position</var> be a pointer into <var title="">input</var>, initially pointing at the start of the
@@ -4116,8 +4463,12 @@
<li><p>Return <var title="">tokens</var>.</li>
- </ol><h4 id=keywords-and-enumerated-attributes><span class=secno>2.4.8 </span>Keywords and enumerated attributes</h4>
+ </ol>
+
+
+ <h4 id=keywords-and-enumerated-attributes><span class=secno>2.4.8 </span>Keywords and enumerated attributes</h4>
+
<p>Some attributes are defined as taking one of a finite set of
keywords. Such attributes are called <dfn id=enumerated-attribute title="enumerated
attribute">enumerated attributes</dfn>. The keywords are each
@@ -4171,7 +4522,9 @@
<p>The <dfn id=rules-for-parsing-a-hash-name-reference>rules for parsing a hash-name reference</dfn> to an
element of type <var title="">type</var> are as follows:</p>
- <ol><li><p>If the string being parsed does not contain a U+0023 NUMBER
+ <ol>
+
+ <li><p>If the string being parsed does not contain a U+0023 NUMBER
SIGN character, or if the first such character in the string is the
last character in the string, then return null and abort these
steps.</li>
@@ -4195,8 +4548,13 @@
maybe they just don't know about combining dot above?
-->
- </ol><h3 id=urls><span class=secno>2.5 </span>URLs</h3>
+ </ol>
+
+
+
+ <h3 id=urls><span class=secno>2.5 </span>URLs</h3>
+
<p>This specification defines the term <a href=#url>URL</a>, and defines
various algorithms for dealing with URLs, because for historical
reasons the rules defined by the URI and IRI specifications are not
@@ -4211,8 +4569,10 @@
<p>A <a href=#url>URL</a> is a <dfn id=valid-url>valid URL</dfn> if at least one of
the following conditions holds:</p>
- <ul><li><p>The <a href=#url>URL</a> is a valid URI reference <a href=#refsRFC3986>[RFC3986]</a>.</li>
+ <ul>
+ <li><p>The <a href=#url>URL</a> is a valid URI reference <a href=#refsRFC3986>[RFC3986]</a>.</li>
+
<li><p>The <a href=#url>URL</a> is a valid IRI reference and it has no
query component. <a href=#refsRFC3987>[RFC3987]</a></li>
@@ -4222,10 +4582,14 @@
<li><p>The <a href=#url>URL</a> is a valid IRI reference and the <a href="#document's-character-encoding" title="document's character encoding">character encoding</a> of
the URL's <code>Document</code> is UTF-8 or UTF-16. <a href=#refsRFC3987>[RFC3987]</a></li>
- </ul><p>A <a href=#url>URL</a> has an associated <dfn id=url-character-encoding>URL character
+ </ul>
+
+ <p>A <a href=#url>URL</a> has an associated <dfn id=url-character-encoding>URL character
encoding</dfn>, determined as follows:</p>
- <dl class=switch><dt>If the URL came from a script (e.g. as an argument to a
+ <dl class=switch>
+
+ <dt>If the URL came from a script (e.g. as an argument to a
method)</dt>
<dd>The URL character encoding is the <a href="#script's-character-encoding">script's character
@@ -4241,7 +4605,9 @@
<dd>The URL character encoding is as defined.</dd>
- </dl><p class=note>The term "URL" in this specification is used in a
+ </dl>
+
+ <p class=note>The term "URL" in this specification is used in a
manner distinct from the precise technical meaning it is given in
RFC 3986. Readers familiar with that RFC will find it easier to read
<em>this</em> specification if they pretend the term "URL" as used
@@ -4253,7 +4619,9 @@
<p>To <dfn id=parse-a-url>parse a URL</dfn> <var title="">url</var> into its
component parts, the user agent must use the following steps:</p>
- <ol><li><p>Strip leading and trailing <a href=#space-character title="space
+ <ol>
+
+ <li><p>Strip leading and trailing <a href=#space-character title="space
character">space characters</a> from <var title="">url</var>.</li>
<li>
@@ -4261,7 +4629,9 @@
<p>Parse <var title="">url</var> in the manner defined by RFC
3986, with the following exceptions:</p>
- <ul><li>Add all characters with codepoints less than or equal to
+ <ul>
+
+ <li>Add all characters with codepoints less than or equal to
U+0020 or greater than or equal to U+007F to the
<unreserved> production.</li>
@@ -4295,8 +4665,10 @@
seems to treat ";" as if it was not in sub-delims, if the scheem
is "ftp". -->
- </ul></li>
+ </ul>
+ </li>
+
<li>
<p>If <var title="">url</var> doesn't match the
@@ -4308,8 +4680,10 @@
components of the URL are substrings of <var title="">url</var>
defined as follows:</p>
- <dl><dt><dfn id=url-scheme title=url-scheme><scheme></dfn></dt>
+ <dl>
+ <dt><dfn id=url-scheme title=url-scheme><scheme></dfn></dt>
+
<dd><p>The substring matched by the <scheme> production, if any.</dd>
@@ -4342,14 +4716,17 @@
<p>The substring matched by one of the following productions, if
one of them was matched:</p>
- <ul class=brief><li><path-abempty></li>
+ <ul class=brief>
+ <li><path-abempty></li>
<li><path-absolute></li>
<li><path-noscheme></li>
<li><path-rootless></li>
<li><path-empty></li>
- </ul></dd>
+ </ul>
+ </dd>
+
<dt><dfn id=url-query title=url-query><query></dfn></dt>
<dd><p>The substring matched by the <query> production, if any.</dd>
@@ -4366,18 +4743,28 @@
by the <authority> production, or the whole string if the
<authority> production wasn't matched.</dd>
- </dl></li>
+ </dl>
- </ol><!-- XXX we might want to define "server-based naming authority",
+ </li>
+
+ </ol>
+
+ <!-- XXX we might want to define "server-based naming authority",
it's not clear RFC3986 does a good job of defining that anymore
- (earlier URI specs did) --><h4 id=resolving-urls><span class=secno>2.5.3 </span>Resolving URLs</h4>
+ (earlier URI specs did) -->
+
+
+ <h4 id=resolving-urls><span class=secno>2.5.3 </span>Resolving URLs</h4>
+
<p>To <dfn id=resolve-a-url>resolve a URL</dfn> to an <a href=#absolute-url>absolute URL</a>
relative to either another <a href=#absolute-url>absolute URL</a> or an element,
the user agent must use the following steps. Resolving a URL can
result in an error, in which case the URL is not resolvable.</p>
- <ol><li><p>Let <var title="">url</var> be the <a href=#url>URL</a> being
+ <ol>
+
+ <li><p>Let <var title="">url</var> be the <a href=#url>URL</a> being
resolved.</li>
<li><p>Let <var title="">encoding</var> be the <a href=#url-character-encoding>URL character
@@ -4412,7 +4799,9 @@
the <a href=#absolute-url>absolute URL</a> obtained by running these
substeps:</p>
- <ol><li><p>Let <var title="">fallback base url</var> be <a href="#the-document's-address">the
+ <ol>
+
+ <li><p>Let <var title="">fallback base url</var> be <a href="#the-document's-address">the
document's address</a>.</li>
<li>
@@ -4450,8 +4839,10 @@
<li><p>The <a href=#document-base-url>document base URL</a> is the result of the
previous step if it was successful; otherwise it is <var title="">fallback base url</var>.</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p><a href=#parse-a-url title="parse a URL">Parse</a> <var title="">url</var> into its component parts.</li>
<li>
@@ -4484,18 +4875,22 @@
than U+0025 PERCENT SIGN (%) that doesn't match the original
<path> production defined in RFC 3986:</p>
- <ol><li>Encode the character into a sequence of octets as defined by
+ <ol>
+
+ <li>Encode the character into a sequence of octets as defined by
UTF-8.</li>
<li>Replace the character with the percent-encoded form of those
octets. <a href=#refsRFC3986>[RFC3986]</a></li>
- </ol><div class=example>
+ </ol>
- <p>For instance if <var title="">url</var> was "<code title="">//example.com/a^b☺c%FFd%z/?e</code>", then the
+ <div class=example>
+
+ <p>For instance if <var title="">url</var> was "<code title="">//example.com/a^b☺c%FFd%z/?e</code>", then the
<a href=#url-path title=url-path><path></a> component's substring
- would be "<code title="">/a^b☺c%FFd%z/</code>" and the two
- characters that would have to be escaped would be "<code title="">^</code>" and "<code title="">☺</code>". The
+ would be "<code title="">/a^b☺c%FFd%z/</code>" and the two
+ characters that would have to be escaped would be "<code title="">^</code>" and "<code title="">☺</code>". The
result after this step was applied would therefore be that <var title="">url</var> now had the value "<code title="">//example.com/a%5Eb%E2%98%BAc%FFd%z/?e</code>".</p>
</div>
@@ -4510,7 +4905,9 @@
than U+0025 PERCENT SIGN (%) that doesn't match the original
<query> production defined in RFC 3986:</p>
- <ol><li>If the character in question cannot be expressed in the
+ <ol>
+
+ <li>If the character in question cannot be expressed in the
encoding <var title="">encoding</var>, then replace it with a
single 0x3F octet (an ASCII question mark) and skip the remaining
substeps for this character.</li>
@@ -4521,8 +4918,10 @@
<li>Replace the character with the percent-encoded form of those
octets. <a href=#refsRFC3986>[RFC3986]</a></li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>Apply the algorithm described in RFC 3986 section 5.2
Relative Resolution, using <var title="">url</var> as the
potentially relative URI reference (<var title="">R</var>), and
@@ -4553,7 +4952,9 @@
<li><p>Return <var title="">result</var>.</li>
- </ol><p>A <a href=#url>URL</a> is an <dfn id=absolute-url>absolute URL</dfn> if <a href=#resolve-a-url title="resolve a URL">resolving</a> it results in the same
+ </ol>
+
+ <p>A <a href=#url>URL</a> is an <dfn id=absolute-url>absolute URL</dfn> if <a href=#resolve-a-url title="resolve a URL">resolving</a> it results in the same
URL without an error.</p>
@@ -4575,7 +4976,9 @@
<p>When an element is <dfn id=affected-by-a-base-url-change>affected by a base URL change</dfn>, it
must act as described in the following list:</p>
- <dl class=switch><dt>If the element is a <a href=#hyperlink title=hyperlink>hyperlink
+ <dl class=switch>
+
+ <dt>If the element is a <a href=#hyperlink title=hyperlink>hyperlink
element</a></dt>
<dd>
@@ -4623,14 +5026,17 @@
</dd>
- </dl><h4 id=interfaces-for-url-manipulation><span class=secno>2.5.5 </span>Interfaces for URL manipulation</h4>
+ </dl>
+
+
+ <h4 id=interfaces-for-url-manipulation><span class=secno>2.5.5 </span>Interfaces for URL manipulation</h4>
+
<p>An interface that has a complement of <dfn id=url-decomposition-attributes>URL decomposition
attributes</dfn> will have seven attributes with the following
definitions:</p>
-<pre class=idl>
- attribute DOMString <a href=#dom-uda-protocol title=dom-uda-protocol>protocol</a>;
+<pre class=idl> attribute DOMString <a href=#dom-uda-protocol title=dom-uda-protocol>protocol</a>;
attribute DOMString <a href=#dom-uda-host title=dom-uda-host>host</a>;
attribute DOMString <a href=#dom-uda-hostname title=dom-uda-hostname>hostname</a>;
attribute DOMString <a href=#dom-uda-port title=dom-uda-port>port</a>;
@@ -4687,97 +5093,124 @@
using the <a href=#parse-a-url title="parse a URL">URL parsing rules</a> defined
in this specification.</p>
- <table><thead><tr><th>Attribute
+ <table>
+ <thead>
+ <tr>
+ <th>Attribute
<th>Component
<th>Getter Condition
<th>Prefix
<th>Suffix
<th>Setter Preprocessor
<th>Setter Condition
- <tbody><tr><td><dfn id=dom-uda-protocol title=dom-uda-protocol><code>protocol</code></dfn>
+ <tbody>
+ <tr>
+ <td><dfn id=dom-uda-protocol title=dom-uda-protocol><code>protocol</code></dfn>
<td><a href=#url-scheme title=url-scheme><scheme></a>
- <td>—
- <td>—
+ <td>—
+ <td>—
<td>U+003A COLON ("<code title="">:</code>")
<td>Remove all trailing U+003A COLON ("<code title="">:</code>") characters
<td>The new value is not the empty string
- <tr><td><dfn id=dom-uda-host title=dom-uda-host><code>host</code></dfn>
+ <tr>
+ <td><dfn id=dom-uda-host title=dom-uda-host><code>host</code></dfn>
<td><a href=#url-hostport title=url-hostport><hostport></a>
<td><a href=#concept-uda-input title=concept-uda-input>input</a> is hierarchical and uses a server-based naming authority
- <td>—
- <td>—
- <td>—
- <td>—
- <tr><td><dfn id=dom-uda-hostname title=dom-uda-hostname><code>hostname</code></dfn>
+ <td>—
+ <td>—
+ <td>—
+ <td>—
+ <tr>
+ <td><dfn id=dom-uda-hostname title=dom-uda-hostname><code>hostname</code></dfn>
<td><a href=#url-host title=url-host><host></a>
<td><a href=#concept-uda-input title=concept-uda-input>input</a> is hierarchical and uses a server-based naming authority
- <td>—
- <td>—
+ <td>—
+ <td>—
<td>Remove all leading U+002F SOLIDUS ("<code title="">/</code>") characters
- <td>—
- <tr><td><dfn id=dom-uda-port title=dom-uda-port><code>port</code></dfn>
+ <td>—
+ <tr>
+ <td><dfn id=dom-uda-port title=dom-uda-port><code>port</code></dfn>
<td><a href=#url-port title=url-port><port></a>
<td><a href=#concept-uda-input title=concept-uda-input>input</a> is hierarchical, uses a server-based naming authority, and contained a <a href=#url-port title=url-port><port></a> component (possibly an empty one)
- <td>—
- <td>—
+ <td>—
+ <td>—
<td>Remove any characters in the new value that are not in the range U+0030 DIGIT ZERO .. U+0039 DIGIT NINE.
If the resulting string is empty, set it to a single U+0030 DIGIT ZERO character ('0').
- <td>—
- <tr><td><dfn id=dom-uda-pathname title=dom-uda-pathname><code>pathname</code></dfn>
+ <td>—
+ <tr>
+ <td><dfn id=dom-uda-pathname title=dom-uda-pathname><code>pathname</code></dfn>
<td><a href=#url-path title=url-path><path></a>
<td><a href=#concept-uda-input title=concept-uda-input>input</a> is hierarchical
- <td>—
- <td>—
+ <td>—
+ <td>—
<td>If it has no leading U+002F SOLIDUS ("<code title="">/</code>") character, prepend a U+002F SOLIDUS ("<code title="">/</code>") character to the new value
- <td>—
- <tr><td><dfn id=dom-uda-search title=dom-uda-search><code>search</code></dfn>
+ <td>—
+ <tr>
+ <td><dfn id=dom-uda-search title=dom-uda-search><code>search</code></dfn>
<td><a href=#url-query title=url-query><query></a>
<td><a href=#concept-uda-input title=concept-uda-input>input</a> is hierarchical, and contained a <a href=#url-query title=url-query><query></a> component (possibly an empty one)
<td>U+003F QUESTION MARK ("<code title="">?</code>")
- <td>—
+ <td>—
<td>Remove one leading U+003F QUESTION MARK ("<code title="">?</code>") character, if any
- <td>—
- <tr><td><dfn id=dom-uda-hash title=dom-uda-hash><code>hash</code></dfn>
+ <td>—
+ <tr>
+ <td><dfn id=dom-uda-hash title=dom-uda-hash><code>hash</code></dfn>
<td><a href=#url-fragment title=url-fragment><fragment></a>
<td><a href=#concept-uda-input title=concept-uda-input>input</a> contained a <a href=#url-fragment title=url-fragment><fragment></a> component (possibly an empty one)
<td>U+0023 NUMBER SIGN ("<code title="">#</code>")
- <td>—
+ <td>—
<td>Remove one leading U+0023 NUMBER SIGN ("<code title="">#</code>") character, if any
- <td>—
- </table><!--
+ <td>—
+ </table>
+
+<!--
http://www.hixie.ch/tests/adhoc/dom/level0/location/components/
http://lxr.mozilla.org/seamonkey/source/dom/src/base/nsLocation.cpp
http://wp.netscape.com/eng/mozilla/3.0/handbook/javascript/ref_h-l.htm#84722
---><div class=example>
+-->
+ <div class=example>
+
<p>The table below demonstrates how the getter condition for <code title=dom-uda-search><a href=#dom-uda-search>search</a></code> results in different results
depending on the exact original syntax of the URL:</p>
- <table><thead><tr><th> Input URL
+ <table>
+ <thead>
+ <tr>
+ <th> Input URL
<th> <code title=dom-uda-search><a href=#dom-uda-search>search</a></code> value
<th> Explanation
- <tbody><tr><td> <code title="">http://example.com/</code>
+ <tbody>
+ <tr>
+ <td> <code title="">http://example.com/</code>
<td> <i>empty string</i>
<td> No <a href=#url-query title=url-query><query></a> component in input URL.
- <tr><td> <code title="">http://example.com/?</code>
+ <tr>
+ <td> <code title="">http://example.com/?</code>
<td> <code title="">?</code>
<td> There is a <a href=#url-query title=url-query><query></a> component, but it is empty. The question mark in the resulting value is the prefix.
- <tr><td> <code title="">http://example.com/?test</code>
+ <tr>
+ <td> <code title="">http://example.com/?test</code>
<td> <code title="">?test</code>
<td> The <a href=#url-query title=url-query><query></a> component has the value "<code title="">test</code>".
- <tr><td> <code title="">http://example.com/?test#</code>
+ <tr>
+ <td> <code title="">http://example.com/?test#</code>
<td> <code title="">?test</code>
<td> The (empty) <a href=#url-fragment title=url-fragment><fragment></a> component is not part of the <a href=#url-query title=url-query><query></a> component.
- </table></div>
+ </table>
+ </div>
+
<h3 id=fetching-resources><span class=secno>2.6 </span>Fetching resources</h3>
<p>When a user agent is to <dfn id=fetch>fetch</dfn> a resource, the
following steps must be run:</p>
- <ol><li><p>If the resource is identified by the <a href=#url>URL</a>
+ <ol>
+
+ <li><p>If the resource is identified by the <a href=#url>URL</a>
<dfn id=about:blank><code>about:blank</code></dfn>, then return the empty string
and abort these steps.</li>
@@ -4813,7 +5246,9 @@
<!-- XXX make sure each use of 'fetch' defines what the appropriate
task is -->
- </ol><p class=note>The <span>offline application cache</span>
+ </ol>
+
+ <p class=note>The <span>offline application cache</span>
processing model introduces some <a href=#changesToNetworkingModel>changes to the networking model</a>
to handle the returning of cached resources.</p>
@@ -4824,7 +5259,7 @@
<p class=note>Whether the <a href=#content-type-sniffing>type
sniffing rules</a> apply to the fetched resource depends on the
- algorithm that invokes the rules — they are not always
+ algorithm that invokes the rules — they are not always
applicable.</p>
@@ -4936,7 +5371,9 @@
Content-Type</dfn>, given a string <var title="">s</var>, is as
follows. It either returns an encoding or nothing.</p>
- <ol><li><p>Find the first seven characters in <var title="">s</var>
+ <ol>
+
+ <li><p>Find the first seven characters in <var title="">s</var>
that are an <a href=#ascii-case-insensitive>ASCII case-insensitive</a> match for the word
"charset". If no such match is found, return nothing.</p>
@@ -4953,7 +5390,9 @@
<li><p>Process the next character as follows:</p>
- <dl class=switch><dt>If it is a U+0022 QUOTATION MARK ('"') and there is a later
+ <dl class=switch>
+
+ <dt>If it is a U+0022 QUOTATION MARK ('"') and there is a later
U+0022 QUOTATION MARK ('"') in <var title="">s</var></dt>
<dt>If it is a U+0027 APOSTROPHE ("'") and there is a later
@@ -4976,9 +5415,13 @@
U+000A, U+000C, U+000D, U+0020, or U+003B character or the end of
<var title="">s</var>, whichever comes first.</dd>
- </dl></li>
+ </dl>
- </ol><p class=note>The above algorithm is a willful violation of the
+ </li>
+
+ </ol>
+
+ <p class=note>The above algorithm is a willful violation of the
HTTP specification. <a href=#refsRFC2616>[RFC2616]</a></p>
@@ -4987,7 +5430,9 @@
<p>The <dfn id=content-type-sniffing-0 title="Content-Type sniffing">sniffed type of a
resource</dfn> must be found as follows:</p>
- <ol><li><p>If the user agent is configured to strictly obey
+ <ol>
+
+ <li><p>If the user agent is configured to strictly obey
Content-Type headers for this resource, then jump to the last step
in this set of steps.</li>
@@ -4995,17 +5440,27 @@
is an HTTP Content-Type header and the value of the first such
header has bytes that exactly match one of the following lines:</p>
- <table><thead><tr><th>Bytes in Hexadecimal
+ <table>
+ <thead>
+ <tr>
+ <th>Bytes in Hexadecimal
<th>Textual representation
- <tbody><tr><!-- Very old Apache default --><td>74 65 78 74 2f 70 6c 61 69 6e
+ <tbody>
+ <tr> <!-- Very old Apache default -->
+ <td>74 65 78 74 2f 70 6c 61 69 6e
<td><code title="">text/plain</code>
- <tr><!-- Old Apache default --><td>74 65 78 74 2f 70 6c 61 69 6e 3b 20 63 68 61 72 73 65 74 3d 49 53 4f 2d 38 38 35 39 2d 31
- <td><code title="">text/plain; charset=ISO-8859-1</code>
- <tr><!-- Debian's arbitrarily different Apache default --><td>74 65 78 74 2f 70 6c 61 69 6e 3b 20 63 68 61 72 73 65 74 3d 69 73 6f 2d 38 38 35 39 2d 31
- <td><code title="">text/plain; charset=iso-8859-1</code>
- <tr><!-- Someone else's arbitrarily different Apache default (who?) --><td>74 65 78 74 2f 70 6c 61 69 6e 3b 20 63 68 61 72 73 65 74 3d 55 54 46 2d 38
- <td><code title="">text/plain; charset=UTF-8</code>
- </table><p>...then jump to the <i title="content-type sniffing: text or
+ <tr> <!-- Old Apache default -->
+ <td>74 65 78 74 2f 70 6c 61 69 6e 3b 20 63 68 61 72 73 65 74 3d 49 53 4f 2d 38 38 35 39 2d 31
+ <td><code title="">text/plain; charset=ISO-8859-1</code>
+ <tr> <!-- Debian's arbitrarily different Apache default -->
+ <td>74 65 78 74 2f 70 6c 61 69 6e 3b 20 63 68 61 72 73 65 74 3d 69 73 6f 2d 38 38 35 39 2d 31
+ <td><code title="">text/plain; charset=iso-8859-1</code>
+ <tr> <!-- Someone else's arbitrarily different Apache default (who?) -->
+ <td>74 65 78 74 2f 70 6c 61 69 6e 3b 20 63 68 61 72 73 65 74 3d 55 54 46 2d 38
+ <td><code title="">text/plain; charset=UTF-8</code>
+ </table>
+
+ <p>...then jump to the <i title="content-type sniffing: text or
binary"><a href=#content-type-sniffing:-text-or-binary>text or binary</a></i> section below.</p>
<!-- while IE sniffs all text/plain, this will continue to grow as
@@ -5048,9 +5503,14 @@
<li><p>The sniffed type of the resource is <var title="">official
type</var>.</li>
- </ol><h4 id=content-type-sniffing:-text-or-binary><span class=secno>2.7.3 </span><dfn>Content-Type sniffing: text or binary</dfn></h4>
+ </ol>
- <ol><li><p>The user agent may wait for 512 or more bytes of the resource
+
+ <h4 id=content-type-sniffing:-text-or-binary><span class=secno>2.7.3 </span><dfn>Content-Type sniffing: text or binary</dfn></h4>
+
+ <ol>
+
+ <li><p>The user agent may wait for 512 or more bytes of the resource
to be available.</li>
<li><p>Let <var title="">n</var> be the smaller of either 512 or
@@ -5062,11 +5522,17 @@
the resource match one of the following byte sets:</p>
<!-- this table is present in several forms in this file; keep them in sync -->
- <table><thead><tr><th>Bytes in Hexadecimal
+ <table>
+ <thead>
+ <tr>
+ <th>Bytes in Hexadecimal
<th>Description
- <tbody><tr><td>FE FF
+ <tbody>
+ <tr>
+ <td>FE FF
<td>UTF-16BE BOM <!-- followed by a character --><!-- nobody uses this: or UTF-32LE BOM -->
- <tr><td>FF FE
+ <tr>
+ <td>FF FE
<td>UTF-16LE BOM <!-- followed by a character -->
<!-- nobody uses this
<tr>
@@ -5078,14 +5544,17 @@
<td>FF FE 00 00
<td>UTF-32LE BOM
-->
- <tr><td>EF BB BF
+ <tr>
+ <td>EF BB BF
<td>UTF-8 BOM <!-- followed by a character, or the first byte of a multiple character sequence -->
<!-- nobody uses this
<tr>
<td>DD 73 66 73
<td>UTF-EBCDIC BOM
-->
- </table><p>...then the sniffed type of the resource is "text/plain". Abort
+ </table>
+
+ <p>...then the sniffed type of the resource is "text/plain". Abort
these steps.</p>
</li>
@@ -5112,7 +5581,9 @@
<li><p>Otherwise, the sniffed type of the resource is
"application/octet-stream".</li>
- </ol><p>Bytes covered by the following ranges are <dfn id=binary-data-bytes>binary data
+ </ol>
+
+ <p>Bytes covered by the following ranges are <dfn id=binary-data-bytes>binary data
bytes</dfn>:</p>
<!-- This byte list is based on RFC 2046 Section 4.1.2. Characters
@@ -5121,13 +5592,20 @@
by some encodings as a shift escape), are invalid. Thus, if we see
them, we assume it's not text. -->
- <ul class=brief><li> 0x00 - 0x08 </li>
+ <ul class=brief>
+ <li> 0x00 - 0x08 </li>
<li> 0x0B </li>
<li> 0x0E - 0x1A </li>
<li> 0x1C - 0x1F </li>
- </ul><h4 id=content-type-sniffing:-unknown-type><span class=secno>2.7.4 </span><dfn>Content-Type sniffing: unknown type</dfn></h4>
+ </ul>
- <ol><li><p>The user agent may wait for 512 or more bytes of the
+
+
+ <h4 id=content-type-sniffing:-unknown-type><span class=secno>2.7.4 </span><dfn>Content-Type sniffing: unknown type</dfn></h4>
+
+ <ol>
+
+ <li><p>The user agent may wait for 512 or more bytes of the
resource to be available.</li>
<li><p>Let <var title="">stream length</var> be the smaller of
@@ -5135,11 +5613,15 @@
<li><p>For each row in the table below:</p>
- <dl class=switch><dt>If the row has no "<em>WS</em>" bytes:</dt>
+ <dl class=switch>
+ <dt>If the row has no "<em>WS</em>" bytes:</dt>
+
<dd>
- <ol><li>Let <var title="">pattern length</var> be the length of the
+ <ol>
+
+ <li>Let <var title="">pattern length</var> be the length of the
pattern (number of bytes described by the cell in the second
column of the row).</li>
@@ -5155,13 +5637,17 @@
resource is the type given in the cell of the third column in
that row; abort these steps.</li>
- </ol></dd>
+ </ol>
+ </dd>
+
<dt>If the row has a "<em>WS</em>" byte:</dt>
<dd>
- <ol><li><p>Let <var title="">index<sub>pattern</sub></var> be an
+ <ol>
+
+ <li><p>Let <var title="">index<sub>pattern</sub></var> be an
index into the mask and pattern byte strings of the
row.</li>
@@ -5177,7 +5663,9 @@
<p>Examine the <var title="">index<sub>stream</sub></var>th
byte of the byte stream as follows:</p>
- <dl class=switch><dt>If the <var title="">index<sub>pattern</sub></var>th byte
+ <dl class=switch>
+
+ <dt>If the <var title="">index<sub>pattern</sub></var>th byte
of the pattern is a normal hexadecimal byte and not a "<em>WS</em>"
byte:</dt>
@@ -5214,8 +5702,10 @@
</dd>
- </dl></li>
+ </dl>
+ </li>
+
<li><p>If <var title="">index<sub>pattern</sub></var> does not
point beyond the end of the mask and pattern byte strings, then
jump back to the <em>loop</em> step in this algorithm.</li>
@@ -5224,10 +5714,14 @@
given in the cell of the third column in that row; abort these
steps.</li>
- </ol></dd>
+ </ol>
- </dl></li>
+ </dd>
+ </dl>
+
+ </li>
+
<li><p>If none of the first <var title="">n</var> bytes of the
resource are <a href=#binary-data-bytes>binary data bytes</a> then the sniffed type
of the resource is "text/plain". Abort these steps.</li>
@@ -5235,95 +5729,121 @@
<li><p>Otherwise, the sniffed type of the resource is
"application/octet-stream".</li>
- </ol><p>The table used by the above algorithm is:</p>
+ </ol>
- <table><thead><tr><th colspan=2>Bytes in Hexadecimal
+ <p>The table used by the above algorithm is:</p>
+
+ <table>
+ <thead>
+ <tr>
+ <th colspan=2>Bytes in Hexadecimal
<th rowspan=2>Sniffed type
<th rowspan=2>Security
<th rowspan=2>Comment
- <tr><th>Mask
+ <tr>
+ <th>Mask
<th>Pattern
- <tbody><tr><td>FF FF DF DF DF DF DF DF DF FF DF DF DF DF
+ <tbody>
+ <tr>
+ <td>FF FF DF DF DF DF DF DF DF FF DF DF DF DF
<td>3C 21 44 4F 43 54 59 50 45 20 48 54 4D 4C <!-- "<!DOCTYPE HTML" --> <!-- common in static data -->
<td>text/html
<td>Scriptable
<td>The string "<code title=""><!DOCTYPE HTML</code>" in US-ASCII or compatible encodings, case-insensitively.
- <tr><td>FF FF DF DF DF DF
+ <tr>
+ <td>FF FF DF DF DF DF
<td><em>WS</em> 3C 48 54 4D 4C <!-- "<HTML" --> <!-- common in static data -->
<td>text/html
<td>Scriptable
<td>The string "<code title=""><HTML</code>" in US-ASCII or compatible encodings, case-insensitively, possibly with leading spaces.
- <tr><td>FF FF DF DF DF DF
+ <tr>
+ <td>FF FF DF DF DF DF
<td><em>WS</em> 3C 48 45 41 44 <!-- "<HEAD" --> <!-- common in static data -->
<td>text/html
<td>Scriptable
<td>The string "<code title=""><HEAD</code>" in US-ASCII or compatible encodings, case-insensitively, possibly with leading spaces.
- <tr><td>FF FF DF DF DF DF DF DF
+ <tr>
+ <td>FF FF DF DF DF DF DF DF
<td><em>WS</em> 3C 53 43 52 49 50 54 <!-- "<SCRIPT" --> <!-- common in dynamic data -->
<td>text/html
<td>Scriptable
<td>The string "<code title=""><SCRIPT</code>" in US-ASCII or compatible encodings, case-insensitively, possibly with leading spaces.
- <tr><td>FF FF FF FF FF
+ <tr>
+ <td>FF FF FF FF FF
<td>25 50 44 46 2D <!-- "%PDF-" (from http://lxr.mozilla.org/seamonkey/source/netwerk/streamconv/converters/nsUnknownDecoder.cpp#321) -->
<td>application/pdf
<td>Scriptable
<td>The string "<code title="">%PDF-</code>", the PDF signature.
- <tr><td>FF FF FF FF FF FF FF FF FF FF FF
+ <tr>
+ <td>FF FF FF FF FF FF FF FF FF FF FF
<td>25 21 50 53 2D 41 64 6F 62 65 2D <!-- "%!PS-Adobe-" (from http://lxr.mozilla.org/seamonkey/source/netwerk/streamconv/converters/nsUnknownDecoder.cpp#321) -->
<td>application/postscript
<td>Safe
<td>The string "<code title="">%!PS-Adobe-</code>", the PostScript signature.
<!-- copied from the text or binary section above -->
- <tbody><tr><td>FF FF 00 00
+ <tbody>
+ <tr>
+ <td>FF FF 00 00
<td>FE FF 00 00
<td>text/plain
<td>n/a
<td>UTF-16BE BOM <!-- followed by at least one character -->
- <tr><td>FF FF 00 00
+ <tr>
<td>FF FF 00 00
+ <td>FF FF 00 00
<td>text/plain
<td>n/a
<td>UTF-16LE BOM <!-- followed by at least one character -->
- <tr><td>FF FF FF 00
+ <tr>
+ <td>FF FF FF 00
<td>EF BB BF 00
<td>text/plain
<td>n/a
<td>UTF-8 BOM <!-- followed by at least one character -->
<!-- based on the table in the image section below -->
- <tbody><tr><td>FF FF FF FF FF FF
+ <tbody>
+ <tr>
+ <td>FF FF FF FF FF FF
<td>47 49 46 38 37 61 <!-- GIF87a -->
<td>image/gif
<td>Safe
<td>The string "<code title="">GIF87a</code>", a GIF signature.
- <tr><td>FF FF FF FF FF FF
+ <tr>
+ <td>FF FF FF FF FF FF
<td>47 49 46 38 39 61 <!-- GIF89a -->
<td>image/gif
<td>Safe
<td>The string "<code title="">GIF89a</code>", a GIF signature.
- <tr><td>FF FF FF FF FF FF FF FF
+ <tr>
+ <td>FF FF FF FF FF FF FF FF
<td>89 50 4E 47 0D 0A 1A 0A <!-- [TAB]PNG[CR][LF][EOF][LF]; 137 80 78 71 13 10 26 10 -->
<td>image/png
<td>Safe
<td>The PNG signature.
- <tr><td>FF FF FF
+ <tr>
+ <td>FF FF FF
<td>FF D8 FF <!-- SOI marker followed by the first byte of another marker -->
<td>image/jpeg
<td>Safe
<td>A JPEG SOI marker followed by the first byte of another marker.
- <tr><td>FF FF
+ <tr>
+ <td>FF FF
<td>42 4D
<td>image/bmp
<td>Safe
<td>The string "<code title="">BM</code>", a BMP signature.
- <tr><td>FF FF FF FF
+ <tr>
+ <td>FF FF FF FF
<td>00 00 01 00
<td>image/vnd.microsoft.icon
<td>Safe
<td>A 0 word following by a 1 word, a Windows Icon file format signature.
- </table><p class=XXX>I'd like to add types like MPEG, AVI, Flash,
+ </table>
+
+ <p class=XXX>I'd like to add types like MPEG, AVI, Flash,
Java, etc, to the above table.</p>
<p>User agents may support further types if desired, by implicitly
@@ -5349,31 +5869,43 @@
sniffed type of the resource is the type given in the corresponding
cell in the second column on the same row:</p>
- <table><thead><tr><th>Bytes in Hexadecimal
+ <table>
+ <thead>
+ <tr>
+ <th>Bytes in Hexadecimal
<th>Sniffed type
<th>Comment
<!-- update the table above if you change this! -->
- <tbody><tr><td>47 49 46 38 37 61 <!-- GIF87a -->
+ <tbody>
+ <tr>
+ <td>47 49 46 38 37 61 <!-- GIF87a -->
<td>image/gif
<td>The string "<code title="">GIF87a</code>", a GIF signature.
- <tr><td>47 49 46 38 39 61 <!-- GIF89a -->
+ <tr>
+ <td>47 49 46 38 39 61 <!-- GIF89a -->
<td>image/gif
<td>The string "<code title="">GIF89a</code>", a GIF signature.
- <tr><td>89 50 4E 47 0D 0A 1A 0A <!-- [TAB]PNG[CR][LF][EOF][LF]; 137 80 78 71 13 10 26 10 -->
+ <tr>
+ <td>89 50 4E 47 0D 0A 1A 0A <!-- [TAB]PNG[CR][LF][EOF][LF]; 137 80 78 71 13 10 26 10 -->
<td>image/png
<td>The PNG signature.
- <tr><td>FF D8 FF <!-- SOI marker followed by the first byte of another marker -->
+ <tr>
+ <td>FF D8 FF <!-- SOI marker followed by the first byte of another marker -->
<td>image/jpeg
<td>A JPEG SOI marker followed by the first byte of another marker.
- <tr><td>42 4D
+ <tr>
+ <td>42 4D
<td>image/bmp
<td>The string "<code title="">BM</code>", a BMP signature.
- <tr><td>00 00 01 00
+ <tr>
+ <td>00 00 01 00
<td>image/vnd.microsoft.icon
<td>A 0 word following by a 1 word, a Windows Icon file format signature.
<!-- XXX Mozilla also detects ART (AOL proprietary format) and Windows Cursor files -->
- </table><p>Otherwise, the sniffed type of the resource is the same as
+ </table>
+
+ <p>Otherwise, the sniffed type of the resource is the same as
its <var title="">official type</var>.</p>
@@ -5384,7 +5916,9 @@
http://lxr.mozilla.org/seamonkey/source/browser/components/feeds/src/nsFeedSniffer.cpp#127
-->
- <ol><li><p>The user agent may wait for 512 or more bytes of the
+ <ol>
+
+ <li><p>The user agent may wait for 512 or more bytes of the
resource to be available.</li>
<li><p>Let <var title="">s</var> be the stream of bytes, and let
@@ -5410,7 +5944,10 @@
<li><p><i>Loop start:</i> Examine <span><var title="">s</var>[<var title="">pos</var>]</span>.</p>
- <dl class=switch><!-- skip whitespace (S token as defined in XML 1.0 section 2.3; production [3] --><dt>If it is 0x09 (ASCII tab), 0x20 (ASCII space), 0x0A (ASCII LF), or 0x0D (ASCII CR)</dt>
+ <dl class=switch>
+
+ <!-- skip whitespace (S token as defined in XML 1.0 section 2.3; production [3] -->
+ <dt>If it is 0x09 (ASCII tab), 0x20 (ASCII space), 0x0A (ASCII LF), or 0x0D (ASCII CR)</dt>
<dd>Increase <var title="">pos</var> by 1 and repeat this step.</dd>
<dt>If it is 0x3C (ASCII "<code title=""><</code>")</dt>
@@ -5420,14 +5957,18 @@
<dd>The sniffed type of the resource is "text/html". Abort these
steps.</dd>
- </dl></li>
+ </dl>
+ </li>
+
<li><p>If the bytes with positions <var title="">pos</var> to
<span><var title="">pos</var>+2</span> in <var title="">s</var> are
exactly equal to 0x21, 0x2D, 0x2D respectively (ASCII for "<code title="">!--</code>"), then:</p>
- <ol><li>Increase <var title="">pos</var> by 3.</li> <!-- skips past the " ! - - " -->
+ <ol>
+ <li>Increase <var title="">pos</var> by 3.</li> <!-- skips past the " ! - - " -->
+
<li>If the bytes with positions <span><var title="">pos</var></span> to <span><var title="">pos</var>+2</span> in <var title="">s</var> are exactly
equal to 0x2D, 0x2D, 0x3E respectively (ASCII for "<code title="">--></code>"), then increase <var title="">pos</var>
by 3 and jump back to the previous step (the step labeled
@@ -5437,8 +5978,10 @@
<li>Return to step 2 in these substeps.</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>If <span><var title="">s</var>[<var title="">pos</var>]</span> is 0x21 (ASCII "<code title="">!</code>"):</p>
<!-- this skips past a DOCTYPE if there is one. It is brain-dead
@@ -5448,19 +5991,25 @@
we'll treat it as HTML which is fine since we know it's not a feed
in that case. -->
- <ol><li>Increase <var title="">pos</var> by 1.</li>
+ <ol>
+ <li>Increase <var title="">pos</var> by 1.</li>
+
<li>If <span><var title="">s</var>[<var title="">pos</var>]</span> equal 0x3E, then increase <var title="">pos</var> by 1 and jump back to the step labeled
<i>loop start</i> in the overall algorithm in this section.</li>
<li>Otherwise, return to step 1 in these substeps.</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>If <span><var title="">s</var>[<var title="">pos</var>]</span> is 0x3F (ASCII "<code title="">?</code>"):</p>
- <ol><li>Increase <var title="">pos</var> by 1.</li>
+ <ol>
+ <li>Increase <var title="">pos</var> by 1.</li>
+
<li>If <span><var title="">s</var>[<var title="">pos</var>]</span> and <span><var title="">s</var>[<var title="">pos</var>+1]</span> equal 0x3F and 0x3E respectively,
then increase <var title="">pos</var> by 1 and jump back to the
step labeled <i>loop start</i> in the overall algorithm in this
@@ -5468,28 +6017,39 @@
<li>Otherwise, return to step 1 in these substeps.</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>Otherwise, if the bytes in <var title="">s</var> starting at
<var title="">pos</var> match any of the sequences of bytes in the
first column of the following table, then the user agent must
follow the steps given in the corresponding cell in the second
column of the same row.</p>
- <table><thead><tr><th>Bytes in Hexadecimal
+ <table>
+ <thead>
+ <tr>
+ <th>Bytes in Hexadecimal
<th>Requirement
<th>Comment
- <tbody><tr><td>72 73 73
+ <tbody>
+ <tr>
+ <td>72 73 73
<td>The sniffed type of the resource is "application/rss+xml"; abort these steps
<td>The three ASCII characters "<code title="">rss</code>"
- <tr><td>66 65 65 64
+ <tr>
+ <td>66 65 65 64
<td>The sniffed type of the resource is "application/atom+xml"; abort these steps
<td>The four ASCII characters "<code title="">feed</code>"
- <tr><td>72 64 66 3A 52 44 46
+ <tr>
+ <td>72 64 66 3A 52 44 46
<td>Continue to the next step in this algorithm
<td>The ASCII characters "<code title="">rdf:RDF</code>"
- </table><p>If none of the byte sequences above match the bytes in <var title="">s</var> starting at <var title="">pos</var>, then the
+ </table>
+
+ <p>If none of the byte sequences above match the bytes in <var title="">s</var> starting at <var title="">pos</var>, then the
sniffed type of the resource is "text/html". Abort these
steps.</p>
@@ -5505,7 +6065,9 @@
<li><p>Otherwise, the sniffed type of the resource is
"text/html".</li>
- </ol><p class=note>For efficiency reasons, implementations may wish to
+ </ol>
+
+ <p class=note>For efficiency reasons, implementations may wish to
implement this algorithm and the algorithm for detecting the
character encoding of HTML documents in parallel.</p>
@@ -5628,7 +6190,7 @@
of the floating point number</a> and then that string must be
used as the new content attribute value.</p>
- <p class=note>The values ±Infinity and NaN throw an
+ <p class=note>The values ±Infinity and NaN throw an
exception on setting, as defined by WebIDL. <a href=#refsWEBIDL>[WEBIDL]</a></p>
<p>If a reflecting DOM attribute is of the type
@@ -5651,7 +6213,9 @@
following algorithm (stopping at the first point where a value is
returned):
- <ol><li>If the corresponding content attribute is absent, then the
+ <ol>
+
+ <li>If the corresponding content attribute is absent, then the
DOM attribute must return null.</li>
<li>Let <var title="">candidate</var> be the element that the <code title="">document.getElementById()</code> method would find if it
@@ -5664,7 +6228,9 @@
<li>Otherwise, it must return <var title="">candidate</var>.</li>
- </ol><p>On setting, if the given element has an <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute, then the content attribute must
+ </ol>
+
+ <p>On setting, if the given element has an <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute, then the content attribute must
be set to the value of that <code title=attr-id><a href=#the-id-attribute>id</a></code>
attribute. Otherwise, the DOM attribute must be set to the empty
string.</p><!-- XXX or raise an exception? -->
@@ -5740,7 +6306,9 @@
<p>The <dfn id=dom-htmlcollection-nameditem title=dom-HTMLCollection-namedItem><code>namedItem(<var title="">key</var>)</code></dfn> method must return the first node
in the collection that matches the following requirements:</p>
- <ul><li>It is an <code><a href=#the-a-element>a</a></code>, <code><a href=#the-applet-element>applet</a></code>,
+ <ul>
+
+ <li>It is an <code><a href=#the-a-element>a</a></code>, <code><a href=#the-applet-element>applet</a></code>,
<code><a href=#the-area-element>area</a></code>, <code><a href=#the-embed-element>embed</a></code>, <code><a href=#the-form-element>form</a></code>,
<code>frame</code>, <code>frameset</code>, <code><a href=#the-iframe-element>iframe</a></code>,
<code><a href=#the-img-element>img</a></code>, or <code><a href=#the-object-element>object</a></code> element with a <code title="">name</code> attribute equal to <var title="">key</var>,
@@ -5748,7 +6316,9 @@
<li>It is an element with an ID <var title="">key</var>.</li>
- </ul><p>If no such elements are found, then the method must return
+ </ul>
+
+ <p>If no such elements are found, then the method must return
null.</p>
@@ -5786,7 +6356,9 @@
<p>The <dfn id=dom-htmlformcontrolscollection-nameditem title=dom-HTMLFormControlsCollection-namedItem><code>namedItem(<var title="">name</var>)</code></dfn> method must act according to the
following algorithm:
- <ol><li>If, at the time the method is called, there is exactly one node
+ <ol>
+
+ <li>If, at the time the method is called, there is exactly one node
in the collection that has either an <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute or a <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attribute equal to <var title="">name</var>, then return that node and stop the
algorithm.</li>
@@ -5802,10 +6374,16 @@
<li>Return that <code>NodeList</code> object.</li>
- </ol><!--
+ </ol>
+
+
+<!--
http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E...%0A%3Cform%20name%3D%22a%22%3E%3Cinput%20id%3D%22x%22%20name%3D%22y%22%3E%3Cinput%20name%3D%22x%22%20id%3D%22y%22%3E%3C/form%3E%0A%3Cscript%3E%0A%20%20var%20x%3B%0A%20%20w%28x%20%3D%20document.forms%5B%27a%27%5D%5B%27x%27%5D%29%3B%0A%20%20w%28x.length%29%3B%0A%20%20x%5B0%5D.parentNode.removeChild%28x%5B0%5D%29%3B%0A%20%20w%28x.length%29%3B%0A%20%20w%28x%20%3D%3D%20document.forms%5B%27a%27%5D%5B%27x%27%5D%29%3B%0A%3C/script%3E%0A
---><h5 id=htmloptionscollection><span class=secno>2.8.2.3 </span>HTMLOptionsCollection</h5>
+-->
+
+ <h5 id=htmloptionscollection><span class=secno>2.8.2.3 </span>HTMLOptionsCollection</h5>
+
<p>The <code><a href=#htmloptionscollection-0>HTMLOptionsCollection</a></code> interface represents a
list of <code><a href=#the-option-element>option</a></code> elements. It is always rooted on a
<code><a href=#the-select-element>select</a></code> element and has attributes and methods that
@@ -5859,7 +6437,9 @@
<p>The <dfn id=dom-htmloptionscollection-nameditem title=dom-HTMLOptionsCollection-namedItem><code>namedItem(<var title="">name</var>)</code></dfn> method must act according to the
following algorithm:
- <ol><li>If, at the time the method is called, there is exactly one node
+ <ol>
+
+ <li>If, at the time the method is called, there is exactly one node
in the collection that has either an <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute or a <code title=attr-option-name>name</code> attribute equal to <var title="">name</var>, then return that node and stop the
algorithm.</li>
@@ -5878,10 +6458,14 @@
<li>Return that <code>NodeList</code> object.</li>
- </ol><p>The <dfn id=dom-htmloptionscollection-add title=dom-HTMLOptionsCollection-add><code>add(<var title="">element</var>, <var title="">before</var>)</code></dfn>
+ </ol>
+
+ <p>The <dfn id=dom-htmloptionscollection-add title=dom-HTMLOptionsCollection-add><code>add(<var title="">element</var>, <var title="">before</var>)</code></dfn>
method must act according to the following algorithm:</p>
- <ol><li><p>If <var title="">element</var> is not an <code><a href=#the-option-element>option</a></code>
+ <ol>
+
+ <li><p>If <var title="">element</var> is not an <code><a href=#the-option-element>option</a></code>
or <code><a href=#the-optgroup-element>optgroup</a></code> element, then return and abort these
steps.</li>
@@ -5907,10 +6491,14 @@
<li><p>Act as if the DOM Core <code title=dom-insertBefore>insertBefore()</code> method was invoked
on the <var title="">parent</var> node, with <var title="">element</var> as the first argument and <var title="">reference</var> as the second argument.</p>
- </ol><p>The <dfn id=dom-htmloptionscollection-remove title=dom-HTMLOptionsCollection-remove><code>remove(<var title="">index</var>)</code></dfn> method must act according to
+ </ol>
+
+ <p>The <dfn id=dom-htmloptionscollection-remove title=dom-HTMLOptionsCollection-remove><code>remove(<var title="">index</var>)</code></dfn> method must act according to
the following algorithm:</p>
- <ol><li><p>If the number of nodes <a href=#represented-by-the-collection>represented by the
+ <ol>
+
+ <li><p>If the number of nodes <a href=#represented-by-the-collection>represented by the
collection</a> is zero, abort these steps.</li>
<li><p>If <var title="">index</var> is not a number greater than or
@@ -5922,8 +6510,14 @@
<li><p>Remove <var title="">element</var> from its parent
node.</li>
- </ol><!-- see also http://ln.hixie.ch/?start=1161042744&count=1 --><h4 id=domtokenlist><span class=secno>2.8.3 </span>DOMTokenList</h4>
+ </ol>
+ <!-- see also http://ln.hixie.ch/?start=1161042744&count=1 -->
+
+
+
+ <h4 id=domtokenlist><span class=secno>2.8.3 </span>DOMTokenList</h4>
+
<p>The <code><a href=#domtokenlist-0>DOMTokenList</a></code> interface represents an interface
to an underlying string that consists of an <a href=#unordered-set-of-unique-space-separated-tokens>unordered set of
unique space-separated tokens</a>.</p>
@@ -5965,7 +6559,9 @@
<p>The <dfn id=dom-tokenlist-has title=dom-tokenlist-has><code>has(<var title="">token</var>)</code></dfn> method must run the following
algorithm:</p>
- <ol><li>If the <var title="">token</var> argument contains any <a href=#space-character title="space character">space characters</a>, then raise an
+ <ol>
+
+ <li>If the <var title="">token</var> argument contains any <a href=#space-character title="space character">space characters</a>, then raise an
<code><a href=#invalid_character_err>INVALID_CHARACTER_ERR</a></code> exception and stop the
algorithm.</li>
@@ -5979,10 +6575,14 @@
<li>Otherwise, return false.</li>
- </ol><p>The <dfn id=dom-tokenlist-add title=dom-tokenlist-add><code>add(<var title="">token</var>)</code></dfn> method must run the following
+ </ol>
+
+ <p>The <dfn id=dom-tokenlist-add title=dom-tokenlist-add><code>add(<var title="">token</var>)</code></dfn> method must run the following
algorithm:</p>
- <ol><li>If the <var title="">token</var> argument contains any <a href=#space-character title="space character">space characters</a>, then raise an
+ <ol>
+
+ <li>If the <var title="">token</var> argument contains any <a href=#space-character title="space character">space characters</a>, then raise an
<code><a href=#invalid_character_err>INVALID_CHARACTER_ERR</a></code> exception and stop the
algorithm.</li>
@@ -6002,10 +6602,14 @@
<li>Append the value of <var title="">token</var> to the end of the
<code><a href=#domtokenlist-0>DOMTokenList</a></code> object's underlying string.</li>
- </ol><p>The <dfn id=dom-tokenlist-remove title=dom-tokenlist-remove><code>remove(<var title="">token</var>)</code></dfn> method must run the following
+ </ol>
+
+ <p>The <dfn id=dom-tokenlist-remove title=dom-tokenlist-remove><code>remove(<var title="">token</var>)</code></dfn> method must run the following
algorithm:</p>
- <ol><li>If the <var title="">token</var> argument contains any <a href=#space-character title="space character">space characters</a>, then raise an
+ <ol>
+
+ <li>If the <var title="">token</var> argument contains any <a href=#space-character title="space character">space characters</a>, then raise an
<code><a href=#invalid_character_err>INVALID_CHARACTER_ERR</a></code> exception and stop the
algorithm.</li>
@@ -6013,10 +6617,14 @@
the given <var title="">token</var> from the underlying
string</a>.</li>
- </ol><p>The <dfn id=dom-tokenlist-toggle title=dom-tokenlist-toggle><code>toggle(<var title="">token</var>)</code></dfn> method must run the following
+ </ol>
+
+ <p>The <dfn id=dom-tokenlist-toggle title=dom-tokenlist-toggle><code>toggle(<var title="">token</var>)</code></dfn> method must run the following
algorithm:</p>
- <ol><li>If the <var title="">token</var> argument contains any <a href=#space-character title="space character">space characters</a>, then raise an
+ <ol>
+
+ <li>If the <var title="">token</var> argument contains any <a href=#space-character title="space character">space characters</a>, then raise an
<code><a href=#invalid_character_err>INVALID_CHARACTER_ERR</a></code> exception and stop the
algorithm.</li>
@@ -6040,7 +6648,9 @@
<li>Return true.</li>
- </ol><p>Objects implementing the <code><a href=#domtokenlist-0>DOMTokenList</a></code> interface must
+ </ol>
+
+ <p>Objects implementing the <code><a href=#domtokenlist-0>DOMTokenList</a></code> interface must
<dfn id=dom-tokenlist-tostring title=dom-tokenlist-toString>stringify</dfn> to the object's
underlying string representation.</p>
@@ -6051,7 +6661,9 @@
clone</dfn> of an object, it must run the following algorithm, which
either returns a separate object, or throws an exception.</p>
- <ol><li><p>Let <var title="">input</var> be the object being
+ <ol>
+
+ <li><p>Let <var title="">input</var> be the object being
cloned.</li>
<li><p>Let <var title="">memory</var> be a list of objects,
@@ -6063,11 +6675,15 @@
<li><p>Return <var title="">output</var>.</li>
- </ol><p>The <dfn id=internal-structured-cloning-algorithm>internal structured cloning algorithm</dfn> is always
+ </ol>
+
+ <p>The <dfn id=internal-structured-cloning-algorithm>internal structured cloning algorithm</dfn> is always
called with two arguments, <var title="">input</var> and <var title="">memory</var>, and its behavior depends on the type of <var title="">input</var>, as follows:</p>
- <dl class=switch><dt>If <var title="">input</var> is the undefined value</dt>
+ <dl class=switch>
+ <dt>If <var title="">input</var> is the undefined value</dt>
+
<dd><p>Return the undefined value.</dd>
<dt>If <var title="">input</var> is the null value</dt>
@@ -6103,7 +6719,9 @@
<dd>
- <ol><li><p>If <var title="">input</var> is in <var title="">memory</var>, then throw a
+ <ol>
+
+ <li><p>If <var title="">input</var> is in <var title="">memory</var>, then throw a
<code><a href=#not_supported_err>NOT_SUPPORTED_ERR</a></code> exception and abort the overall
<a href=#structured-clone>structured clone</a> algorithm.</li>
@@ -6126,10 +6744,16 @@
<li><p>Return <var title="">output</var>.</li>
- </ol></dd>
+ </ol>
- </dl><h4 id=domstringmap><span class=secno>2.8.5 </span>DOMStringMap</h4>
+ </dd>
+ </dl>
+
+
+
+ <h4 id=domstringmap><span class=secno>2.8.5 </span>DOMStringMap</h4>
+
<p>The <code><a href=#domstringmap-0>DOMStringMap</a></code> interface represents a set of
name-value pairs. When a <code><a href=#domstringmap-0>DOMStringMap</a></code> object is
instantiated, it is associated with three algorithms, one for
@@ -6203,7 +6827,8 @@
<p>The following <code>DOMException</code> codes are defined in DOM
Core. <a href=#refsDOMCORE>[DOMCORE]</a></p>
- <ol class=brief><li value=1><dfn id=index_size_err><code>INDEX_SIZE_ERR</code></dfn></li>
+ <ol class=brief>
+ <li value=1><dfn id=index_size_err><code>INDEX_SIZE_ERR</code></dfn></li>
<li value=2><dfn id=domstring_size_err><code>DOMSTRING_SIZE_ERR</code></dfn></li>
<li value=3><dfn id=hierarchy_request_err><code>HIERARCHY_REQUEST_ERR</code></dfn></li>
<li value=4><dfn id=wrong_document_err><code>WRONG_DOCUMENT_ERR</code></dfn></li>
@@ -6228,8 +6853,11 @@
<li value=23><dfn id=unavailable_script_err><code>UNAVAILABLE_SCRIPT_ERR</code></dfn></li> <!-- actually defined right here for now -->
<li value=81><dfn id=parse_err><code>PARSE_ERR</code></dfn></li> <!-- actually defined in dom3ls -->
<li value=82><dfn id=serialise_err><code>SERIALISE_ERR</code></dfn></li> <!-- actually defined in dom3ls -->
- </ol><h4 id=garbage-collection><span class=secno>2.8.8 </span>Garbage collection</h4>
+ </ol>
+
+ <h4 id=garbage-collection><span class=secno>2.8.8 </span>Garbage collection</h4>
+
<p>There is an <dfn id=implied-strong-reference>implied strong reference</dfn> from any DOM
attribute that returns a pre-existing object to that object.</p>
@@ -6394,7 +7022,9 @@
and the current page does not (e.g. when navigating from an <code title="">https:</code> page to an <code title="">http:</code>
page).</p>
- <hr><p>The <dfn id=dom-document-cookie title=dom-document-cookie><code>cookie</code></dfn>
+ <hr>
+
+ <p>The <dfn id=dom-document-cookie title=dom-document-cookie><code>cookie</code></dfn>
attribute represents the cookies of the resource.</p>
<p id=sandboxCookies>On getting, if the document is not associated
@@ -6435,13 +7065,17 @@
help manage which cookies are sent to which parts of the site, and
are not in any way a security feature.</p>
- <hr><p>The <dfn id=dom-document-lastmodified title=dom-document-lastModified><code>lastModified</code></dfn>
+ <hr>
+
+ <p>The <dfn id=dom-document-lastmodified title=dom-document-lastModified><code>lastModified</code></dfn>
attribute, on getting, must return the date and time of the
<code>Document</code>'s source file's last modification, in the
user's local timezone, in the following format:</p>
- <ol><li> The month component of the date. </li>
+ <ol>
+ <li> The month component of the date. </li>
+
<li> A U+002F SOLIDUS character ('/'). </li>
<li> The day component of the date. </li>
@@ -6462,7 +7096,9 @@
<li> The seconds component of the time. </li>
- </ol><p>All the numeric components above, other than the year, must be
+ </ol>
+
+ <p>All the numeric components above, other than the year, must be
given as two digits in the range U+0030 DIGIT ZERO to U+0039 DIGIT
NINE representing the number in base ten, zero-padded if
necessary.</p>
@@ -6491,18 +7127,22 @@
<p>As far as parsing goes, the quirks I know of are:</p>
- <ul><li>Comment parsing is different.</li>
+ <ul>
+ <li>Comment parsing is different.</li>
+
<li><code><a href=#the-p-element>p</a></code> can contain <code><a href=#the-table-element>table</a></code></li>
<li>Safari and IE have special parsing rules for <% ... %>
(even in standards mode, though clearly this should be
quirks-only).</li>
- </ul></div>
+ </ul>
+ </div>
+
<p>Documents have an associated <dfn id="document's-character-encoding" title="document's character
encoding">character encoding</dfn>. When a <code>Document</code>
object is created, the <a href="#document's-character-encoding">document's character encoding</a>
@@ -6555,14 +7195,18 @@
<code>html</code> element</a>, if there is one, or null
otherwise.</p>
- <hr><p><dfn id=the-title-element-0>The <code>title</code> element</dfn> of a document is the
+ <hr>
+
+ <p><dfn id=the-title-element-0>The <code>title</code> element</dfn> of a document is the
first <code><a href=#the-title-element>title</a></code> element in the document (in tree order), if
there is one, or null otherwise.</p>
<p>The <dfn id=document.title title=dom-document-title><code>title</code></dfn> attribute must,
on getting, run the following algorithm:</p>
- <ol><li><p>If the <a href=#root-element>root element</a> is an <code>svg</code>
+ <ol>
+
+ <li><p>If the <a href=#root-element>root element</a> is an <code>svg</code>
element in the "<code title="">http://www.w3.org/2000/svg</code>"
namespace, and the user agent supports SVG, then the getter must
return the value that would have been returned by the DOM attribute
@@ -6575,9 +7219,13 @@
string if <a href=#the-title-element-0>the <code>title</code> element</a> is
null.</li>
- </ol><p>On setting, the following algorithm must be run:</p>
+ </ol>
- <ol><li><p>If the <a href=#root-element>root element</a> is an <code>svg</code>
+ <p>On setting, the following algorithm must be run:</p>
+
+ <ol>
+
+ <li><p>If the <a href=#root-element>root element</a> is an <code>svg</code>
element in the "<code title="">http://www.w3.org/2000/svg</code>"
namespace, and the user agent supports SVG, then the setter must
defer to the setter for the DOM attribute of the same name on the
@@ -6602,12 +7250,16 @@
being assigned must be appended to <a href=#the-title-element-0>the <code>title</code>
element</a>.</li>
- </ol><p>The <code title=dom-document-title><a href=#document.title>title</a></code> attribute on
+ </ol>
+
+ <p>The <code title=dom-document-title><a href=#document.title>title</a></code> attribute on
the <code><a href=#htmldocument>HTMLDocument</a></code> interface should shadow the attribute
of the same name on the <code>SVGDocument</code> interface when the
user agent supports both HTML and SVG.</p>
- <hr><p><dfn id=the-body-element-0>The body element</dfn> of a document is the first child of
+ <hr>
+
+ <p><dfn id=the-body-element-0>The body element</dfn> of a document is the first child of
<a href=#the-html-element-0>the <code>html</code> element</a> that is either a
<code><a href=#the-body-element>body</a></code> element or a <code>frameset</code> element. If
there is no such element, it is null. If the body element is null,
@@ -6621,7 +7273,9 @@
<code>frameset</code> element, or null). On setting, the following
algorithm must be run:</p>
- <ol><li>If the new value is not a <code><a href=#the-body-element>body</a></code> or
+ <ol>
+
+ <li>If the new value is not a <code><a href=#the-body-element>body</a></code> or
<code>frameset</code> element, then raise a
<code><a href=#hierarchy_request_err>HIERARCHY_REQUEST_ERR</a></code> exception and abort these
steps.</li>
@@ -6639,15 +7293,23 @@
<li>Otherwise, the <a href=#the-body-element-0>the body element</a> is null. Append
the new value to the root element.</li>
- </ol><!--XXX
+ </ol>
+
+ <!--XXX
http://lxr.mozilla.org/seamonkey/source/content/html/document/src/nsHTMLDocument.cpp
search for ::GetBody ::SetBody
http://trac.webkit.org/projects/webkit/browser/trunk/WebCore/html/HTMLDocument.cpp
search for ::setBody
http://trac.webkit.org/projects/webkit/browser/trunk/WebCore/dom/Document.cpp
search for ::body
- --><hr><!-- these all return the same object each time because of a rule in
- the collection section --><p>The <dfn id=dom-document-images title=dom-document-images><code>images</code></dfn>
+ -->
+
+ <hr>
+
+ <!-- these all return the same object each time because of a rule in
+ the collection section -->
+
+ <p>The <dfn id=dom-document-images title=dom-document-images><code>images</code></dfn>
attribute must return an <code><a href=#htmlcollection-0>HTMLCollection</a></code> rooted at the
<code>Document</code> node, whose filter matches only
<code><a href=#the-img-element>img</a></code> elements.</p>
@@ -6683,7 +7345,9 @@
<code>Document</code> node, whose filter matches only
<code><a href=#script>script</a></code> elements.</p>
- <hr><p>The <dfn id=dom-document-getelementsbyname title=dom-document-getElementsByName><code>getElementsByName(<var title="">name</var>)</code></dfn> method takes a string <var title="">name</var>, and must return a live <code>NodeList</code>
+ <hr>
+
+ <p>The <dfn id=dom-document-getelementsbyname title=dom-document-getElementsByName><code>getElementsByName(<var title="">name</var>)</code></dfn> method takes a string <var title="">name</var>, and must return a live <code>NodeList</code>
containing all the <code><a href=#the-a-element>a</a></code>, <code><a href=#the-applet-element>applet</a></code>,
<code><a href=#the-button-element>button</a></code>, <code><a href=#the-form-element>form</a></code>, <code>frame</code>,
<code>frameset</code>, <code><a href=#the-iframe-element>iframe</a></code>, <code><a href=#the-img-element>img</a></code>,
@@ -6736,10 +7400,10 @@
would return a <code>NodeList</code> with the two paragraphs
<code>p1</code> and <code>p2</code> in it.</p>
- <p>A call to <code>getElementsByClassName('ccc bbb')</code>
+ <p>A call to <code>getElementsByClassName('ccc bbb')</code>
would only return one node, however, namely <code>p3</code>. A call
to
- <code>document.getElementById('example').getElementsByClassName('bbb ccc ')</code>
+ <code>document.getElementById('example').getElementsByClassName('bbb ccc ')</code>
would return the same thing.</p>
<p>A call to <code>getElementsByClassName('aaa,bbb')</code> would
@@ -6754,7 +7418,9 @@
> optional tag name.
-->
- <hr><p>The <code><a href=#htmldocument>HTMLDocument</a></code> interface <span title="support
+ <hr>
+
+ <p>The <code><a href=#htmldocument>HTMLDocument</a></code> interface <span title="support
named properties">supports named properties</span>. The <span>names
of the supported named properties</span> at any moment consist of
the values of the <code title=attr-name>name</code> content
@@ -6776,8 +7442,10 @@
retrieval</dfn> using a name <var title="">name</var>, then the user
agent must return the value obtained using the following steps:</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>Let <var title="">elements</var> be the list of <a href=#dom-document-nameditem-filter title=dom-document-namedItem-filter>named elements</a> with
the name <var title="">name</var> in the <code>Document</code>.
@@ -6819,11 +7487,15 @@
This is what the "OverrideBuiltins" bit means in the IDL.
-->
- </ol><p><dfn id=dom-document-nameditem-filter title=dom-document-nameditem-filter>Named elements</dfn>
+ </ol>
+
+ <p><dfn id=dom-document-nameditem-filter title=dom-document-nameditem-filter>Named elements</dfn>
with the name <var title="">name</var>, for the purposes of the
above algorithm, are those that are either:</p>
- <ul><li><code><a href=#the-applet-element>applet</a></code>, <code><a href=#the-embed-element>embed</a></code>, <code><a href=#the-form-element>form</a></code>,
+ <ul>
+
+ <li><code><a href=#the-applet-element>applet</a></code>, <code><a href=#the-embed-element>embed</a></code>, <code><a href=#the-form-element>form</a></code>,
<code><a href=#the-iframe-element>iframe</a></code>, <code><a href=#the-img-element>img</a></code>, or
<a href=#fallback-free>fallback-free</a> <code><a href=#the-object-element>object</a></code> elements that have a
<code title=attr-name>name</code> content attribute whose value
@@ -6834,12 +7506,16 @@
<li><code><a href=#the-img-element>img</a></code> elements that have an <code title=attr-id><a href=#the-id-attribute>id</a></code> content attribute whose value is <var title="">name</var>, and that have a <code title=attr-name>name</code> content attribute present also.</li>
- </ul><p>An <code><a href=#the-object-element>object</a></code> element is said to be
+ </ul>
+
+ <p>An <code><a href=#the-object-element>object</a></code> element is said to be
<dfn id=fallback-free>fallback-free</dfn> if it has no element descendants other than
<code><a href=#the-param-element>param</a></code> elements, and no <a href=#text-node>text node</a>
descendants that are not <a href=#inter-element-whitespace>inter-element whitespace</a>.</p>
- <hr><p class=note>The <code title=dom-document-dir><a href=#dom-document-dir>dir</a></code>
+ <hr>
+
+ <p class=note>The <code title=dom-document-dir><a href=#dom-document-dir>dir</a></code>
attribute on the <code><a href=#htmldocument>HTMLDocument</a></code> interface is defined
along with the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> content
attribute.</p>
@@ -6872,7 +7548,7 @@
<tr> <td> My favourite animal is the cat. </td> </tr>
<tr>
<td>
- —<a href="http://example.org/~ernest/"><cite>Ernest</cite></a>,
+ —<a href="http://example.org/~ernest/"><cite>Ernest</cite></a>,
in an essay from 1992
</td>
</tr>
@@ -6892,7 +7568,7 @@
<p> My favourite animal is the cat. </p>
</blockquote>
<p>
- —<a href="http://example.org/~ernest/">Ernest</a>,
+ —<a href="http://example.org/~ernest/">Ernest</a>,
in an essay from 1992
</p>
</body>
@@ -7037,7 +7713,8 @@
all <a href=#html-elements>HTML elements</a> (even those not defined in this
specification):</p>
- <dl class=element><dt>Global attributes:</dt>
+ <dl class=element>
+ <dt>Global attributes:</dt>
<dd><code title=attr-class><a href=#classes>class</a></code></dd>
<dd><code title=attr-contenteditable><a href=#attr-contenteditable>contenteditable</a></code></dd>
<dd><code title=attr-contextmenu><a href=#attr-contextmenu>contextmenu</a></code></dd>
@@ -7050,11 +7727,14 @@
<dd><code title=attr-spellcheck><a href=#attr-spellcheck>spellcheck</a></code></dd>
<dd><code title=attr-tabindex><a href=#attr-tabindex>tabindex</a></code></dd>
<dd><code title=attr-title><a href=#the-title-attribute>title</a></code></dd>
- </dl><p>In addition, unless otherwise specified, the following
+ </dl>
+
+ <p>In addition, unless otherwise specified, the following
<a href=#event-handler-content-attributes>event handler content attributes</a> may be specified on
any <a href=#html-elements title="HTML elements">HTML element</a>:</p>
- <dl class=element><dt>Event handler content attributes:</dt>
+ <dl class=element>
+ <dt>Event handler content attributes:</dt>
<dd><code title=handler-onabort><a href=#handler-onabort>onabort</a></code></dd>
<dd><code title=handler-onblur><a href=#handler-onblur>onblur</a></code></dd>
<dd><code title=handler-onchange><a href=#handler-onchange>onchange</a></code></dd>
@@ -7084,12 +7764,16 @@
<dd><code title=handler-onscroll><a href=#handler-onscroll>onscroll</a></code></dd>
<dd><code title=handler-onselect><a href=#handler-onselect>onselect</a></code></dd>
<dd><code title=handler-onsubmit><a href=#handler-onsubmit>onsubmit</a></code></dd>
- </dl><p class=note>The attributes marked with an asterisk cannot be
+ </dl>
+
+ <p class=note>The attributes marked with an asterisk cannot be
specified on <code><a href=#the-body-element>body</a></code> elements as those elements expose
<a href=#event-handler-attributes-0>event handler attributes</a> of the <code><a href=#window>Window</a></code>
object with the same names.</p>
- <hr><p>Also, <a href=#custom-data-attribute title="custom data attribute">custom data
+ <hr>
+
+ <p>Also, <a href=#custom-data-attribute title="custom data attribute">custom data
attributes</a> (e.g. <code title="">data-foldername</code> or
<code title="">data-msgid</code>) can be specified on any <a href=#html-elements title="HTML elements">HTML element</a>, to store custom data
specific to the page.</p>
@@ -7218,7 +7902,9 @@
value when compared in an <a href=#ascii-case-insensitive>ASCII case-insensitive</a>
manner.</p>
- <hr><p>To determine the language of a node, user agents must look at the
+ <hr>
+
+ <p>To determine the language of a node, user agents must look at the
nearest ancestor element (including the element itself if the node
is an element) that has an <code title=attr-xml-lang><a href=#the-lang-and-xml:lang-attributes>xml:lang</a></code> attribute set or is an <a href=#html-elements title="HTML elements">HTML element</a> and has a <code title=attr-lang><a href=#the-lang-and-xml:lang-attributes>lang</a></code> attribute set. That attribute
specifies the language of the node.</p>
@@ -7242,7 +7928,9 @@
must be treated as an unknown language (as if the value was the
empty string).</p>
- <hr><p>User agents may use the element's language to determine proper
+ <hr>
+
+ <p>User agents may use the element's language to determine proper
processing or rendering (e.g. in the selection of appropriate
fonts or pronunciations, or for dictionary selection). <!--User
agents must not use the element's language to determine text
@@ -7446,10 +8134,14 @@
following algorithms, which expose these attributes on their
element:</p>
- <dl><dt>The algorithm for getting the list of name-value pairs</dt>
+ <dl>
+ <dt>The algorithm for getting the list of name-value pairs</dt>
+
<dd>
- <ol><li>Let <var title="">list</var> be an empty list of name-value
+ <ol>
+
+ <li>Let <var title="">list</var> be an empty list of name-value
pairs.</li>
<li>For each content attribute on the element whose first five
@@ -7460,12 +8152,15 @@
<li>Return <var title="">list</var>.</li>
- </ol></dd>
+ </ol>
+ </dd>
<dt>The algorithm for setting names to certain values</dt>
<dd>
- <ol><li>Let <var title="">name</var> be the concatenation of the
+ <ol>
+
+ <li>Let <var title="">name</var> be the concatenation of the
string <code title="">data-</code> and the name passed to the
algorithm.</li>
@@ -7478,27 +8173,32 @@
exception when setting an attribute with the name <var title="">name</var>, then this must raise the same
exception.</li>
- </ol></dd>
+ </ol>
+ </dd>
<dt>The algorithm for deleting names</dt>
<dd>
- <ol><li>Let <var title="">name</var> be the concatenation of the
+ <ol>
+
+ <li>Let <var title="">name</var> be the concatenation of the
string <code title="">data-</code> and the name passed to the
algorithm.</li>
<li>Remove the attribute with the name <var title="">name</var>,
if such an attribute exists. Do nothing otherwise.</li>
- </ol></dd>
+ </ol>
+ </dd>
- </dl><div class=example>
+ </dl>
+ <div class=example>
+
<p>If a Web page wanted an element to represent a space ship,
e.g. as part of a game, it would have to use the <code class=attr-class>class</code> attribute along with <code title=attr-data-*><a href=#attr-data-*>data-*</a></code> attributes:</p>
- <pre>
-<div class="spaceship" data-id="92432"
+ <pre><div class="spaceship" data-id="92432"
data-weapons="laser 2" data-shields="50%"
data-x="30" data-y="10" data-z="90">
<button class="fire"
@@ -7591,15 +8291,18 @@
group elements with similar characteristics together. The following
broad categories are used in this specification:</p>
- <ul class=brief><li><a href=#metadata-content-0>Metadata content</a></li>
+ <ul class=brief>
+ <li><a href=#metadata-content-0>Metadata content</a></li>
<li><a href=#flow-content-0>Flow content</a></li>
<li><a href=#sectioning-content-0>Sectioning content</a></li>
<li><a href=#heading-content-0>Heading content</a></li>
<li><a href=#phrasing-content-0>Phrasing content</a></li>
<li><a href=#embedded-content-2>Embedded content</a></li>
<li><a href=#interactive-content-0>Interactive content</a></li>
- </ul><p>These categories are related as follows:
+ </ul>
+ <p>These categories are related as follows:
+
<p><object data=images/content-venn.svg height=288 width=512><img alt="Sectioning content, heading content, phrasing content, and
embedded content are all types of flow content. Embedded content is
also a type of phrasing content." src=images/content-venn.png></object></p>
@@ -7773,7 +8476,9 @@
activatable element</dfn> is the element returned by the following
algorithm:</p>
- <ol><li><p>If <var title="">target</var> has a defined <a href=#activation-behavior>activation
+ <ol>
+
+ <li><p>If <var title="">target</var> has a defined <a href=#activation-behavior>activation
behavior</a>, then return <var title="">target</var> and abort
these steps.</li>
@@ -7784,10 +8489,14 @@
<li><p>Otherwise, there is no <a href=#nearest-activatable-element>nearest activatable
element</a>.</li>
- </ol><p>When a pointing device is clicked, the user agent must run these
+ </ol>
+
+ <p>When a pointing device is clicked, the user agent must run these
steps:</p>
- <ol><li><p>Let <var title="">e</var> be the <span title="">nearest
+ <ol>
+
+ <li><p>Let <var title="">e</var> be the <span title="">nearest
activatable element</span> of the element designated by the user,
if any.</li>
@@ -7812,7 +8521,9 @@
</li>
- </ol><p class=note>The above doesn't happen for arbitrary synthetic
+ </ol>
+
+ <p class=note>The above doesn't happen for arbitrary synthetic
events dispatched by author script. However, the <code title=dom-click><a href=#dom-click>click()</a></code> method can be used to make it
happen programmatically.</p>
@@ -7964,8 +8675,10 @@
that are not in the <a href=#html-namespace-0>HTML namespace</a> despite being in
<a href=#html-documents>HTML documents</a>.</p>
- <dl><dt><code title="">Element.tagName</code> and <code title="">Node.nodeName</code></dt>
+ <dl>
+ <dt><code title="">Element.tagName</code> and <code title="">Node.nodeName</code></dt>
+
<dd>
<p>These attributes must return element names <a href=#converted-to-uppercase>converted to
@@ -8050,8 +8763,12 @@
</dd>
- </dl><h3 id=dynamic-markup-insertion><span class=secno>3.7 </span><dfn>Dynamic markup insertion</dfn></h3>
+ </dl>
+
+
+ <h3 id=dynamic-markup-insertion><span class=secno>3.7 </span><dfn>Dynamic markup insertion</dfn></h3>
+
<p class=note>APIs for dynamically inserting markup into the
document interact with the parser, and thus their behavior, varies
depending on whether they are used with <a href=#html-documents>HTML documents</a>
@@ -8073,7 +8790,9 @@
<p>When called with two or fewer arguments, the method must act as
follows:</p>
- <ol><li><p>Let <var title="">type</var> be the value of the first
+ <ol>
+
+ <li><p>Let <var title="">type</var> be the value of the first
argument, if there is one, or "<code>text/html</code>"
otherwise.</li>
@@ -8181,7 +8900,9 @@
<p>If <var title="">replace</var> is false, then:
- <ol><li>Remove all the entries in the <a href=#browsing-context>browsing context</a>'s
+ <ol>
+
+ <li>Remove all the entries in the <a href=#browsing-context>browsing context</a>'s
<a href=#session-history>session history</a> after the <a href=#current-entry>current entry</a>
in its <code>Document</code>'s <code><a href=#history-1>History</a></code> object</li>
@@ -8195,8 +8916,10 @@
to step backwards in the session history to see the page before
it was blown away by the <code title=dom-document-open><a href=#dom-document-open>document.open()</a></code> call.)</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>Finally, set the <a href=#insertion-point>insertion point</a> to point at
just before the end of the <a href=#the-input-stream>input stream</a> (which at this
point will be empty).</li>
@@ -8204,7 +8927,9 @@
<li><p>Return the <code>Document</code> on which the method was
invoked.</li>
- </ol><p>When called with three or more arguments, the <code title=dom-document-open><a href=#dom-document-open>open()</a></code> method on the
+ </ol>
+
+ <p>When called with three or more arguments, the <code title=dom-document-open><a href=#dom-document-open>open()</a></code> method on the
<code><a href=#htmldocument>HTMLDocument</a></code> object must call the <code title=dom-open><a href=#dom-open>open()</a></code> method on the <code><a href=#window>Window</a></code>
object of the <code><a href=#htmldocument>HTMLDocument</a></code> object, with the same
arguments as the original call to the <code title=dom-document-open><a href=#dom-document-open>open()</a></code> method, and return whatever
@@ -8227,8 +8952,10 @@
<p>The <dfn id=dom-document-write title=dom-document-write><code>document.write(...)</code></dfn>
method must act as follows:</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>If the method was invoked on an <a href=#xml-documents title="XML documents">XML
document</a>, throw an <code><a href=#invalid_access_err>INVALID_ACCESS_ERR</a></code>
exception and abort these steps.</p>
@@ -8291,8 +9018,11 @@
</li>
- </ol><h4 id=document.writeln()><span class=secno>3.7.3 </span><code title=dom-document-writeln><a href=#dom-document-writeln>document.writeln()</a></code></h4>
+ </ol>
+
+ <h4 id=document.writeln()><span class=secno>3.7.3 </span><code title=dom-document-writeln><a href=#dom-document-writeln>document.writeln()</a></code></h4>
+
<p>The <dfn id=dom-document-writeln title=dom-document-writeln><code>document.writeln(...)</code></dfn>
method, when invoked, must act as if the <code title=dom-document-write><a href=#dom-document-write>document.write()</a></code> method had been
invoked with the same argument(s), plus an extra argument consisting
@@ -8317,8 +9047,10 @@
<p>On setting, the following steps must be run:</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>If the node's document is an <a href=#html-documents title="HTML documents">HTML
document</a>: Invoke the <a href=#html-fragment-parsing-algorithm>HTML fragment parsing
algorithm</a>.</p>
@@ -8384,8 +9116,12 @@
</li>
- </ol><h4 id=outerhtml><span class=secno>3.7.5 </span><code title=dom-outerHTML><a href=#dom-outerhtml>outerHTML</a></code></h4>
+ </ol>
+
+
+ <h4 id=outerhtml><span class=secno>3.7.5 </span><code title=dom-outerHTML><a href=#dom-outerhtml>outerHTML</a></code></h4>
+
<p>The <dfn id=dom-outerhtml title=dom-outerHTML><code>outerHTML</code></dfn> DOM
attribute represents the markup of the element and its contents.</p>
@@ -8401,8 +9137,10 @@
<p>On setting, the following steps must be run:</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>Let <var title="">target</var> be the element whose <code title=dom-outerHTML><a href=#dom-outerhtml>outerHTML</a></code> attribute is being
set.</p>
@@ -8469,13 +9207,19 @@
</li>
- </ol><h4 id=insertadjacenthtml()><span class=secno>3.7.6 </span><code title=dom-insertAdjacentHTML><a href=#dom-insertadjacenthtml>insertAdjacentHTML()</a></code></h4>
+ </ol>
+
+
+ <h4 id=insertadjacenthtml()><span class=secno>3.7.6 </span><code title=dom-insertAdjacentHTML><a href=#dom-insertadjacenthtml>insertAdjacentHTML()</a></code></h4>
+
<p>The <dfn id=dom-insertadjacenthtml title=dom-insertAdjacentHTML><code>insertAdjacentHTML(<var title="">position</var>, <var title="">text</var>)</code></dfn>
method, when invoked, must run the following algorithm:</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>Let <var title="">position</var> and <var title="">text</var>
be the method's first and second arguments, respectively.</p>
@@ -8492,7 +9236,9 @@
<p>Use the first matching item from this list:</p>
- <dl><dt>If <var title="">position</var> is an <a href=#ascii-case-insensitive>ASCII
+ <dl>
+
+ <dt>If <var title="">position</var> is an <a href=#ascii-case-insensitive>ASCII
case-insensitive</a> match for the string "beforebegin"</dt>
<dt>If <var title="">position</var> is an <a href=#ascii-case-insensitive>ASCII
case-insensitive</a> match for the string "afterend"</dt>
@@ -8531,8 +9277,10 @@
</dd>
- </dl></li>
+ </dl>
+ </li>
+
<li>
<p>If <var title="">target</var>'s document is an <a href=#html-documents title="HTML documents">HTML document</a>: Invoke the <a href=#html-fragment-parsing-algorithm>HTML
@@ -8563,7 +9311,9 @@
<p>Use the first matching item from this list:</p>
- <dl><dt>If <var title="">position</var> is an <a href=#ascii-case-insensitive>ASCII
+ <dl>
+
+ <dt>If <var title="">position</var> is an <a href=#ascii-case-insensitive>ASCII
case-insensitive</a> match for the string "beforebegin"</dt>
<dd>
@@ -8606,18 +9356,26 @@
</dd>
- </dl><p>The above mutations must be performed without firing any
+ </dl>
+
+ <p>The above mutations must be performed without firing any
mutation events.</p>
</li>
- </ol><h2 id=semantics><span class=secno>4 </span>The elements of HTML</h2>
+ </ol>
+
+
+
+ <h2 id=semantics><span class=secno>4 </span>The elements of HTML</h2>
+
<h3 id=the-root-element><span class=secno>4.1 </span>The root element</h3>
<h4 id=the-html-element><span class=secno>4.1.1 </span>The <dfn><code>html</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd>None.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>As the root element of a document.</dd>
@@ -8635,7 +9393,9 @@
};</pre>
</dd>
-->
- </dl><p>The <code><a href=#the-html-element>html</a></code> element <a href=#represents>represents</a> the root of
+ </dl>
+
+ <p>The <code><a href=#the-html-element>html</a></code> element <a href=#represents>represents</a> the root of
an HTML document.</p>
<p>The <dfn id=attr-html-manifest title=attr-html-manifest><code>manifest</code></dfn>
@@ -8659,7 +9419,8 @@
<h4 id=the-head-element><span class=secno>4.2.1 </span>The <dfn><code>head</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd>None.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>As the first element in an <code><a href=#the-html-element>html</a></code> element.</dd>
@@ -8669,13 +9430,16 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-head-element>head</a></code> element <a href=#represents>represents</a> a
+ </dl>
+
+ <p>The <code><a href=#the-head-element>head</a></code> element <a href=#represents>represents</a> a
collection of metadata for the <code>Document</code>.</p>
<h4 id=the-title-element><span class=secno>4.2.2 </span>The <dfn><code>title</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#metadata-content-0>Metadata content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>In a <code><a href=#the-head-element>head</a></code> element containing no other <code><a href=#the-title-element>title</a></code> elements.</dd>
@@ -8685,7 +9449,9 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-title-element>title</a></code> element <a href=#represents>represents</a> the
+ </dl>
+
+ <p>The <code><a href=#the-title-element>title</a></code> element <a href=#represents>represents</a> the
document's title or name. Authors should use titles that identify
their documents even when they are used out of context, for example
in a user's history or bookmarks, or in search results. The
@@ -8729,7 +9495,8 @@
<h4 id=the-base-element><span class=secno>4.2.3 </span>The <dfn><code>base</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#metadata-content-0>Metadata content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>In a <code><a href=#the-head-element>head</a></code> element containing no other <code><a href=#the-base-element>base</a></code> elements.</dd>
@@ -8746,7 +9513,9 @@
attribute DOMString <a href=#dom-base-target title=dom-base-target>target</a>;
};</pre>
</dd>
- </dl><p>The <code><a href=#the-base-element>base</a></code> element allows authors to specify the
+ </dl>
+
+ <p>The <code><a href=#the-base-element>base</a></code> element allows authors to specify the
<a href=#document-base-url>document base URL</a> for the purposes of <a href=#resolve-a-url title="resolve a url">resolving relative URLs</a>, and the name
of the default <a href=#browsing-context>browsing context</a> for the purposes of
<a href=#following-hyperlinks>following hyperlinks</a>. The element does not <a href=#represents title=represents>represent</a> any content beyond this
@@ -8789,7 +9558,8 @@
<h4 id=the-link-element><span class=secno>4.2.4 </span>The <dfn><code>link</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#metadata-content-0>Metadata content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>Where <a href=#metadata-content-0>metadata content</a> is expected.</dd>
@@ -8821,7 +9591,9 @@
by this element, the <a href=#styling>styling processing model</a> defines
how. <a href=#refsCSSOM>[CSSOM]</a></p>
</dd>
- </dl><p>The <code><a href=#the-link-element>link</a></code> element allows authors to link their
+ </dl>
+
+ <p>The <code><a href=#the-link-element>link</a></code> element allows authors to link their
document to other resources.</p>
<p>The destination of the link(s) is given by the <dfn id=attr-link-href title=attr-link-href><code>href</code></dfn> attribute, which must
@@ -8884,7 +9656,9 @@
some form or another (possibly simplified), for each hyperlink
created with each <code><a href=#the-link-element>link</a></code> element in the document:</p>
- <ul><!-- the order here is the order that makes most sense for a UI --><li>The relationship between this document and the resource (given
+ <ul> <!-- the order here is the order that makes most sense for a UI -->
+
+ <li>The relationship between this document and the resource (given
by the <code title=attr-link-rel><a href=#attr-link-rel>rel</a></code> attribute)</li>
<li>The title of the resource (given by the <code title=attr-link-title><a href=#attr-link-title>title</a></code> attribute).</li>
@@ -8895,7 +9669,9 @@
<li>The optimum media for the resource (given by the <code title=attr-link-media><a href=#attr-link-media>media</a></code> attribute).</li>
- </ul><p>User agents may also include other information, such as the type
+ </ul>
+
+ <p>User agents may also include other information, such as the type
of the resource (as given by the <code title=attr-link-type><a href=#attr-link-type>type</a></code> attribute).</p>
<p class=note>Hyperlinks created with the <code><a href=#the-link-element>link</a></code>
@@ -8957,7 +9733,7 @@
the user agent should <a href=#fetch>fetch</a> the resource under the
assumption that it will be supported.</p>
- <p>User agents must not consider the <code title=attr-link-type><a href=#attr-link-type>type</a></code> attribute authoritative —
+ <p>User agents must not consider the <code title=attr-link-type><a href=#attr-link-type>type</a></code> attribute authoritative —
upon fetching the resource, user agents must not use the <code title=attr-link-type><a href=#attr-link-type>type</a></code> attribute to determine its actual
type. Only the actual type (as defined in the next paragraph) is
used to determine whether to <em>apply</em> the resource, not the
@@ -9000,7 +9776,7 @@
<p>If one the two files was returned without a
<a href=#content-type-0>Content-Type</a> metadata, or with a syntactically
- incorrect type like <code title="">Content-Type: "null"</code>, then the default type
+ incorrect type like <code title="">Content-Type: "null"</code>, then the default type
for <code title=rel-stylesheet><a href=#link-type-stylesheet>stylesheet</a></code> links would kick
in. Since that default type is <code title="">text/css</code>, the
style sheet <em>would</em> nonetheless be applied.</p>
@@ -9054,7 +9830,8 @@
<h4 id=meta><span class=secno>4.2.5 </span>The <dfn><code>meta</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#metadata-content-0>Metadata content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>If the <code title=attr-meta-charset><a href=#attr-meta-charset>charset</a></code> attribute is present, or if the element is in the <a href=#attr-meta-http-equiv-content-type title=attr-meta-http-equiv-content-type>Encoding declaration state</a>: in a <code><a href=#the-head-element>head</a></code> element.</dd>
@@ -9077,7 +9854,9 @@
attribute DOMString <a href=#dom-meta-httpequiv title=dom-meta-httpEquiv>httpEquiv</a>;
};</pre>
</dd>
- </dl><p>The <code><a href=#meta>meta</a></code> element <a href=#represents>represents</a> various
+ </dl>
+
+ <p>The <code><a href=#meta>meta</a></code> element <a href=#represents>represents</a> various
kinds of metadata that cannot be expressed using the
<code><a href=#the-title-element>title</a></code>, <code><a href=#the-base-element>base</a></code>, <code><a href=#the-link-element>link</a></code>,
<code><a href=#the-style-element>style</a></code>, and <code><a href=#script>script</a></code> elements.</p>
@@ -9142,8 +9921,10 @@
<p>This specification defines a few names for the <code title=attr-meta-name><a href=#attr-meta-name>name</a></code> attribute of the
<code><a href=#meta>meta</a></code> element.</p>
- <dl><dt><dfn id=meta-application-name title=meta-application-name>application-name</dfn></dt>
+ <dl>
+ <dt><dfn id=meta-application-name title=meta-application-name>application-name</dfn></dt>
+
<dd><p>The value must be a short free-form string that giving the
name of the Web application that the page represents. If the page
is not a Web application, the <code title=meta-application-name><a href=#meta-application-name>application-name</a></code> metadata name
@@ -9165,8 +9946,11 @@
software used to generate the document. This value must not be used
on hand-authored pages.</dd>
- </dl><h5 id=other-metadata-names><span class=secno>4.2.5.2 </span>Other metadata names</h5>
+ </dl>
+
+ <h5 id=other-metadata-names><span class=secno>4.2.5.2 </span>Other metadata names</h5>
+
<p><dfn id=concept-meta-extensions title=concept-meta-extensions>Extensions to the predefined
set of metadata names</dfn> may be registered in the <a href=http://wiki.whatwg.org/wiki/MetaExtensions>WHATWG Wiki
MetaExtensions page</a>.
@@ -9175,8 +9959,10 @@
time to add a type. These new names must be specified with the
following information:</p>
- <dl><dt>Keyword</dt>
+ <dl>
+ <dt>Keyword</dt>
+
<dd><p>The actual name being defined. The name should not be
confusingly similar to any other defined name (e.g. differing only
in case).</dd>
@@ -9209,8 +9995,10 @@
<p>One of the following:</p>
- <dl><dt>Proposal</dt>
+ <dl>
+ <dt>Proposal</dt>
+
<dd>The name has not received wide peer review and
approval. Someone has proposed it and is using it.</dd>
@@ -9228,13 +10016,17 @@
more details" entries will give details of what authors should
use instead, if anything.</dd>
- </dl><p>If a metadata name is added with the "proposal" status and
+ </dl>
+
+ <p>If a metadata name is added with the "proposal" status and
found to be redundant with existing values, it should be removed
and listed as a synonym for the existing value.</p>
</dd>
- </dl><p>Conformance checkers must use the information given on the WHATWG
+ </dl>
+
+ <p>Conformance checkers must use the information given on the WHATWG
Wiki MetaExtensions page to establish if a value not explicitly
defined in this specification is allowed or not. When an author uses
a new type not defined by either this specification or the Wiki
@@ -9265,13 +10057,19 @@
noted in the last column.</p>
<!-- things that are neither conforming nor do anything are commented out -->
- <table><thead><tr><th>State
+ <table>
+ <thead>
+ <tr>
+ <th>State
<th>Keywords
<th>Notes
- <tbody><tr><td><a href=#attr-meta-http-equiv-content-language title=attr-meta-http-equiv-content-language>Content Language</a>
+ <tbody>
+ <tr>
+ <td><a href=#attr-meta-http-equiv-content-language title=attr-meta-http-equiv-content-language>Content Language</a>
<td><code title="">content-language</code>
<td>Non-conforming
- <tr><td><a href=#attr-meta-http-equiv-content-type title=attr-meta-http-equiv-content-type>Encoding declaration</a>
+ <tr>
+ <td><a href=#attr-meta-http-equiv-content-type title=attr-meta-http-equiv-content-type>Encoding declaration</a>
<td><code title="">content-type</code>
<td>
<!--
@@ -9284,13 +10082,17 @@
<td><code title="">Content-Style-Type</code>
<td>Non-conforming
-->
- <tr><td><a href=#attr-meta-http-equiv-default-style title=attr-meta-http-equiv-default-style>Default style</a>
+ <tr>
+ <td><a href=#attr-meta-http-equiv-default-style title=attr-meta-http-equiv-default-style>Default style</a>
<td><code title="">default-style</code>
<td>
- <tr><td><a href=#attr-meta-http-equiv-refresh title=attr-meta-http-equiv-refresh>Refresh</a>
+ <tr>
+ <td><a href=#attr-meta-http-equiv-refresh title=attr-meta-http-equiv-refresh>Refresh</a>
<td><code title="">refresh</code>
<td>
- </table><!--
+ </table>
+
+<!--
DATA: According to Henri's validator stats, here are common
non-conforming values used by people who validate (sample of 400
pages):
@@ -9328,22 +10130,28 @@
These numbers are low; further study is required to establish what
people expect to have work and what is necessary.
---><p>When a <code><a href=#meta>meta</a></code> element is <a href=#insert-an-element-into-a-document title="insert an
+-->
+
+ <p>When a <code><a href=#meta>meta</a></code> element is <a href=#insert-an-element-into-a-document title="insert an
element into a document">inserted into the document</a>, if its
<code title=attr-meta-http-equiv><a href=#attr-meta-http-equiv>http-equiv</a></code> attribute is
present and represents one of the above states, then the user agent
must run the algorithm appropriate for that state, as described in
the following list:</p>
- <dl><dt><dfn id=attr-meta-http-equiv-content-language title=attr-meta-http-equiv-content-language>Content language</dfn>
+ <dl>
+ <dt><dfn id=attr-meta-http-equiv-content-language title=attr-meta-http-equiv-content-language>Content language</dfn>
+
<dd>
<p>This non-conforming pragma sets the <dfn id=document-wide-default-language>document-wide default
language</dfn>. Until the pragma is successfully processed, there
is no <a href=#document-wide-default-language>document-wide default language</a>.</p>
- <ol><li><p>If another <code><a href=#meta>meta</a></code> element in the <a href=#attr-meta-http-equiv-content-language title=attr-meta-http-equiv-content-language>Content Language
+ <ol>
+
+ <li><p>If another <code><a href=#meta>meta</a></code> element in the <a href=#attr-meta-http-equiv-content-language title=attr-meta-http-equiv-content-language>Content Language
state</a> has already been successfully processed (i.e. when
it was inserted the user agent processed it and reached the last
step of this list of steps), then abort these steps.</li>
@@ -9369,7 +10177,9 @@
<li><p>Let the <a href=#document-wide-default-language>document-wide default language</a> be the
string that resulted from the previous step.</li>
- </ol><p>For <code><a href=#meta>meta</a></code> elements in the <a href=#attr-meta-http-equiv-content-language title=attr-meta-http-equiv-content-language>Content Language
+ </ol>
+
+ <p>For <code><a href=#meta>meta</a></code> elements in the <a href=#attr-meta-http-equiv-content-language title=attr-meta-http-equiv-content-language>Content Language
state</a>, the <code title=attr-meta-content><a href=#attr-meta-content>content</a></code>
attribute must have a value consisting of a valid RFC 3066
language code. <a href=#refsRFC3066>[RFC3066]</a></p>
@@ -9415,15 +10225,22 @@
<dd>
- <ol><li class=XXX>...</li>
+ <ol>
- </ol></dd>
+ <li class=XXX>...</li>
+ </ol>
+
+ </dd>
+
<dt><dfn id=attr-meta-http-equiv-refresh title=attr-meta-http-equiv-refresh>Refresh state</dfn>
<dd>
- <ol><!-- TESTS: http://www.hixie.ch/tests/adhoc/html/meta/refresh/ --><li><p>If another <code><a href=#meta>meta</a></code> element in the <a href=#attr-meta-http-equiv-refresh title=attr-meta-http-equiv-refresh>Refresh state</a> has
+ <ol>
+ <!-- TESTS: http://www.hixie.ch/tests/adhoc/html/meta/refresh/ -->
+
+ <li><p>If another <code><a href=#meta>meta</a></code> element in the <a href=#attr-meta-http-equiv-refresh title=attr-meta-http-equiv-refresh>Refresh state</a> has
already been successfully processed (i.e. when it was inserted
the user agent processed it and reached the last step of this
list of steps), then abort these steps.</li>
@@ -9504,7 +10321,9 @@
<p>Perform one or more of the following steps:</p>
- <ul><li><p>Set a timer so that in <var title="">time</var> seconds,
+ <ul>
+
+ <li><p>Set a timer so that in <var title="">time</var> seconds,
adjusted to take into account user or user agent preferences,
if the user has not canceled the redirect, the user agent <a href=#navigate title=navigate>navigates</a> the document's browsing
context to <var title="">url</var>, with <a href=#replacement-enabled>replacement
@@ -9517,19 +10336,25 @@
<li><p>Do nothing.</li>
- </ul><p>In addition, the user agent may, as with anything, inform the
+ </ul>
+
+ <p>In addition, the user agent may, as with anything, inform the
user of any and all aspects of its operation, including the
state of any timers, the destinations of any timed redirects,
and so forth.</p>
</li>
- </ol><p>For <code><a href=#meta>meta</a></code> elements in the <a href=#attr-meta-http-equiv-refresh title=attr-meta-http-equiv-refresh>Refresh state</a>, the
+ </ol>
+
+ <p>For <code><a href=#meta>meta</a></code> elements in the <a href=#attr-meta-http-equiv-refresh title=attr-meta-http-equiv-refresh>Refresh state</a>, the
<code title=attr-meta-content><a href=#attr-meta-content>content</a></code> attribute must have
a value consisting either of:
- <ul><li> just a <a href=#valid-non-negative-integer>valid non-negative integer</a>, or</li>
+ <ul>
+ <li> just a <a href=#valid-non-negative-integer>valid non-negative integer</a>, or</li>
+
<li> a <a href=#valid-non-negative-integer>valid non-negative integer</a>, followed by a
U+003B SEMICOLON (<code title="">;</code>), followed by one or
more <a href=#space-character title="space character">space characters</a>,
@@ -9538,14 +10363,18 @@
LATIN SMALL LETTER R, a U+004C LATIN CAPITAL LETTER L or a U+006C
LATIN SMALL LETTER L, a U+003D EQUALS SIGN (<code title="">=</code>), and then a <a href=#valid-url>valid URL</a>.</li>
- </ul><p>In the former case, the integer represents a number of seconds
+ </ul>
+
+ <p>In the former case, the integer represents a number of seconds
before the page is to be reloaded; in the latter case the integer
represents a number of seconds before the page is to be replaced
by the page at the given <a href=#url>URL</a>.</p>
</dd>
- </dl><p>There must not be more than one <code><a href=#meta>meta</a></code> element with
+ </dl>
+
+ <p>There must not be more than one <code><a href=#meta>meta</a></code> element with
any particular state in the document at a time.</p>
@@ -9571,8 +10400,10 @@
any time to add a pragma directive satisfying these conditions. Such
registrations must specify the following information:</p>
- <dl><dt>Keyword</dt>
+ <dl>
+ <dt>Keyword</dt>
+
<dd><p>The actual name being defined.</dd>
@@ -9586,7 +10417,9 @@
<dd>A link to an IETF RFC defining the corresponding HTTP header.</dd>
- </dl><p>Conformance checkers must use the information given on the WHATWG
+ </dl>
+
+ <p>Conformance checkers must use the information given on the WHATWG
Wiki PragmaExtensions page to establish if a value not explicitly
defined in this specification is allowed or not.</p>
@@ -9604,7 +10437,9 @@
<p>The following restrictions apply to character encoding
declarations:</p>
- <ul><li>The character encoding name given must be the name of the
+ <ul>
+
+ <li>The character encoding name given must be the name of the
character encoding used to serialize the file.</li>
<li>The value must be a valid character encoding name, and must be
@@ -9619,7 +10454,9 @@
declaration must be serialised completely within the first 512
bytes of the document.</li>
- </ul><p>If the document does not start with a BOM, and if its encoding is
+ </ul>
+
+ <p>If the document does not start with a BOM, and if its encoding is
not explicitly given by <a href=#content-type-0 title=Content-Type>Content-Type
metadata</a>, then the character encoding used must be an
<a href=#ascii-compatible-character-encoding>ASCII-compatible character encoding</a>, and, in addition,
@@ -9647,7 +10484,8 @@
<h4 id=the-style-element><span class=secno>4.2.6 </span>The <dfn><code>style</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#metadata-content-0>Metadata content</a>.</dd>
<dd>If the <code title=attr-style-scoped><a href=#attr-style-scoped>scoped</a></code> attribute is present: <a href=#flow-content-0>flow content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
@@ -9674,7 +10512,9 @@
by this element, the <a href=#styling>styling processing model</a> defines
how. <a href=#refsCSSOM>[CSSOM]</a></p>
</dd>
- </dl><p>The <code><a href=#the-style-element>style</a></code> element allows authors to embed style
+ </dl>
+
+ <p>The <code><a href=#the-style-element>style</a></code> element allows authors to embed style
information in their documents. The <code><a href=#the-style-element>style</a></code> element is
one of several inputs to the <a href=#styling>styling processing
model</a>. The element does not <a href=#represents title=represents>represent</a> content for the user.</p>
@@ -9686,7 +10526,7 @@
<!-- XXX this is the second time we have this paragraph here... -->
<p>When examining types to determine if they support the language,
- user agents must not ignore unknown MIME parameters — types
+ user agents must not ignore unknown MIME parameters — types
with unknown parameters must be assumed to be unsupported.</p>
<p>The <dfn id=attr-style-media title=attr-style-media><code>media</code></dfn>
@@ -9778,8 +10618,10 @@
<code>StyleSheet</code> object with the attributes implemented as
follows: <a href=#refsCSSOM>[CSSOM]</a></p>
- <dl><dt>The content type (<code title=dom-stylesheet-type>type</code> DOM attribute)</dt>
+ <dl>
+ <dt>The content type (<code title=dom-stylesheet-type>type</code> DOM attribute)</dt>
+
<dd><p>The content type must be the same as the style's specified
type. For <code><a href=#the-style-element>style</a></code> elements, this is the same as the
<code title=attr-style-type><a href=#attr-style-type>type</a></code> content attribute's
@@ -9809,7 +10651,9 @@
absent, then the style sheet does not have a title. The title is
used for defining <dfn id=alternative-style-sheet-sets>alternative style sheet sets</dfn>.</dd>
- </dl><p>The <dfn id=dom-linkstyle-disabled title=dom-LinkStyle-disabled><code>disabled</code></dfn> DOM
+ </dl>
+
+ <p>The <dfn id=dom-linkstyle-disabled title=dom-LinkStyle-disabled><code>disabled</code></dfn> DOM
attribute on <code><a href=#the-link-element>link</a></code> and <code><a href=#the-style-element>style</a></code> elements must
return false and do nothing on setting, if the <code title=dom-linkstyle-sheet>sheet</code> attribute of their
<code>LinkStyle</code> interface is null. Otherwise, it must return
@@ -9853,7 +10697,8 @@
<h4 id=script><span class=secno>4.3.1 </span>The <dfn><code>script</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#metadata-content-0>Metadata content</a>.</dd>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
@@ -9884,7 +10729,9 @@
attribute DOMString <a href=#dom-script-text title=dom-script-text>text</a>;
};</pre>
</dd>
- </dl><p>The <code><a href=#script>script</a></code> element allows authors to include dynamic
+ </dl>
+
+ <p>The <code><a href=#script>script</a></code> element allows authors to include dynamic
script and data blocks in their documents. The element does not
<a href=#represents title=represents>represent</a> content for the user.</p>
@@ -9973,7 +10820,9 @@
in the following list, the user agent must <a href=#running-a-script title="running a
script">run</a> the <code><a href=#script>script</a></code> element:</p>
- <ul><li>The <code><a href=#script>script</a></code> element gets <a href=#insert-an-element-into-a-document title="insert an
+ <ul>
+
+ <li>The <code><a href=#script>script</a></code> element gets <a href=#insert-an-element-into-a-document title="insert an
element into a document">inserted into a document</a>.</li>
<li>The <code><a href=#script>script</a></code> element's child nodes are changed.</li>
@@ -9981,15 +10830,21 @@
<li>The <code><a href=#script>script</a></code> element has a <code title=attr-script-src><a href=#attr-script-src>src</a></code> attribute set where previously
the elment had no such attribute.</li>
- </ul><p><dfn id=running-a-script title="running a script">Running a script</dfn>: When a
+ </ul>
+
+ <p><dfn id=running-a-script title="running a script">Running a script</dfn>: When a
<code><a href=#script>script</a></code> element is to be run, the user agent must act as
follows:</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>If either:</p>
- <ul class=brief><li>the <code><a href=#script>script</a></code> element has a <code title=attr-script-type><a href=#attr-script-type>type</a></code> attribute and its value is
+ <ul class=brief>
+
+ <li>the <code><a href=#script>script</a></code> element has a <code title=attr-script-type><a href=#attr-script-type>type</a></code> attribute and its value is
the empty string, or</li>
<li>the <code><a href=#script>script</a></code> element has no <code title=attr-script-type><a href=#attr-script-type>type</a></code> attribute but it has a <code title=attr-script-language>language</code> attribute and
@@ -9997,7 +10852,9 @@
<li>the <code><a href=#script>script</a></code> element has neither a <code title=attr-script-type><a href=#attr-script-type>type</a></code> attribute nor a <code title=attr-script-language>language</code> attribute, then</li>
- </ul><p>...let <var><a href="#the-script-block's-type">the script block's type</a></var> for this
+ </ul>
+
+ <p>...let <var><a href="#the-script-block's-type">the script block's type</a></var> for this
<code><a href=#script>script</a></code> element be "<code title="">text/javascript</code>".</p>
<p>Otherwise, if the <code><a href=#script>script</a></code> element has a <code title=attr-script-type><a href=#attr-script-type>type</a></code> attribute, let <var><a href="#the-script-block's-type">the
@@ -10100,7 +10957,9 @@
<p>Then, the first of the following options that describes the
situation must be followed:</p>
- <dl class=switch><dt>If the document is still being parsed, and the element has a
+ <dl class=switch>
+
+ <dt>If the document is still being parsed, and the element has a
<code title=attr-script-defer><a href=#attr-script-defer>defer</a></code> attribute, and the
element does not have an <code title=attr-script-async><a href=#attr-script-async>async</a></code> attribute</dt>
@@ -10155,23 +11014,31 @@
script block">execute the script block</a>, even if other
scripts are already executing.</dd>
- </dl></li>
+ </dl>
- </ol><p><dfn id=when-a-script-completes-loading>When a script completes loading</dfn>: If the
+ </li>
+
+ </ol>
+
+ <p><dfn id=when-a-script-completes-loading>When a script completes loading</dfn>: If the
<code><a href=#script>script</a></code> element was added to one of the lists mentioned
above and the document is still being parsed, then the parser
handles it. Otherwise, the UA must run the following steps as the
<a href=#concept-task title=concept-task>task</a> that the <a href=#networking-task-source>networking
task source</a> places on the <a href=#task-queue>task queue</a>:</p>
- <dl class=switch><dt>If the <code><a href=#script>script</a></code> element was added to the <dfn id=list-of-scripts-that-will-execute-when-the-document-has-finished-parsing>list
+ <dl class=switch>
+
+ <dt>If the <code><a href=#script>script</a></code> element was added to the <dfn id=list-of-scripts-that-will-execute-when-the-document-has-finished-parsing>list
of scripts that will execute when the document has finished
parsing</dfn>:</dt>
<dd>
- <ol><li>
+ <ol>
+ <li>
+
<p>If the <code><a href=#script>script</a></code> element is not the first element
in the list, then do nothing yet. Stop going through these
steps.</p>
@@ -10200,15 +11067,19 @@
</li>
- </ol></dd>
+ </ol>
+ </dd>
+
<dt>If the <code><a href=#script>script</a></code> element was added to the <dfn id=list-of-scripts-that-will-execute-asynchronously>list
of scripts that will execute asynchronously</dfn>:</dt>
<dd>
- <ol><li>
+ <ol>
+ <li>
+
<p>If the script is not the first element in the list, then do
nothing yet. Stop going through these steps.</p>
@@ -10238,15 +11109,19 @@
</li>
- </ol></dd>
+ </ol>
+ </dd>
+
<dt>If the <code><a href=#script>script</a></code> element was added to the <dfn id=list-of-scripts-that-will-execute-as-soon-as-possible>list
of scripts that will execute as soon as possible</dfn>:</dt>
<dd>
- <ol><li>
+ <ol>
+ <li>
+
<p><a href=#executing-a-script-block title="executing a script block">Execute the
script block</a>.</p>
@@ -10258,15 +11133,21 @@
</li>
- </ol></dd>
+ </ol>
- </dl><p>Fetching an external script must <a href=#delay-the-load-event>delay the <code title=event-load>load</code> event</a>.</p>
+ </dd>
+ </dl>
+
+ <p>Fetching an external script must <a href=#delay-the-load-event>delay the <code title=event-load>load</code> event</a>.</p>
+
<p><dfn id=executing-a-script-block title="executing a script block">Executing a script
block</dfn>: When the steps above require that the script block be
executed, the user agent must act as follows:</p>
- <dl class=switch><dt>If the load resulted in an error (for example a DNS error, or
+ <dl class=switch>
+
+ <dt>If the load resulted in an error (for example a DNS error, or
an HTTP 404 error)</dt>
<dd><p>Executing the script block must just consist of <a href=#fire-an-error-event title="fire an error event">firing an <code title=event-error>error</code> event</a> at the
@@ -10277,13 +11158,17 @@
<!-- SCRIPT EXEC -->
<dd>
- <ol><li>
+ <ol>
+ <li>
+
<p>Initialize <dfn id="the-script-block's-source"><var>the script block's source</var></dfn> as
follows:</p>
- <dl class=switch><dt>If the script is from an external file</dt>
+ <dl class=switch>
+ <dt>If the script is from an external file</dt>
+
<dd>
<p>The contents of that file, interpreted as string of
@@ -10298,27 +11183,37 @@
column of that row, irrespective of any previous value:</p>
<!-- this table is present in several forms in this file; keep them in sync -->
- <table><thead><tr><th>Bytes in Hexadecimal
+ <table>
+ <thead>
+ <tr>
+ <th>Bytes in Hexadecimal
<th>Encoding
- <tbody><!-- nobody uses this
+ <tbody>
+<!-- nobody uses this
<tr>
<td>00 00 FE FF
<td>UTF-32BE
<tr>
<td>FF FE 00 00
<td>UTF-32LE
---><tr><td>FE FF
+-->
+ <tr>
+ <td>FE FF
<td>UTF-16BE
- <tr><td>FF FE
+ <tr>
+ <td>FF FE
<td>UTF-16LE
- <tr><td>EF BB BF
+ <tr>
+ <td>EF BB BF
<td>UTF-8
<!-- nobody uses this
<tr>
<td>DD 73 66 73
<td>UTF-EBCDIC
-->
- </table><p class=note>This step looks for Unicode Byte Order Marks
+ </table>
+
+ <p class=note>This step looks for Unicode Byte Order Marks
(BOMs).</p>
<p>The file must then be converted to Unicode using the
@@ -10347,8 +11242,10 @@
</dd>
- </dl></li>
+ </dl>
+ </li>
+
<li>
<p><a href=#create-a-script-from-a-node title="create a script from a node">Create a
@@ -10368,9 +11265,13 @@
</li>
- </ol></dd>
+ </ol>
- </dl><p>The DOM attributes <dfn id=dom-script-src title=dom-script-src><code>src</code></dfn>, <dfn id=dom-script-type title=dom-script-type><code>type</code></dfn>, <dfn id=dom-script-charset title=dom-script-charset><code>charset</code></dfn>, <dfn id=dom-script-async title=dom-script-async><code>async</code></dfn>, and <dfn id=dom-script-defer title=dom-script-defer><code>defer</code></dfn>, each must
+ </dd>
+
+ </dl>
+
+ <p>The DOM attributes <dfn id=dom-script-src title=dom-script-src><code>src</code></dfn>, <dfn id=dom-script-type title=dom-script-type><code>type</code></dfn>, <dfn id=dom-script-charset title=dom-script-charset><code>charset</code></dfn>, <dfn id=dom-script-async title=dom-script-async><code>async</code></dfn>, and <dfn id=dom-script-defer title=dom-script-defer><code>defer</code></dfn>, each must
<a href=#reflect>reflect</a> the respective content attributes of the same
name.</p>
@@ -10421,7 +11322,9 @@
<p>The following lists some MIME types and the languages to which
they refer:</p>
- <dl><dt><code>text/javascript</code></dt>
+ <dl>
+
+ <dt><code>text/javascript</code></dt>
<dt><code>text/javascript1.1</code></dt>
<dt><code>text/javascript1.2</code></dt>
<dt><code>text/javascript1.3</code></dt>
@@ -10430,10 +11333,12 @@
<dt><code>text/javascript;e4x=1</code></dt>
<dd>ECMAScript with ECMAScript for XML. <a href=#refsECMA357>[ECMA357]</a></dd>
- </dl><p>User agents may support other MIME types and other languages.</p>
+ </dl>
+ <p>User agents may support other MIME types and other languages.</p>
+
<p>When examining types to determine if they support the language,
- user agents must not ignore unknown MIME parameters — types
+ user agents must not ignore unknown MIME parameters — types
with unknown parameters must be assumed to be unsupported.</p>
<!--
@@ -10490,7 +11395,8 @@
<h4 id=the-noscript-element><span class=secno>4.3.2 </span>The <dfn><code>noscript</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#metadata-content-0>Metadata content</a>.</dd>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
@@ -10505,7 +11411,9 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-noscript-element>noscript</a></code> element <a href=#represents>represents</a> nothing
+ </dl>
+
+ <p>The <code><a href=#the-noscript-element>noscript</a></code> element <a href=#represents>represents</a> nothing
if <a href=#concept-n-script title=concept-n-script>scripting is enabled</a>, and
<a href=#represents>represents</a> its children if <a href=#concept-n-noscript title=concept-n-noscript>scripting is disabled</a>. It is used
to present different markup to user agents that support scripting
@@ -10515,7 +11423,9 @@
<p>When used in <a href=#html-documents>HTML documents</a>, the allowed content
model is as follows:</p>
- <dl><dt>In a <code><a href=#the-head-element>head</a></code> element, if <a href=#concept-n-noscript title=concept-n-noscript>scripting is disabled</a> for the
+ <dl>
+
+ <dt>In a <code><a href=#the-head-element>head</a></code> element, if <a href=#concept-n-noscript title=concept-n-noscript>scripting is disabled</a> for the
<code><a href=#the-noscript-element>noscript</a></code> element</dt>
<dd><p>The <code><a href=#the-noscript-element>noscript</a></code> element must contain only
@@ -10553,14 +11463,18 @@
elements, and such that no step in the algorithm causes an
<a href=#html-parser>HTML parser</a> to flag a <a href=#parse-error>parse error</a>:</p>
- <ol><li>Remove every <code><a href=#script>script</a></code> element from the
+ <ol>
+
+ <li>Remove every <code><a href=#script>script</a></code> element from the
document.</li>
<li>Make a list of every <code><a href=#the-noscript-element>noscript</a></code> element in the
document. For every <code><a href=#the-noscript-element>noscript</a></code> element in that list,
perform the following steps:
- <ol><li>Let the <var title="">parent element</var> be the parent
+ <ol>
+
+ <li>Let the <var title="">parent element</var> be the parent
element of the <code><a href=#the-noscript-element>noscript</a></code> element.</li>
<li>Take all the children of the <var title="">parent element</var>
@@ -10589,11 +11503,17 @@
<var title="">parent element</var>, preserving their original
relative order.</li>
- </ol></li>
+ </ol>
- </ol></dd>
+ </li>
- </dl><p class=note>All these contortions are required because, for
+ </ol>
+
+ </dd>
+
+ </dl>
+
+ <p class=note>All these contortions are required because, for
historical reasons, the <code><a href=#the-noscript-element>noscript</a></code> element is handled
differently by the <a href=#html-parser>HTML parser</a> based on whether <a href=#scripting-flag title="scripting flag">scripting was enabled or not</a> when the
parser was invoked. The element is not allowed in XML, because in
@@ -10618,7 +11538,8 @@
<h4 id=the-eventsource-element><span class=secno>4.3.3 </span>The <dfn><code>eventsource</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#metadata-content-0>Metadata content</a>.</dd>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
@@ -10636,7 +11557,9 @@
attribute DOMString <a href=#dom-eventsource-src title=dom-eventsource-src>src</a>;
};</pre>
</dd>
- </dl><p>The <code><a href=#the-eventsource-element>eventsource</a></code> element <a href=#represents>represents</a> a
+ </dl>
+
+ <p>The <code><a href=#the-eventsource-element>eventsource</a></code> element <a href=#represents>represents</a> a
target for events generated by a remote server.</p>
<p>The <dfn id=attr-eventsource-src title=attr-eventsource-src><code>src</code></dfn>
@@ -10673,7 +11596,9 @@
<p>The <dfn id=add-declared-event-source>add declared event source</dfn> algorithm is as
follows:</p>
- <ol><li><a href=#resolve-a-url title="resolve a url">Resolve</a> the <a href=#url>URL</a>
+ <ol>
+
+ <li><a href=#resolve-a-url title="resolve a url">Resolve</a> the <a href=#url>URL</a>
specified by the <code><a href=#the-eventsource-element>eventsource</a></code> element's <code title=attr-eventsource-src><a href=#attr-eventsource-src>src</a></code> attribute, relative to the
element.</li>
@@ -10687,10 +11612,14 @@
<li>Let the element's <i>current declared event source</i> be that
<a href=#absolute-url>absolute URL</a>.</li>
- </ol><p>The <dfn id=remove-declared-event-source>remove declared event source</dfn> algorithm is as
+ </ol>
+
+ <p>The <dfn id=remove-declared-event-source>remove declared event source</dfn> algorithm is as
follows:</p>
- <ol><li>If the element's <i>current declared event source</i> is
+ <ol>
+
+ <li>If the element's <i>current declared event source</i> is
"undefined", abort these steps.</li>
<li>Otherwise, remove the element's <i>current declared event
@@ -10700,7 +11629,9 @@
<li>Let the element's <i>current declared event source</i> be
"undefined".</li>
- </ol><p>There can be more than one <code><a href=#the-eventsource-element>eventsource</a></code> element per
+ </ol>
+
+ <p>There can be more than one <code><a href=#the-eventsource-element>eventsource</a></code> element per
document, but authors should take care to avoid opening multiple
connections to the same server as HTTP recommends a limit to the
number of simultaneous connections that a user agent can open per
@@ -10725,7 +11656,8 @@
<h4 id=the-body-element><span class=secno>4.4.1 </span>The <dfn><code>body</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#sectioning-root>Sectioning root</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>As the second element in an <code><a href=#the-html-element>html</a></code> element.</dd>
@@ -10760,7 +11692,9 @@
attribute <a href=#function>Function</a> <a href=#handler-window-onunload title=handler-window-onunload>onunload</a>;
};</pre>
</dd>
- </dl><p>The <code><a href=#the-body-element>body</a></code> element <a href=#represents>represents</a> the main
+ </dl>
+
+ <p>The <code><a href=#the-body-element>body</a></code> element <a href=#represents>represents</a> the main
content of the document.</p>
<p>In conforming documents, there is only one <code><a href=#the-body-element>body</a></code>
@@ -10806,7 +11740,8 @@
<h4 id=the-section-element><span class=secno>4.4.2 </span>The <dfn><code>section</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#sectioning-content-0>Sectioning content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
@@ -10817,7 +11752,9 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-section-element>section</a></code> element <a href=#represents>represents</a> a
+ </dl>
+
+ <p>The <code><a href=#the-section-element>section</a></code> element <a href=#represents>represents</a> a
generic document or application section. A section, in this context,
is a thematic grouping of content, typically with a header, possibly
with a footer.</p>
@@ -10854,7 +11791,8 @@
<h4 id=the-nav-element><span class=secno>4.4.3 </span>The <dfn><code>nav</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#sectioning-content-0>Sectioning content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
@@ -10865,10 +11803,12 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-nav-element>nav</a></code> element <a href=#represents>represents</a> a section of
+ </dl>
+
+ <p>The <code><a href=#the-nav-element>nav</a></code> element <a href=#represents>represents</a> a section of
a page that links to other pages or to parts within the page: a
section with navigation links. Not all groups of links on a page
- need to be in a <code><a href=#the-nav-element>nav</a></code> element — only sections that
+ need to be in a <code><a href=#the-nav-element>nav</a></code> element — only sections that
consist of primary navigation blocks are appropriate for the
<code><a href=#the-nav-element>nav</a></code> element. In particular, it is common for footers to
have a list of links to various key parts of a site, but the
@@ -10899,7 +11839,7 @@
<p>...<em>page content would be here</em>...</p>
</article>
<footer>
- <p>Copyright © 2006 The Example Company</p>
+ <p>Copyright © 2006 The Example Company</p>
<p><a href="about.html">About</a> -
<a href="policy.html">Privacy Policy</a> -
<a href="contact.html">Contact Us</a></p>
@@ -10911,7 +11851,8 @@
<h4 id=the-article-element><span class=secno>4.4.4 </span>The <dfn><code>article</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#sectioning-content-0>Sectioning content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
@@ -10925,7 +11866,9 @@
-->
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-article-element>article</a></code> element <a href=#represents>represents</a> a
+ </dl>
+
+ <p>The <code><a href=#the-article-element>article</a></code> element <a href=#represents>represents</a> a
section of a page that consists of a composition that forms an
independent part of a document, page, or site. This could be a forum
post, a magazine or newspaper article, a Web log entry, a
@@ -10956,7 +11899,8 @@
<h4 id=the-aside-element><span class=secno>4.4.5 </span>The <dfn><code>aside</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#sectioning-content-0>Sectioning content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
@@ -10967,7 +11911,9 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-aside-element>aside</a></code> element <a href=#represents>represents</a> a section
+ </dl>
+
+ <p>The <code><a href=#the-aside-element>aside</a></code> element <a href=#represents>represents</a> a section
of a page that consists of content that is tangentially related to
the content around the <code><a href=#the-aside-element>aside</a></code> element, and which could
be considered separate from that content. Such sections are often
@@ -11007,7 +11953,7 @@
paid to do my hobby, so I never know what to answer. </q>
</aside>
-<p>Of course his work — or should that be hobby? —
+<p>Of course his work — or should that be hobby? —
isn't his only passion. He also enjoys other pleasures.</p>
...</pre>
@@ -11021,7 +11967,8 @@
<dfn><code>h5</code></dfn>, and <dfn><code>h6</code></dfn>
elements</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#heading-content-0>Heading content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
@@ -11032,8 +11979,10 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>These elements define headers for their sections.</p>
+ </dl>
+ <p>These elements define headers for their sections.</p>
+
<p>The semantics and meaning of these elements are defined in the
section on <a href=#headings-and-sections>headings and sections</a>.</p>
@@ -11045,7 +11994,8 @@
<h4 id=the-header-element><span class=secno>4.4.7 </span>The <dfn><code>header</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#heading-content-0>Heading content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
@@ -11059,18 +12009,20 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-header-element>header</a></code> element <a href=#represents>represents</a> the
+ </dl>
+
+ <p>The <code><a href=#the-header-element>header</a></code> element <a href=#represents>represents</a> the
header of a section. The element is typically used to group a set of
- <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h1</a></code>–<code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h6</a></code> elements to mark up a page's
+ <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h1</a></code>–<code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h6</a></code> elements to mark up a page's
title with its subtitle or tagline. However, <code><a href=#the-header-element>header</a></code>
elements may contain more than just the section's headings and
- subheadings — for example it would be reasonable for the
+ subheadings — for example it would be reasonable for the
header to include version history information.
<p>For the purposes of document summaries, outlines, and the like,
the text of <code><a href=#the-header-element>header</a></code> elements is defined to be the text
of the highest <a href=#rank title=rank>ranked</a>
- <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h1</a></code>–<code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h6</a></code> element descendant of the
+ <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h1</a></code>–<code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h6</a></code> element descendant of the
<code><a href=#the-header-element>header</a></code> element, if there are any such elements, and the
first such element if there are multiple elements with that
<a href=#rank>rank</a>. If there are no such elements, then the text of
@@ -11132,7 +12084,8 @@
<h4 id=the-footer-element><span class=secno>4.4.8 </span>The <dfn><code>footer</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>Where <a href=#flow-content-0>flow content</a> is expected.</dd>
@@ -11144,7 +12097,9 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-footer-element>footer</a></code> element <a href=#represents>represents</a> a footer
+ </dl>
+
+ <p>The <code><a href=#the-footer-element>footer</a></code> element <a href=#represents>represents</a> a footer
for the section it <a href=#applyToSection>applies</a> to. A
footer typically contains information about its section such as who
wrote it, links to related documents, copyright data, and the
@@ -11183,7 +12138,8 @@
<h4 id=the-address-element><span class=secno>4.4.9 </span>The <dfn><code>address</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>Where <a href=#flow-content-0>flow content</a> is expected.</dd>
@@ -11196,7 +12152,9 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-address-element>address</a></code> element <a href=#represents>represents</a> the
+ </dl>
+
+ <p>The <code><a href=#the-address-element>address</a></code> element <a href=#represents>represents</a> the
contact information for the section it <a href=#applyToSection>applies</a> to. If it applies to <a href=#the-body-element-0>the
body element</a>, then it instead applies to the document as a
whole.</p>
@@ -11246,7 +12204,7 @@
<h4 id=headings-and-sections><span class=secno>4.4.10 </span><dfn>Headings and sections</dfn></h4>
- <p>The <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h1</a></code>–<code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h6</a></code> elements and the
+ <p>The <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h1</a></code>–<code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h6</a></code> elements and the
<code><a href=#the-header-element>header</a></code> element are headings.</p>
<p>The first element of <a href=#heading-content-0>heading content</a> in an element
@@ -11284,9 +12242,11 @@
<p>Grunt</p>
</body></pre>
<p>...the structure would be:</p>
- <ol><li>
+ <ol>
+ <li>
Foo (heading of explicit <code><a href=#the-body-element>body</a></code> section, containing the "Grunt" paragraph)
- <ol><li>
+ <ol>
+ <li>
Bar (heading starting implied section, containing a block quote and the "Baz" paragraph)
</li>
<li>
@@ -11295,8 +12255,10 @@
<li>
Thud (heading of explicit <code><a href=#the-section-element>section</a></code> section)
</li>
- </ol></li>
- </ol><p>Notice how the <code><a href=#the-section-element>section</a></code> ends the earlier implicit
+ </ol>
+ </li>
+ </ol>
+ <p>Notice how the <code><a href=#the-section-element>section</a></code> ends the earlier implicit
section so that a later paragraph ("Grunt") is back at the top
level.</p>
</div>
@@ -11370,7 +12332,7 @@
associates each node in the DOM tree with a particular section and
potentially a heading. (The sections in the outline aren't
<code><a href=#the-section-element>section</a></code> elements, though some may correspond to such
- elements — they are merely conceptual sections.)</p>
+ elements — they are merely conceptual sections.)</p>
<div class=example>
@@ -11388,12 +12350,14 @@
<p>...results in the following outline being created for the
<code><a href=#the-body-element>body</a></code> node (and thus the entire document):</p>
- <ol class=brief><li>
+ <ol class=brief>
+ <li>
<p>Section created for <code><a href=#the-body-element>body</a></code> node.</p>
<p>Associated with heading "A".</p>
<p>Also associated with paragraph "B".</p>
<p>Nested sections:</p>
- <ol class=brief><li>
+ <ol class=brief>
+ <li>
<p>Section implied for first <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h2</a></code> element.</p>
<p>Associated with heading "C".</p>
<p>Also associated with paragraph "D".</p>
@@ -11405,15 +12369,20 @@
<p>Also associated with paragraph "F".</p>
<p>No nested sections.</p>
</li>
- </ol></li>
- </ol></div>
+ </ol>
+ </li>
+ </ol>
+ </div>
+
<p>The algorithm that must be followed during a walk of a DOM
subtree rooted at a <a href=#sectioning-content-0>sectioning content</a> element or a
<a href=#sectioning-root>sectioning root</a> element to determine that element's
<a href=#outline>outline</a> is as follows:</p>
- <ol><li><p>Let <var title="">current outlinee</var> be null. (It holds
+ <ol>
+
+ <li><p>Let <var title="">current outlinee</var> be null. (It holds
the element whose <a href=#outline>outline</a> is being created.)</li>
<li><p>Let <var title="">current section</var> be null. (It holds a
@@ -11429,7 +12398,9 @@
the first relevant step below for each element as you enter and
exit it.</p>
- <dl class=switch><dt>If the top of the stack is an element, and you are exiting
+ <dl class=switch>
+
+ <dt>If the top of the stack is an element, and you are exiting
that element</dt>
<dd>
@@ -11494,8 +12465,10 @@
<p>Run these steps:</p>
- <ol><li><p>Pop the top element from the stack, and let the <var title="">current outlinee</var> be that element.</li>
+ <ol>
+ <li><p>Pop the top element from the stack, and let the <var title="">current outlinee</var> be that element.</li>
+
<li><p>Let <var title="">current section</var> be the last
section in the <a href=#outline>outline</a> of the <var title="">current
outlinee</var> element.</li>
@@ -11510,9 +12483,11 @@
<li><p>Go back to the substep labeled <i>finding the deepest
child</i>.</li>
- </ol></dd>
+ </ol>
+ </dd>
+
<dt>When exiting a <a href=#sectioning-content-0>sectioning content</a> element or a
<a href=#sectioning-root>sectioning root</a> element</dt>
@@ -11554,8 +12529,10 @@
<p>Otherwise, run these substeps:</p>
- <ol><li><p>Let <var title="">candidate section</var> be <var title="">current section</var>.</li>
+ <ol>
+ <li><p>Let <var title="">candidate section</var> be <var title="">current section</var>.</li>
+
<li><p>If the element being entered has a <a href=#rank>rank</a>
lower than the <a href=#rank>rank</a> of the heading of the <var title="">candidate section</var>, then create a new <a href=#concept-section title=concept-section>section</a>, and append it to <var title="">candidate section</var>. (This does not change which
section is the last section in the outline.) Let <var title="">current section</var> be this new section. Let the
@@ -11569,7 +12546,9 @@
<li><p>Return to step 2.</li>
- </ol><p>Push the element being entered onto the stack. (This causes
+ </ol>
+
+ <p>Push the element being entered onto the stack. (This causes
the algorithm to skip any descendants of the element.)</p>
<p class=note>Recall that <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h1</a></code> has the
@@ -11583,7 +12562,9 @@
<dd><p>Do nothing.</dd>
- </dl><p id=associatedSection>In addition, whenever you exit a node,
+ </dl>
+
+ <p id=associatedSection>In addition, whenever you exit a node,
after doing the steps above, if <var title="">current
section</var> is not null, associate the node with the <a href=#concept-section title=concept-section>section</a> <var title="">current
section</var>.</p>
@@ -11604,7 +12585,9 @@
element</a>, then the outline created for that element is the
<a href=#outline>outline</a> of the entire document.</li>
- </ol><p>The tree of sections created by the algorithm above, or a proper
+ </ol>
+
+ <p>The tree of sections created by the algorithm above, or a proper
subset thereof, must be used when generating document outlines, for
example when generating tables of contents.</p>
@@ -11684,7 +12667,7 @@
at the root of the outline.</p>
<p class=note>Conceptually, a site is thus a document with many
- articles — when those articles are split into many pages, the
+ articles — when those articles are split into many pages, the
heading of the original single page becomes the heading of the site,
repeated on every page.</p>
@@ -11694,7 +12677,8 @@
<h4 id=the-p-element><span class=secno>4.5.1 </span>The <dfn><code>p</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>Where <a href=#flow-content-0>flow content</a> is expected.</dd>
@@ -11704,7 +12688,9 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-p-element>p</a></code> element <a href=#represents>represents</a> a
+ </dl>
+
+ <p>The <code><a href=#the-p-element>p</a></code> element <a href=#represents>represents</a> a
<a href=#paragraph>paragraph</a>.</p>
<div class=example>
@@ -11763,7 +12749,8 @@
<h4 id=the-hr-element><span class=secno>4.5.2 </span>The <dfn><code>hr</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>Where <a href=#flow-content-0>flow content</a> is expected.</dd>
@@ -11773,7 +12760,9 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-hr-element>hr</a></code> element <a href=#represents>represents</a> a
+ </dl>
+
+ <p>The <code><a href=#the-hr-element>hr</a></code> element <a href=#represents>represents</a> a
<a href=#paragraph>paragraph</a>-level thematic break, e.g. a scene change in
a story, or a transition to another topic within a section of a
reference book.</p>
@@ -11781,7 +12770,8 @@
<h4 id=the-br-element><span class=secno>4.5.3 </span>The <dfn><code>br</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
@@ -11792,7 +12782,9 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-br-element>br</a></code> element <a href=#represents>represents</a> a line
+ </dl>
+
+ <p>The <code><a href=#the-br-element>br</a></code> element <a href=#represents>represents</a> a line
break.</p>
<p><code><a href=#the-br-element>br</a></code> elements must be empty. Any content inside
@@ -11851,7 +12843,8 @@
<h4 id=the-pre-element><span class=secno>4.5.4 </span>The <dfn><code>pre</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>Where <a href=#flow-content-0>flow content</a> is expected.</dd>
@@ -11861,7 +12854,9 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-pre-element>pre</a></code> element <a href=#represents>represents</a> a block of
+ </dl>
+
+ <p>The <code><a href=#the-pre-element>pre</a></code> element <a href=#represents>represents</a> a block of
preformatted text, in which structure is represented by typographic
conventions rather than by elements.</p>
@@ -11873,7 +12868,9 @@
<p>Some examples of cases where the <code><a href=#the-pre-element>pre</a></code> element could
be used:</p>
- <ul><li>Including an e-mail, with paragraphs indicated by blank lines,
+ <ul>
+
+ <li>Including an e-mail, with paragraphs indicated by blank lines,
lists indicated by lines prefixed with a bullet, and so on.</li>
<li>Including fragments of computer code, with structure indicated
@@ -11881,7 +12878,9 @@
<li>Displaying ASCII art.</li> <!-- XXX need a note about non-visual UAs -->
- </ul><p>To represent a block of computer code, the <code><a href=#the-pre-element>pre</a></code>
+ </ul>
+
+ <p>To represent a block of computer code, the <code><a href=#the-pre-element>pre</a></code>
element can be used with a <code><a href=#the-code-element>code</a></code> element; to represent a
block of computer output the <code><a href=#the-pre-element>pre</a></code> element can be used
with a <code><a href=#the-samp-element>samp</a></code> element. Similarly, the <code><a href=#the-kbd-element>kbd</a></code>
@@ -11946,7 +12945,8 @@
<h4 id=the-dialog-element><span class=secno>4.5.5 </span>The <dfn><code>dialog</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>Where <a href=#flow-content-0>flow content</a> is expected.</dd>
@@ -11957,7 +12957,9 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-dialog-element>dialog</a></code> element <a href=#represents>represents</a> a
+ </dl>
+
+ <p>The <code><a href=#the-dialog-element>dialog</a></code> element <a href=#represents>represents</a> a
conversation, meeting minutes, a chat transcript, a dialog in a
screenplay, an instant message log, or some other construct in which
different players take turns in discourse.</p>
@@ -12001,7 +13003,8 @@
<h4 id=the-blockquote-element><span class=secno>4.5.6 </span>The <dfn><code>blockquote</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#sectioning-root>Sectioning root</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
@@ -12019,7 +13022,9 @@
<p class=note>The <code><a href=#htmlquoteelement>HTMLQuoteElement</a></code> interface is
also used by the <code><a href=#the-q-element>q</a></code> element.</p>
</dd>
- </dl><p>The <code><a href=#the-blockquote-element>blockquote</a></code> element <a href=#represents>represents</a> a
+ </dl>
+
+ <p>The <code><a href=#the-blockquote-element>blockquote</a></code> element <a href=#represents>represents</a> a
section that is quoted from another source.</p>
<p>Content inside a <code><a href=#the-blockquote-element>blockquote</a></code> must be quoted from
@@ -12058,7 +13063,8 @@
<h4 id=the-ol-element><span class=secno>4.5.7 </span>The <dfn><code>ol</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>Where <a href=#flow-content-0>flow content</a> is expected.</dd>
@@ -12075,7 +13081,9 @@
attribute long <a href=#dom-ol-start title=dom-ol-start>start</a>;
};</pre>
</dd>
- </dl><p>The <code><a href=#the-ol-element>ol</a></code> element <a href=#represents>represents</a> a list of
+ </dl>
+
+ <p>The <code><a href=#the-ol-element>ol</a></code> element <a href=#represents>represents</a> a list of
items, where the items have been intentionally ordered, such that
changing the order would change the meaning of the document.</p>
@@ -12156,7 +13164,8 @@
<h4 id=the-ul-element><span class=secno>4.5.8 </span>The <dfn><code>ul</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>Where <a href=#flow-content-0>flow content</a> is expected.</dd>
@@ -12166,8 +13175,10 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-ul-element>ul</a></code> element <a href=#represents>represents</a> a list of
- items, where the order of the items is not important — that
+ </dl>
+
+ <p>The <code><a href=#the-ul-element>ul</a></code> element <a href=#represents>represents</a> a list of
+ items, where the order of the items is not important — that
is, where changing the order would not materially change the meaning
of the document.</p>
@@ -12209,7 +13220,8 @@
<h4 id=the-li-element><span class=secno>4.5.9 </span>The <dfn><code>li</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd>None.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>Inside <code><a href=#the-ol-element>ol</a></code> elements.</dd>
@@ -12226,7 +13238,9 @@
attribute long <a href=#dom-li-value title=dom-li-value>value</a>;
};</pre>
</dd>
- </dl><p>The <code><a href=#the-li-element>li</a></code> element <a href=#represents>represents</a> a list
+ </dl>
+
+ <p>The <code><a href=#the-li-element>li</a></code> element <a href=#represents>represents</a> a list
item. If its parent element is an <code><a href=#the-ol-element>ol</a></code>, <code><a href=#the-ul-element>ul</a></code>,
or <code><a href=#menus>menu</a></code> element, then the element is an item of the
parent element's list, as defined for those elements. Otherwise, the
@@ -12260,7 +13274,7 @@
<legend>The top 10 movies of all time</legend>
<ol>
<li value="10"><cite>Josie and the Pussycats</cite>, 2001</li>
- <li value="9"><cite lang="sh">Црна мачка, бели мачор</cite>, 1998</li>
+ <li value="9"><cite lang="sh">Црна мачка, бели мачор</cite>, 1998</li>
<li value="8"><cite>A Bug's Life</cite>, 1998</li>
<li value="7"><cite>Toy Story</cite>, 1995</li>
<li value="6"><cite>Monsters, Inc</cite>, 2001</li>
@@ -12279,7 +13293,7 @@
<legend>The top 10 movies of all time</legend>
<ol reversed>
<li><cite>Josie and the Pussycats</cite>, 2001</li>
- <li><cite lang="sh">Црна мачка, бели мачор</cite>, 1998</li>
+ <li><cite lang="sh">Црна мачка, бели мачор</cite>, 1998</li>
<li><cite>A Bug's Life</cite>, 1998</li>
<li><cite>Toy Story</cite>, 1995</li>
<li><cite>Monsters, Inc</cite>, 2001</li>
@@ -12302,7 +13316,8 @@
<h4 id=the-dl-element><span class=secno>4.5.10 </span>The <dfn><code>dl</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>Where <a href=#flow-content-0>flow content</a> is expected.</dd>
@@ -12314,7 +13329,9 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-dl-element>dl</a></code> element <a href=#represents>represents</a> an
+ </dl>
+
+ <p>The <code><a href=#the-dl-element>dl</a></code> element <a href=#represents>represents</a> an
association list consisting of zero or more name-value groups (a
description list). Each group must consist of one or more names
(<code><a href=#the-dt-element>dt</a></code> elements) followed by one or more values
@@ -12446,7 +13463,8 @@
<h4 id=the-dt-element><span class=secno>4.5.11 </span>The <dfn><code>dt</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd>None.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>Before <code><a href=#the-dd-element>dd</a></code> or <code><a href=#the-dt-element>dt</a></code> elements inside <code><a href=#the-dl-element>dl</a></code> elements.</dd>
@@ -12457,7 +13475,9 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-dt-element>dt</a></code> element <a href=#represents>represents</a> the term, or
+ </dl>
+
+ <p>The <code><a href=#the-dt-element>dt</a></code> element <a href=#represents>represents</a> the term, or
name, part of a term-description group in a description list
(<code><a href=#the-dl-element>dl</a></code> element), and the talker, or speaker, part of a
talker-discourse pair in a conversation (<code><a href=#the-dialog-element>dialog</a></code>
@@ -12497,7 +13517,8 @@
<h4 id=the-dd-element><span class=secno>4.5.12 </span>The <dfn><code>dd</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd>None.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>After <code><a href=#the-dt-element>dt</a></code> or <code><a href=#the-dd-element>dd</a></code> elements inside <code><a href=#the-dl-element>dl</a></code> elements.</dd>
@@ -12508,7 +13529,9 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-dd-element>dd</a></code> element <a href=#represents>represents</a> the
+ </dl>
+
+ <p>The <code><a href=#the-dd-element>dd</a></code> element <a href=#represents>represents</a> the
description, definition, or value, part of a term-description group
in a description list (<code><a href=#the-dl-element>dl</a></code> element), and the discourse,
or quote, part in a conversation (<code><a href=#the-dialog-element>dialog</a></code> element).</p>
@@ -12523,7 +13546,7 @@
<!-- the actual pronunciations below are nonsense. -->
<pre><dl>
<dt><dfn>happiness</dfn></dt>
- <dd class="pronunciation">/'hæ p. nes/</dd>
+ <dd class="pronunciation">/'hæ p. nes/</dd>
<dd class="part-of-speech"><i><abbr>n.</abbr></i></dd>
<dd>The state of being happy.</dd>
<dd>Good fortune; success. <q>Oh <b>happiness</b>! It worked!</q></dd>
@@ -12595,7 +13618,8 @@
<h4 id=the-a-element><span class=secno>4.6.1 </span>The <dfn><code>a</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#interactive-content-0>Interactive content</a>.</dd>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd>When the element only contains <a href=#phrasing-content-0>phrasing content</a>: <a href=#phrasing-content-0>phrasing content</a>.</dd>
@@ -12627,7 +13651,9 @@
<p>The <code title=command-ro><a href=#command-ro>Command</a></code> interface must also be implemented by
this element.</p>
</dd>
- </dl><p>If the <code><a href=#the-a-element>a</a></code> element has an <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute, then it
+ </dl>
+
+ <p>If the <code><a href=#the-a-element>a</a></code> element has an <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute, then it
<a href=#represents>represents</a> a <a href=#hyperlink>hyperlink</a> (a hypertext
anchor).</p>
@@ -12670,7 +13696,9 @@
that represent <span>hyperlinks</span> is to run the following
steps:</p>
- <ol><li><p>If the <code title=event-DOMActivate>DOMActivate</code>
+ <ol>
+
+ <li><p>If the <code title=event-DOMActivate>DOMActivate</code>
event in question is not <span title=concept-events-trusted>trusted</span> (i.e. a <code title=dom-click><a href=#dom-click>click()</a></code> method call was the reason for the
event being dispatched), and the <code><a href=#the-a-element>a</a></code> element's <code title=attr-hyperlink-target><a href=#attr-hyperlink-target>target</a></code> attribute is <span class=XXX>...</span> then raise an
<code><a href=#invalid_access_err>INVALID_ACCESS_ERR</a></code> exception and abort these
@@ -12680,7 +13708,11 @@
event is an <code><a href=#the-img-element>img</a></code> element with an <code title=attr-img-ismap><a href=#attr-img-ismap>ismap</a></code> attribute specified, then
server-side image map processing must be performed, as follows:</p>
- <ol><!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E%0A...%3Ca%20href%3D%22%23%22%3E%3Cimg%20ismap%20usemap%3D%22%23a%22%20src%3D/resources/images/smallcats%3E%3C/a%3E%0A%3Cmap%20name%3Da%3E%3Carea%20shape%3Drect%20coords%3D0%2C0%2C50%2C50%20href%3Db%3E%3C/map%3E --><li>If the <code title=event-DOMActivate>DOMActivate</code>
+ <ol>
+
+ <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E%0A...%3Ca%20href%3D%22%23%22%3E%3Cimg%20ismap%20usemap%3D%22%23a%22%20src%3D/resources/images/smallcats%3E%3C/a%3E%0A%3Cmap%20name%3Da%3E%3Carea%20shape%3Drect%20coords%3D0%2C0%2C50%2C50%20href%3Db%3E%3C/map%3E -->
+
+ <li>If the <code title=event-DOMActivate>DOMActivate</code>
event was dispatched as the result of a real
pointing-device-triggered <code title=event-click>click</code>
event on the <code><a href=#the-img-element>img</a></code> element, then let <var title="">x</var> be the distance in CSS pixels from the left edge
@@ -12697,15 +13729,19 @@
value of <var title="">y</var> expressed as a base-ten integer
using ASCII digits.</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>Finally, the user agent must <a href=#following-hyperlinks title="following
hyperlinks">follow the hyperlink</a> defined by the
<code><a href=#the-a-element>a</a></code> element. If the steps above defined a <var><a href=#hyperlink-suffix>hyperlink
suffix</a></var>, then take that into account when following the
hyperlink.</li>
- </ol><p>The DOM attributes <dfn id=dom-a-href title=dom-a-href><code>href</code></dfn>, <dfn id=dom-a-ping title=dom-a-ping><code>ping</code></dfn>, <dfn id=dom-a-target title=dom-a-target><code>target</code></dfn>, <dfn id=dom-a-rel title=dom-a-rel><code>rel</code></dfn>, <dfn id=dom-a-media title=dom-a-media><code>media</code></dfn>, <dfn id=dom-a-hreflang title=dom-a-hreflang><code>hreflang</code></dfn>, and <dfn id=dom-a-type title=dom-a-type><code>type</code></dfn>, must
+ </ol>
+
+ <p>The DOM attributes <dfn id=dom-a-href title=dom-a-href><code>href</code></dfn>, <dfn id=dom-a-ping title=dom-a-ping><code>ping</code></dfn>, <dfn id=dom-a-target title=dom-a-target><code>target</code></dfn>, <dfn id=dom-a-rel title=dom-a-rel><code>rel</code></dfn>, <dfn id=dom-a-media title=dom-a-media><code>media</code></dfn>, <dfn id=dom-a-hreflang title=dom-a-hreflang><code>hreflang</code></dfn>, and <dfn id=dom-a-type title=dom-a-type><code>type</code></dfn>, must
<a href=#reflect>reflect</a> the respective content attributes of the same
name.</p>
@@ -12745,7 +13781,8 @@
<h4 id=the-q-element><span class=secno>4.6.2 </span>The <dfn><code>q</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
@@ -12759,7 +13796,9 @@
<dd>
The <code><a href=#the-q-element>q</a></code> element uses the <code><a href=#htmlquoteelement>HTMLQuoteElement</a></code> interface.
</dd>
- </dl><p>The <code><a href=#the-q-element>q</a></code> element <a href=#represents>represents</a> some <a href=#phrasing-content-0 title="phrasing content">phrasing content</a> quoted from another
+ </dl>
+
+ <p>The <code><a href=#the-q-element>q</a></code> element <a href=#represents>represents</a> some <a href=#phrasing-content-0 title="phrasing content">phrasing content</a> quoted from another
source.</p>
<p>Quotation punctuation (such as quotation marks) must not appear
@@ -12827,14 +13866,14 @@
<p>In the following example, quotation marks are used instead of
the <code><a href=#the-q-element>q</a></code> element:</p>
- <pre><p>His best argument was ❝I disagree❞, which
+ <pre><p>His best argument was ❝I disagree❞, which
I thought was laughable.</p></pre>
</div>
<div class=example>
- <p>In the following example, there is no quote — the
+ <p>In the following example, there is no quote — the
quotation marks are used to name a word. Use of the <code><a href=#the-q-element>q</a></code>
element in this case would be inappropriate.</p>
@@ -12846,7 +13885,8 @@
<h4 id=the-cite-element><span class=secno>4.6.3 </span>The <dfn><code>cite</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
@@ -12858,7 +13898,9 @@
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
<!-- XXX should the cite element have a cite attribute? -->
- </dl><p>The <code><a href=#the-cite-element>cite</a></code> element <a href=#represents>represents</a> the title
+ </dl>
+
+ <p>The <code><a href=#the-cite-element>cite</a></code> element <a href=#represents>represents</a> the title
of a work (e.g.
a book,
a paper,
@@ -12881,8 +13923,8 @@
referenced in detail (i.e. a citation), or it can just be a work
that is mentioned in passing.</p>
- <p>A person's name is not the title of a work — even if people
- call that person a piece of work — and the element must
+ <p>A person's name is not the title of a work — even if people
+ call that person a piece of work — and the element must
therefore not be used to mark up people's names. (In some cases, the
<code><a href=#the-b-element>b</a></code> element might be appropriate for names; e.g. in a
gossip article where the names of famous people are keywords
@@ -12967,7 +14009,8 @@
<h4 id=the-em-element><span class=secno>4.6.4 </span>The <dfn><code>em</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
@@ -12978,7 +14021,9 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-em-element>em</a></code> element <a href=#represents>represents</a> stress
+ </dl>
+
+ <p>The <code><a href=#the-em-element>em</a></code> element <a href=#represents>represents</a> stress
emphasis of its contents.</p>
<p>The level of emphasis that a particular piece of content has is
@@ -13042,7 +14087,8 @@
<h4 id=the-strong-element><span class=secno>4.6.5 </span>The <dfn><code>strong</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
@@ -13053,7 +14099,9 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-strong-element>strong</a></code> element <a href=#represents>represents</a> strong
+ </dl>
+
+ <p>The <code><a href=#the-strong-element>strong</a></code> element <a href=#represents>represents</a> strong
importance for its contents.</p>
<p>The relative level of importance of a piece of content is given
@@ -13079,7 +14127,8 @@
<h4 id=the-small-element><span class=secno>4.6.6 </span>The <dfn><code>small</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
@@ -13090,7 +14139,9 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-small-element>small</a></code> element <a href=#represents>represents</a> small
+ </dl>
+
+ <p>The <code><a href=#the-small-element>small</a></code> element <a href=#represents>represents</a> small
print (part of a document often describing disclaimers, caveats, or
legal restrictions, such as copyrights or other disadvantages), or
other side comments.</p>
@@ -13110,7 +14161,7 @@
For more details, contact
<a href="mailto:js at example.com">John Smith</a>.
</address>
- <p><small>© copyright 2038 Example Corp.</small></p>
+ <p><small>© copyright 2038 Example Corp.</small></p>
</footer></pre>
</div>
@@ -13156,7 +14207,8 @@
<h4 id=the-mark-element><span class=secno>4.6.7 </span>The <dfn><code>mark</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
@@ -13167,7 +14219,9 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-mark-element>mark</a></code> element <a href=#represents>represents</a> a run of
+ </dl>
+
+ <p>The <code><a href=#the-mark-element>mark</a></code> element <a href=#represents>represents</a> a run of
text in one document marked or highlighted for reference purposes,
due to its relevance in another context. When used in a quotation or
other block of text referred to from the prose, it indicates a
@@ -13292,7 +14346,8 @@
<h4 id=the-dfn-element><span class=secno>4.6.8 </span>The <dfn><code>dfn</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
@@ -13304,7 +14359,9 @@
<dd>Also, the <code title=attr-dfn-title><a href=#attr-dfn-title>title</a></code> attribute has special semantics on this element.</dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-dfn-element>dfn</a></code> element <a href=#represents>represents</a> the defining
+ </dl>
+
+ <p>The <code><a href=#the-dfn-element>dfn</a></code> element <a href=#represents>represents</a> the defining
instance of a term. The <a href=#paragraph title=paragraph>paragraph</a>,
<a href=#the-dl-element title=dl>description list group</a>, or <a href=#sectioning-content-0 title="sectioning content">section</a> that is the nearest
ancestor of the <code><a href=#the-dfn-element>dfn</a></code> element must also contain the
@@ -13360,7 +14417,8 @@
<h4 id=the-abbr-element><span class=secno>4.6.9 </span>The <dfn><code>abbr</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
@@ -13372,7 +14430,9 @@
<dd>Also, the <code title=attr-abbr-title><a href=#attr-abbr-title>title</a></code> attribute has special semantics on this element.</dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-abbr-element>abbr</a></code> element <a href=#represents>represents</a> an
+ </dl>
+
+ <p>The <code><a href=#the-abbr-element>abbr</a></code> element <a href=#represents>represents</a> an
abbreviation or acronym, optionally with its expansion. The <dfn id=attr-abbr-title title=attr-abbr-title><code>title</code></dfn> attribute may be
used to provide an expansion of the abbreviation. The attribute, if
specified, must contain an expansion of the abbreviation, and
@@ -13446,7 +14506,9 @@
<p>Abbreviations do not have to be marked up using this element. It
is expected to be useful in the following cases:</p>
- <ul><li>Abbreviations for which the author wants to give expansions,
+ <ul>
+
+ <li>Abbreviations for which the author wants to give expansions,
where using the <code><a href=#the-abbr-element>abbr</a></code> element with a <code title=attr-title><a href=#the-title-attribute>title</a></code> attribute is an alternative to
including the expansion inline (e.g. in parentheses).</li>
@@ -13461,7 +14523,9 @@
can be used without a <code title=attr-title><a href=#the-title-attribute>title</a></code>
attribute.</li>
- </ul><p title=note>Providing an expansion in a <code title=attr-title><a href=#the-title-attribute>title</a></code> attribute once will not necessarily
+ </ul>
+
+ <p title=note>Providing an expansion in a <code title=attr-title><a href=#the-title-attribute>title</a></code> attribute once will not necessarily
cause other <code><a href=#the-abbr-element>abbr</a></code> elements in the same document with the
same contents but without a <code title=attr-title><a href=#the-title-attribute>title</a></code>
attribute to behave as if they had the same expansion. Every
@@ -13471,7 +14535,8 @@
<h4 id=the-time-element><span class=secno>4.6.10 </span>The <dfn><code>time</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
@@ -13490,7 +14555,9 @@
readonly attribute <a href=#domtimestamp>DOMTimeStamp</a> <a href=#dom-time-timezone title=dom-time-timezone>timezone</a>;
};</pre>
</dd>
- </dl><p>The <code><a href=#the-time-element>time</a></code> element <a href=#represents>represents</a> a precise
+ </dl>
+
+ <p>The <code><a href=#the-time-element>time</a></code> element <a href=#represents>represents</a> a precise
date and/or a time in the proleptic Gregorian calendar. <a href=#refsGREGORIAN>[GREGORIAN]</a></p>
<p>The <dfn id=attr-time-datetime title=attr-time-datetime><code>datetime</code></dfn>
@@ -13509,7 +14576,9 @@
<p>User agents, to obtain the <dfn id=concept-time-date title=concept-time-date>date</dfn>, <dfn id=concept-time-time title=concept-time-time>time</dfn>, and <dfn id=concept-time-timezone title=concept-time-timezone>timezone</dfn> represented by a
<code><a href=#the-time-element>time</a></code> element, must follow these steps:</p>
- <ol><li>If the <code title=attr-time-datetime><a href=#attr-time-datetime>datetime</a></code>
+ <ol>
+
+ <li>If the <code title=attr-time-datetime><a href=#attr-time-datetime>datetime</a></code>
attribute is present, then use the rules to <a href=#parse-a-date-or-time-string>parse a date or
time string</a> with the flag <i>in attribute</i> from the value
of that attribute, and let the result be <var title="">result</var>.</li>
@@ -13530,7 +14599,9 @@
timezone can only be present if both a date and a time are also
present.)</li>
- </ol><p>The <dfn id=dom-time-date title=dom-time-date><code>date</code></dfn> DOM
+ </ol>
+
+ <p>The <dfn id=dom-time-date title=dom-time-date><code>date</code></dfn> DOM
attribute must return null if the <a href=#concept-time-date title=concept-time-date>date</a> is unknown, and otherwise must
return the time corresponding to midnight UTC (i.e. the first
second) of the given <a href=#concept-time-date title=concept-time-date>date</a>.</p>
@@ -13567,7 +14638,7 @@
<p>...the <code><a href=#the-time-element>time</a></code> element's <code title=dom-time-date><a href=#dom-time-date>date</a></code> attribute would have the value
1,159,056,000,000ms, the <code title=dom-time-time><a href=#dom-time-time>time</a></code>
attribute would have the value 18,000,000ms, and the <code title=dom-time-timezone><a href=#dom-time-timezone>timezone</a></code> attribute would return
- −25,200,000ms. To obtain the actual time, the three attributes can
+ −25,200,000ms. To obtain the actual time, the three attributes can
be added together, obtaining 1,159,048,800,000, which is the
specified date and time in UTC.</p>
@@ -13593,7 +14664,8 @@
<h4 id=the-progress-element><span class=secno>4.6.11 </span>The <dfn><code>progress</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
@@ -13612,7 +14684,9 @@
readonly attribute float <a href=#dom-progress-position title=dom-progress-position>position</a>;
};</pre>
</dd>
- </dl><p>The <code><a href=#the-progress-element>progress</a></code> element <a href=#represents>represents</a> the
+ </dl>
+
+ <p>The <code><a href=#the-progress-element>progress</a></code> element <a href=#represents>represents</a> the
completion progress of a task. The progress is either indeterminate,
indicating that progress is being made but that it is not clear how
much more work remains to be done before the task is complete
@@ -13683,7 +14757,9 @@
whether it is a determinate progress bar, and in the latter case,
what its current and maximum values are, all as follows:</p>
- <ol><li>If the <code title=attr-progress-max><a href=#attr-progress-max>max</a></code> attribute is
+ <ol>
+
+ <li>If the <code title=attr-progress-max><a href=#attr-progress-max>max</a></code> attribute is
omitted, and the <code title=attr-progress-value><a href=#attr-progress-value>value</a></code> is
omitted, and the results of parsing the <code><a href=#textcontent>textContent</a></code>
was nothing, then the progress bar is an indeterminate progress
@@ -13736,7 +14812,9 @@
<li>Finally, if the current value is greater than the maximum
value, then the current value is reset to the maximum value.</li>
- </ol><p><strong>UA requirements for showing the progress bar</strong>:
+ </ol>
+
+ <p><strong>UA requirements for showing the progress bar</strong>:
When representing a <code><a href=#the-progress-element>progress</a></code> element to the user, the
UA should indicate whether it is a determinate or indeterminate
progress bar, and in the former case, should indicate the relative
@@ -13753,7 +14831,7 @@
<p>If the progress bar is an indeterminate progress bar, then the
<dfn id=dom-progress-position title=dom-progress-position><code>position</code></dfn> DOM
- attribute must return −1. Otherwise, it must return the result of
+ attribute must return −1. Otherwise, it must return the result of
dividing the current value by the maximum value.</p>
@@ -13761,7 +14839,8 @@
<h4 id=the-meter-element><span class=secno>4.6.12 </span>The <dfn><code>meter</code></dfn> element</h4>
<!-- Keep this after <progress> and NOT close to <time> -->
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
@@ -13787,7 +14866,9 @@
attribute float <a href=#dom-meter-optimum title=dom-meter-optimum>optimum</a>;
};</pre>
</dd>
- </dl><p>The <code><a href=#the-meter-element>meter</a></code> element <a href=#represents>represents</a> a scalar
+ </dl>
+
+ <p>The <code><a href=#the-meter-element>meter</a></code> element <a href=#represents>represents</a> a scalar
measurement within a known range, or a fractional value; for example
disk usage, the relevance of a query result, or the fraction of a
voting population to have selected a particular candidate.</p>
@@ -13799,7 +14880,7 @@
provides a separate <code><a href=#the-progress-element>progress</a></code> element.</p>
<p class=note>The <code><a href=#the-meter-element>meter</a></code> element also does not
- represent a scalar value of arbitrary range — for example, it
+ represent a scalar value of arbitrary range — for example, it
would be wrong to use this to report a weight, or height, unless
there is a known maximum value.</p>
@@ -13834,7 +14915,9 @@
<p>One of the following conditions, along with all the requirements
that are listed with that condition, must be met:</p>
- <dl><dt>There are exactly two numbers in the contents of the element,
+ <dl>
+
+ <dt>There are exactly two numbers in the contents of the element,
and the <code title=attr-meter-value><a href=#attr-meter-value>value</a></code>, <code title=attr-meter-min><a href=#attr-meter-min>min</a></code>, and <code title=attr-meter-max><a href=#attr-meter-max>max</a></code> attributes are all omitted</dt>
<dd>
@@ -13893,17 +14976,22 @@
<p>The following inequalities must hold, as applicable:</p>
- <ul class=brief><li><var title="">minimum</var> ≤ <var title="">value</var> ≤ <var title="">maximum</var></li>
- <li><var title="">minimum</var> ≤ <code title=attr-meter-low><a href=#attr-meter-low>low</a></code> ≤ <var title="">maximum</var> (if <code title=attr-meter-low><a href=#attr-meter-low>low</a></code> is specified)</li>
- <li><var title="">minimum</var> ≤ <code title=attr-meter-high><a href=#attr-meter-high>high</a></code> ≤ <var title="">maximum</var> (if <code title=attr-meter-high><a href=#attr-meter-high>high</a></code> is specified)</li>
- <li><var title="">minimum</var> ≤ <code title=attr-meter-optimum><a href=#attr-meter-optimum>optimum</a></code> ≤ <var title="">maximum</var> (if <code title=attr-meter-optimum><a href=#attr-meter-optimum>optimum</a></code> is specified)</li>
- </ul><p>If both the <code title=attr-meter-low><a href=#attr-meter-low>low</a></code> and <code title=attr-meter-high><a href=#attr-meter-high>high</a></code> attributes are specified, then
+ <ul class=brief>
+ <li><var title="">minimum</var> ≤ <var title="">value</var> ≤ <var title="">maximum</var></li>
+ <li><var title="">minimum</var> ≤ <code title=attr-meter-low><a href=#attr-meter-low>low</a></code> ≤ <var title="">maximum</var> (if <code title=attr-meter-low><a href=#attr-meter-low>low</a></code> is specified)</li>
+ <li><var title="">minimum</var> ≤ <code title=attr-meter-high><a href=#attr-meter-high>high</a></code> ≤ <var title="">maximum</var> (if <code title=attr-meter-high><a href=#attr-meter-high>high</a></code> is specified)</li>
+ <li><var title="">minimum</var> ≤ <code title=attr-meter-optimum><a href=#attr-meter-optimum>optimum</a></code> ≤ <var title="">maximum</var> (if <code title=attr-meter-optimum><a href=#attr-meter-optimum>optimum</a></code> is specified)</li>
+ </ul>
+
+ <p>If both the <code title=attr-meter-low><a href=#attr-meter-low>low</a></code> and <code title=attr-meter-high><a href=#attr-meter-high>high</a></code> attributes are specified, then
the <code title=attr-meter-low><a href=#attr-meter-low>low</a></code> attribute's value must
be less than or equal to the value of the <code title=attr-meter-high><a href=#attr-meter-high>high</a></code> attribute.</p>
</dd>
- </dl><p>For the purposes of these requirements, a number is a sequence of
+ </dl>
+
+ <p>For the purposes of these requirements, a number is a sequence of
characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE
(9), optionally including with a single U+002E FULL STOP character
(.), and separated from other numbers by at least one character that
@@ -13923,7 +15011,7 @@
quarters (of the maximum of whatever is being measured):</p>
<pre><meter>75%</meter>
-<meter>750‰</meter>
+<meter>750‰</meter>
<meter>3/4</meter>
<meter>6 blocks used (out of 8 total)</meter>
<meter>max: 100; current: 75</meter>
@@ -13981,8 +15069,10 @@
evaluated is important, as some of the values refer to earlier
ones.)</p>
- <dl><dt>The minimum value</dt>
+ <dl>
+ <dt>The minimum value</dt>
+
<dd>
<p>If the <code title=attr-meter-min><a href=#attr-meter-min>min</a></code> attribute is
specified and a value could be parsed out of it, then the minimum
@@ -14106,13 +15196,18 @@
</dd>
- </dl><p>All of which will result in the following inequalities all being
+ </dl>
+
+ <p>All of which will result in the following inequalities all being
true:</p>
- <ul class=brief><li>minimum value ≤ actual value ≤ maximum value</li>
- <li>minimum value ≤ low boundary ≤ high boundary ≤ maximum value</li>
- <li>minimum value ≤ optimum point ≤ maximum value</li>
- </ul><p><strong>UA requirements for regions of the gauge</strong>: If the
+ <ul class=brief>
+ <li>minimum value ≤ actual value ≤ maximum value</li>
+ <li>minimum value ≤ low boundary ≤ high boundary ≤ maximum value</li>
+ <li>minimum value ≤ optimum point ≤ maximum value</li>
+ </ul>
+
+ <p><strong>UA requirements for regions of the gauge</strong>: If the
optimum point is equal to the low boundary or the high boundary, or
anywhere in between them, then the region between the low and high
boundaries of the gauge must be treated as the optimum region, and
@@ -14139,8 +15234,7 @@
<div class=example>
<p>The following markup:</p>
- <pre>
-<h3>Suggested groups</h3>
+ <pre><h3>Suggested groups</h3>
<menu type="toolbar">
<a href="?cmd=hsg" onclick="hideSuggestedGroups()">Hide suggested groups</a>
</menu>
@@ -14199,7 +15293,8 @@
<h4 id=the-code-element><span class=secno>4.6.13 </span>The <dfn><code>code</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
@@ -14210,7 +15305,9 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-code-element>code</a></code> element <a href=#represents>represents</a> a fragment
+ </dl>
+
+ <p>The <code><a href=#the-code-element>code</a></code> element <a href=#represents>represents</a> a fragment
of computer code. This could be an XML element name, a filename, a
computer program, or any other string that a computer would
recognize.</p>
@@ -14261,7 +15358,8 @@
<h4 id=the-var-element><span class=secno>4.6.14 </span>The <dfn><code>var</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
@@ -14272,7 +15370,9 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-var-element>var</a></code> element <a href=#represents>represents</a> a
+ </dl>
+
+ <p>The <code><a href=#the-var-element>var</a></code> element <a href=#represents>represents</a> a
variable. This could be an actual variable in a mathematical
expression or programming context, or it could just be a term used
as a placeholder in prose.</p>
@@ -14319,7 +15419,8 @@
<h4 id=the-samp-element><span class=secno>4.6.15 </span>The <dfn><code>samp</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
@@ -14330,7 +15431,9 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-samp-element>samp</a></code> element <a href=#represents>represents</a> (sample)
+ </dl>
+
+ <p>The <code><a href=#the-samp-element>samp</a></code> element <a href=#represents>represents</a> (sample)
output from a program or computing system.</p>
<p class=note>See the <code><a href=#the-pre-element>pre</a></code> and <code><a href=#the-kbd-element>kbd</a></code>
@@ -14358,7 +15461,8 @@
<h4 id=the-kbd-element><span class=secno>4.6.16 </span>The <dfn><code>kbd</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
@@ -14369,7 +15473,9 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-kbd-element>kbd</a></code> element <a href=#represents>represents</a> user input
+ </dl>
+
+ <p>The <code><a href=#the-kbd-element>kbd</a></code> element <a href=#represents>represents</a> user input
(typically keyboard input, although it may also be used to represent
other input, such as voice commands).</p>
@@ -14404,7 +15510,8 @@
<h4 id=the-sub-and-sup-elements><span class=secno>4.6.17 </span>The <dfn><code>sub</code></dfn> and <dfn><code>sup</code></dfn> elements</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dt>Contexts in which these elements may be used:</dt>
@@ -14415,7 +15522,9 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-sub-and-sup-elements>sup</a></code> element <a href=#represents>represents</a> a
+ </dl>
+
+ <p>The <code><a href=#the-sub-and-sup-elements>sup</a></code> element <a href=#represents>represents</a> a
superscript and the <code><a href=#the-sub-and-sup-elements>sub</a></code> element <a href=#represents>represents</a>
a subscript.</p>
@@ -14461,7 +15570,8 @@
<h4 id=the-span-element><span class=secno>4.6.18 </span>The <dfn><code>span</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
@@ -14472,7 +15582,9 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-span-element>span</a></code> element doesn't mean anything on its own,
+ </dl>
+
+ <p>The <code><a href=#the-span-element>span</a></code> element doesn't mean anything on its own,
but can be useful when used together with other attributes,
e.g. <code title=attr-class><a href=#classes>class</a></code>, <code title=attr-lang><a href=#the-lang-and-xml:lang-attributes>lang</a></code>, or <code title=attr-dir><a href=#the-dir-attribute>dir</a></code>. It <a href=#represents>represents</a> its
children.</p>
@@ -14480,7 +15592,8 @@
<h4 id=the-i-element><span class=secno>4.6.19 </span>The <dfn><code>i</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
@@ -14491,7 +15604,9 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-i-element>i</a></code> element <a href=#represents>represents</a> a span of text
+ </dl>
+
+ <p>The <code><a href=#the-i-element>i</a></code> element <a href=#represents>represents</a> a span of text
in an alternate voice or mood, or otherwise offset from the normal
prose, such as a taxonomic designation, a technical term, an
idiomatic phrase from another language, a thought, a ship name, or
@@ -14514,7 +15629,7 @@
princess called Carey. He watched her, day-in, day-out, hoping she
would notice him, but she never did.</i></p>
<p><i>Finally one night he picked up the courage to speak with
-her—</i></p>
+her—</i></p>
<p>Raymond woke with a start as the fire alarm rang out.</p></pre>
</div>
@@ -14537,7 +15652,8 @@
<h4 id=the-b-element><span class=secno>4.6.20 </span>The <dfn><code>b</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
@@ -14548,7 +15664,9 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-b-element>b</a></code> element <a href=#represents>represents</a> a span of text
+ </dl>
+
+ <p>The <code><a href=#the-b-element>b</a></code> element <a href=#represents>represents</a> a span of text
to be stylistically offset from the normal prose without conveying
any extra importance, such as key words in a document abstract,
product names in a review, or other spans of text whose typical
@@ -14577,7 +15695,7 @@
<pre><article>
<h2>Kittens 'adopted' by pet rabbit</h2>
<p><b>Six abandoned kittens have found an unexpected new
- mother figure — a pet rabbit.</b></p>
+ mother figure — a pet rabbit.</b></p>
<p>Veterinary nurse Melanie Humble took the three-week-old
kittens to her Aberdeen home.</p>
<i>[...]</i></pre>
@@ -14605,7 +15723,8 @@
<h4 id=the-bdo-element><span class=secno>4.6.21 </span>The <dfn><code>bdo</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
@@ -14617,7 +15736,9 @@
<dd>Also, the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> global attribute has special semantics on this element.</dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-bdo-element>bdo</a></code> element <a href=#represents>represents</a> explicit
+ </dl>
+
+ <p>The <code><a href=#the-bdo-element>bdo</a></code> element <a href=#represents>represents</a> explicit
text directionality formatting control for its children. It allows
authors to override the Unicode bidi algorithm by explicitly
specifying a direction override. <a href=#refsBIDI>[BIDI]</a></p>
@@ -14653,7 +15774,8 @@
<h4 id=the-ruby-element><span class=secno>4.6.22 </span>The <dfn><code>ruby</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
@@ -14664,7 +15786,9 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-ruby-element>ruby</a></code> element allows one or more spans of
+ </dl>
+
+ <p>The <code><a href=#the-ruby-element>ruby</a></code> element allows one or more spans of
phrasing content to be marked with ruby annotations. Ruby
annotations are short runs of text presented alongside base text,
primarily used in East Asian typography as a guide for
@@ -14682,13 +15806,13 @@
<!-- this is the kanji for the word "kanji" ("chinese character") in japanese -->
<!-- in japanese, ruby-like typography is called "furigana" -->
- <p>In this example, each ideograph in the Japanese text <span lang=ja>漢字</span> is annotated with its kanji
+ <p>In this example, each ideograph in the Japanese text <span lang=ja>漢字</span> is annotated with its kanji
reading.</p>
<pre lang=ja>...
<ruby>
- 漢 <rt> かん </rt>
- 字 <rt> じ </rt>
+ 漢 <rt> かん </rt>
+ 字 <rt> じ </rt>
</ruby>
...</pre>
@@ -14703,12 +15827,12 @@
<!-- this is the bopomofo for the word "hanzi" ("chinese character") in traditional chinese, as used in taiwan -->
<p>In this example, each ideograph in the traditional Chinese text
- <span lang=zh-TW>漢字</span> is annotated with its
+ <span lang=zh-TW>漢字</span> is annotated with its
bopomofo reading.</p>
<pre lang=zh-TW><ruby>
- 漢 <rt> ㄏㄢˋ </rt>
- 字 <rt> ㄗˋ </rt>
+ 漢 <rt> ㄏㄢˋ </rt>
+ 字 <rt> ㄗˋ </rt>
</ruby></pre>
<p>This might be rendered as:</p>
@@ -14722,13 +15846,13 @@
<!-- this is the pinyin for the word "hanzi" ("chinese character") in simplified chinese, as used in mainland china -->
<p>In this example, each ideograph in the simplified Chinese text
- <span lang=zh-CN>汉字</span> is annotated with its
+ <span lang=zh-CN>汉字</span> is annotated with its
pinyin reading.</p>
<pre lang=zh-CN>...
<ruby>
- 汉 <rt> hàn </rt>
- 字 <rt> zì </rt>
+ 汉 <rt> hàn </rt>
+ 字 <rt> zì </rt>
</ruby>
...</pre>
@@ -14743,7 +15867,8 @@
<h4 id=the-rt-element><span class=secno>4.6.23 </span>The <dfn><code>rt</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd>None.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>As a child of a <code><a href=#the-ruby-element>ruby</a></code> element.</dd>
@@ -14753,7 +15878,9 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-rt-element>rt</a></code> element marks the ruby text component of a
+ </dl>
+
+ <p>The <code><a href=#the-rt-element>rt</a></code> element marks the ruby text component of a
ruby annotation.</p>
<p>An <code><a href=#the-rt-element>rt</a></code> element that is a child of a <code><a href=#the-ruby-element>ruby</a></code>
@@ -14769,7 +15896,8 @@
<h4 id=the-rp-element><span class=secno>4.6.24 </span>The <dfn><code>rp</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd>None.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>As a child of a <code><a href=#the-ruby-element>ruby</a></code> element, either immediately before or immediately after an <code><a href=#the-rt-element>rt</a></code> element.</dd>
@@ -14780,7 +15908,9 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-rp-element>rp</a></code> element can be used to provide parentheses
+ </dl>
+
+ <p>The <code><a href=#the-rp-element>rp</a></code> element can be used to provide parentheses
around a ruby text component of a ruby annotation, to be shown by
user agents that don't support ruby annotations.</p>
@@ -14791,14 +15921,14 @@
<div class=example>
- <p>The example above, in which each ideograph in the text <span lang=ja>漢字</span> is annotated with its kanji
+ <p>The example above, in which each ideograph in the text <span lang=ja>漢字</span> is annotated with its kanji
reading, could be expanded to use <code><a href=#the-rp-element>rp</a></code> so that in legacy
user agents the readings are in parentheses:</p>
<pre lang=ja>...
<ruby>
- 漢 <rp>(</rp><rt>かん</rt><rp>)</rp>
- 字 <rp>(</rp><rt>じ</rt><rp>)</rp>
+ 漢 <rp>(</rp><rt>かん</rt><rp>)</rp>
+ 字 <rp>(</rp><rt>じ</rt><rp>)</rp>
</ruby>
...</pre>
@@ -14806,7 +15936,7 @@
in user agents that do not support ruby, the rendering would
be:</p>
- <pre lang=ja>... 漢 (かん) 字 (じ) ...</pre>
+ <pre lang=ja>... 漢 (かん) 字 (じ) ...</pre>
</div>
@@ -14899,8 +16029,8 @@
</dialog>
<aside>
<p>In 1970, the British Empire lay in ruins, and foreign
- nationalists frequented the streets — many of them Hungarians
- (not the streets — the foreign nationals). Sadly, Alexander
+ nationalists frequented the streets — many of them Hungarians
+ (not the streets — the foreign nationals). Sadly, Alexander
Yalt has been publishing incompetently-written phrase books.
</aside></pre>
@@ -14916,7 +16046,8 @@
<h4 id=the-ins-element><span class=secno>4.7.1 </span>The <dfn><code>ins</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd>When the element only contains <a href=#phrasing-content-0>phrasing content</a>: <a href=#phrasing-content-0>phrasing content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
@@ -14929,7 +16060,9 @@
<dd><code title=attr-mod-datetime><a href=#attr-mod-datetime>datetime</a></code></dd>
<dt>DOM interface:</dt>
<dd>Uses the <code><a href=#htmlmodelement>HTMLModElement</a></code> interface.</dd>
- </dl><p>The <code><a href=#the-ins-element>ins</a></code> element <a href=#represents>represents</a> an addition
+ </dl>
+
+ <p>The <code><a href=#the-ins-element>ins</a></code> element <a href=#represents>represents</a> an addition
to the document.</p>
<div class=example>
@@ -14999,7 +16132,8 @@
<h4 id=the-del-element><span class=secno>4.7.2 </span>The <dfn><code>del</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd>When the element only contains <a href=#phrasing-content-0>phrasing content</a>: <a href=#phrasing-content-0>phrasing content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
@@ -15012,7 +16146,9 @@
<dd><code title=attr-mod-datetime><a href=#attr-mod-datetime>datetime</a></code></dd>
<dt>DOM interface:</dt>
<dd>Uses the <code><a href=#htmlmodelement>HTMLModElement</a></code> interface.</dd>
- </dl><p>The <code><a href=#the-del-element>del</a></code> element <a href=#represents>represents</a> a removal
+ </dl>
+
+ <p>The <code><a href=#the-del-element>del</a></code> element <a href=#represents>represents</a> a removal
from the document.</p>
<p><code><a href=#the-del-element>del</a></code> elements should not cross <a href=#paragraph title=paragraph>implied paragraph</a> boundaries.</p>
@@ -15183,7 +16319,8 @@
<h4 id=the-figure-element><span class=secno>4.8.1 </span>The <dfn><code>figure</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#sectioning-root>Sectioning root</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
@@ -15196,7 +16333,11 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><!-- v2: Add a <credit> element for photo credits --><p>The <code><a href=#the-figure-element>figure</a></code> element <a href=#represents>represents</a> some
+ </dl>
+
+ <!-- v2: Add a <credit> element for photo credits -->
+
+ <p>The <code><a href=#the-figure-element>figure</a></code> element <a href=#represents>represents</a> some
<a href=#flow-content-0>flow content</a>, optionally with a caption, which can be
moved away from the main flow of the document without affecting the
document's meaning.</p>
@@ -15314,7 +16455,8 @@
<h4 id=the-img-element><span class=secno>4.8.2 </span>The <dfn><code>img</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dd><a href=#embedded-content-2>Embedded content</a>.</dd>
@@ -15346,8 +16488,10 @@
readonly attribute boolean <a href=#dom-img-complete title=dom-img-complete>complete</a>;
};</pre>
</dd>
- </dl><p>An <code><a href=#the-img-element>img</a></code> element represents an image.</p>
+ </dl>
+ <p>An <code><a href=#the-img-element>img</a></code> element represents an image.</p>
+
<p>The image given by the <dfn id=attr-img-src title=attr-img-src><code>src</code></dfn> attribute is the
embedded content, and the value of the <dfn id=attr-img-alt title=attr-img-alt><code>alt</code></dfn> attribute is the
<code><a href=#the-img-element>img</a></code> element's <a href=#fallback-content>fallback content</a>.</p>
@@ -15381,7 +16525,9 @@
fully transparent images, as they rarely convey meaning and rarely
add anything useful to the document.</p>
- <hr><p>Unless the user agent cannot support images, or its support for
+ <hr>
+
+ <p>Unless the user agent cannot support images, or its support for
images has been disabled, or the user agent only fetches elements on
demand, or the element's <code title=attr-img-src><a href=#attr-img-src>src</a></code>
attribute has a value that is an <i>ignored self-reference</i>,
@@ -15466,9 +16612,13 @@
supported image, <a href=#queue-a-task>queue a task</a> to <a href=#fire-an-error-event>fire an <code title=event-error>error</code> event</a> on the
<code><a href=#the-img-element>img</a></code> element.</p>
- <hr><p>What an <code><a href=#the-img-element>img</a></code> element represents depends on the <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute and the <code title=attr-img-alt><a href=#attr-img-alt>alt</a></code> attribute.</p>
+ <hr>
- <dl class=switch><dt>If the <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute is set
+ <p>What an <code><a href=#the-img-element>img</a></code> element represents depends on the <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute and the <code title=attr-img-alt><a href=#attr-img-alt>alt</a></code> attribute.</p>
+
+ <dl class=switch>
+
+ <dt>If the <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute is set
and the <code title=attr-img-alt><a href=#attr-img-alt>alt</a></code> attribute is set to
the empty string</dt>
@@ -15532,7 +16682,9 @@
response to navigation, provide caption information for the image,
derived as follows:</p>
- <ol><li><p>If the image has a <code title=attr-title><a href=#the-title-attribute>title</a></code>
+ <ol>
+
+ <li><p>If the image has a <code title=attr-title><a href=#the-title-attribute>title</a></code>
attribute whose value is not the empty string, then the value of
that attribute is the caption information; abort these
steps.</li>
@@ -15557,8 +16709,10 @@
<li><p>The caption information is the heading with which the
image is associated according to the outline.</li>
- </ol></dd>
+ </ol>
+ </dd>
+
<dt>If the <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute is not
set and either the <code title=attr-img-alt><a href=#attr-img-alt>alt</a></code> attribute
is set to the empty string or the <code title=attr-img-alt><a href=#attr-img-alt>alt</a></code> attribute is not set at all</dt>
@@ -15577,7 +16731,9 @@
</dd>
- </dl><p>The <code title=attr-img-alt><a href=#attr-img-alt>alt</a></code> attribute does not
+ </dl>
+
+ <p>The <code title=attr-img-alt><a href=#attr-img-alt>alt</a></code> attribute does not
represent advisory information. User agents must not present the
contents of the <code title=attr-img-alt><a href=#attr-img-alt>alt</a></code> attribute in
the same way as content of the <code title=attr-title><a href=#the-title-attribute>title</a></code>
@@ -15594,7 +16750,9 @@
<p>The <em>contents</em> of <code><a href=#the-img-element>img</a></code> elements, if any, are
ignored for the purposes of rendering.</p>
- <hr><p>The <code title=attr-hyperlink-usemap><a href=#attr-hyperlink-usemap>usemap</a></code> attribute,
+ <hr>
+
+ <p>The <code title=attr-hyperlink-usemap><a href=#attr-hyperlink-usemap>usemap</a></code> attribute,
if present, can indicate that the image has an associated
<a href=#image-map>image map</a>.</p>
@@ -15971,14 +17129,14 @@
<pre><article>
<h2>News</h2>
<p>We have recently been looking at buying the <strong><img src="alpha.gif"
- alt=""> ΑΒΓ company</strong>, a small Greek company
+ alt=""> ΑΒΓ company</strong>, a small Greek company
specializing in our type of product.</p></pre>
<p>In this third snippet, we have a logo being used in an aside,
as part of the larger article discussing the acquisition:</p>
<pre> <strong><aside><p><img src="alpha-large.gif" alt=""></p></aside></strong>
- <p>The ΑΒΓ company has had a good quarter, and our
+ <p>The ΑΒΓ company has had a good quarter, and our
pie chart studies of their accounts suggest a much bigger blue slice
than its green and orange slices, which is always a good sign.</p>
</article></pre>
@@ -16177,7 +17335,7 @@
<p>In the following example, a rating is shown as three filled
stars and two empty stars. While the alternative text could have
- been "★★★☆☆", the author has
+ been "★★★☆☆", the author has
instead decided to more helpfully give the rating in the form "3
out of 5". That is the alternative text of the first image, and the
rest have blank alternative text.</p>
@@ -16228,8 +17386,10 @@
<p>How to provide alternative text for an image that is a key part
of the content depends on the image's provenance.</p>
- <dl><dt>The general case</dt>
+ <dl>
+ <dt>The general case</dt>
+
<dd>
<p>When it is possible for detailed alternative text to be
@@ -16365,7 +17525,9 @@
attribute's value may be omitted, but one of the following
conditions must be met as well:</p>
- <ul><li>The <code title=attr-title><a href=#the-title-attribute>title</a></code> attribute is
+ <ul>
+
+ <li>The <code title=attr-title><a href=#the-title-attribute>title</a></code> attribute is
present and has a non-empty value.</li>
<li>The <code><a href=#the-img-element>img</a></code> element is in a <code><a href=#the-figure-element>figure</a></code>
@@ -16378,7 +17540,9 @@
<a href=#concept-section title=concept-section>section</a> has an associated
heading.</li>
- </ul><p class=note>Such cases are to be kept to an absolute
+ </ul>
+
+ <p class=note>Such cases are to be kept to an absolute
minimum. If there is even the slightest possibility of the author
having the ability to provide real alternative text, then it would
not be acceptable to omit the <code title=attr-img-alt><a href=#attr-img-alt>alt</a></code>
@@ -16490,8 +17654,12 @@
</dd>
- </dl><h6 id=an-image-not-intended-for-the-user><span class=secno>4.8.2.1.10 </span>An image not intended for the user</h6>
+ </dl>
+
+
+ <h6 id=an-image-not-intended-for-the-user><span class=secno>4.8.2.1.10 </span>An image not intended for the user</h6>
+
<p>Generally authors should avoid using <code><a href=#the-img-element>img</a></code> elements
for purposes other than showing images.</p>
@@ -16569,7 +17737,8 @@
<h4 id=the-iframe-element><span class=secno>4.8.3 </span>The <dfn><code>iframe</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dd><a href=#embedded-content-2>Embedded content</a>.</dd>
@@ -16602,7 +17771,9 @@
interface must also implement the <code>EmbeddingElement</code>
interface defined in the Window Object specification. <a href=#refsWINDOW>[WINDOW]</a></p> <!-- XXX -->
</dd>
- </dl><p>The <code><a href=#the-iframe-element>iframe</a></code> element <a href=#represents>represents</a> a
+ </dl>
+
+ <p>The <code><a href=#the-iframe-element>iframe</a></code> element <a href=#represents>represents</a> a
<a href=#nested-browsing-context>nested browsing context</a>.</p>
<p>The <dfn id=attr-iframe-src title=attr-iframe-src><code>src</code></dfn> attribute
@@ -16665,7 +17836,11 @@
- <hr><p>The <dfn id=attr-iframe-sandbox title=attr-iframe-sandbox><code>sandbox</code></dfn>
+ <hr>
+
+
+
+ <p>The <dfn id=attr-iframe-sandbox title=attr-iframe-sandbox><code>sandbox</code></dfn>
attribute, when specified, enables a set of extra restrictions on
any content hosted by the <code><a href=#the-iframe-element>iframe</a></code>. Its value must be an
<a href=#unordered-set-of-unique-space-separated-tokens>unordered set of unique space-separated tokens</a>. The
@@ -16680,10 +17855,16 @@
(either directly or indirectly through other nested browsing
contexts) must have the following flags set:</p>
- <dl><!-- XXX disallow cross-origin loads of any kind (networking
+ <dl>
+
+ <!-- XXX disallow cross-origin loads of any kind (networking
override that only allows same-origin URLs or about:,
- javascript:, data:) --><!-- XXX block access to 'contentWindow.frames' from iframe owner --><!-- XXX block access to 'parent.frames' from sandbox --><dt>The <dfn id=sandboxed-navigation-browsing-context-flag>sandboxed navigation browsing context flag</dfn></dt>
+ javascript:, data:) -->
+ <!-- XXX block access to 'contentWindow.frames' from iframe owner -->
+ <!-- XXX block access to 'parent.frames' from sandbox -->
+ <dt>The <dfn id=sandboxed-navigation-browsing-context-flag>sandboxed navigation browsing context flag</dfn></dt>
+
<dd>
<p>This flag <a href=#sandboxLinks>prevents content from
@@ -16785,7 +17966,9 @@
</dd>
- </dl><p>These flags must not be set unless the conditions listed above
+ </dl>
+
+ <p>These flags must not be set unless the conditions listed above
define them as being set.</p>
<div class=example>
@@ -16825,7 +18008,11 @@
- <hr><p>The <dfn id=attr-iframe-seamless title=attr-iframe-seamless><code>seamless</code></dfn>
+ <hr>
+
+
+
+ <p>The <dfn id=attr-iframe-seamless title=attr-iframe-seamless><code>seamless</code></dfn>
attribute is a boolean attribute. When specified, it indicates that
the <code><a href=#the-iframe-element>iframe</a></code> element's <a href=#browsing-context>browsing context</a> is
to be rendered in a manner that makes it appear to be part of the
@@ -16839,7 +18026,9 @@
<a href=#same-origin>same origin</a> as the <code><a href=#the-iframe-element>iframe</a></code> element's
document, the following requirements apply:</p>
- <ul><li><p>The user agent must set the <dfn id=seamless-browsing-context-flag>seamless browsing
+ <ul>
+
+ <li><p>The user agent must set the <dfn id=seamless-browsing-context-flag>seamless browsing
context flag</dfn> to true for that <a href=#browsing-context>browsing
context</a>. This will <a href=#seamlessLinks>cause links to
open in the parent browsing context</a>.</li>
@@ -16905,7 +18094,9 @@
</li>
- </ul><p class=XXX>Parts of the above might get moved into the
+ </ul>
+
+ <p class=XXX>Parts of the above might get moved into the
rendering section at some point.</p>
<p>If the attribute is not specified, or if the <a href=#origin-0>origin</a>
@@ -16941,7 +18132,11 @@
- <hr><p>The <code><a href=#the-iframe-element>iframe</a></code> element supports <a href=#dimension-attributes>dimension
+ <hr>
+
+
+
+ <p>The <code><a href=#the-iframe-element>iframe</a></code> element supports <a href=#dimension-attributes>dimension
attributes</a> for cases where the embedded content has specific
dimensions (e.g. ad units have well-defined dimensions).</p>
@@ -16990,7 +18185,8 @@
- the HIDDEN attribute (might be moot now)
-->
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dd><a href=#embedded-content-2>Embedded content</a>.</dd>
@@ -17017,7 +18213,9 @@
<code><a href=#the-embed-element>embed</a></code> element, the node may also support other
interfaces.</p>
</dd>
- </dl><p>The <code><a href=#the-embed-element>embed</a></code> element <a href=#represents>represents</a> an
+ </dl>
+
+ <p>The <code><a href=#the-embed-element>embed</a></code> element <a href=#represents>represents</a> an
integration point for an external (typically non-HTML) application
or interactive content.</p>
@@ -17075,7 +18273,9 @@
<p>The <dfn id=concept-embed-type title=concept-embed-type>type of the content</dfn>
being embedded is defined as follows:</p>
- <ol><li><p>If the element has a <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute, and that attribute's
+ <ol>
+
+ <li><p>If the element has a <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute, and that attribute's
value is a type that a <a href=#plugin>plugin</a> supports, then the value
of the <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute is the
<span>content's type</span>.</li>
@@ -17107,7 +18307,9 @@
<!-- This algorithm is a monument to bad design. Go legacy! -->
- </ol><p>Whether the resource is fetched successfully or not (e.g. whether
+ </ol>
+
+ <p>Whether the resource is fetched successfully or not (e.g. whether
the response code was a 2xx code <a href=#concept-http-equivalent-codes title=concept-http-equivalent-codes>or equivalent</a>) must be
ignored when determining the resource's type and when handing the
resource to the plugin.</p>
@@ -17158,7 +18360,8 @@
<h4 id=the-object-element><span class=secno>4.8.5 </span>The <dfn><code>object</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dd><a href=#embedded-content-2>Embedded content</a>.</dd>
@@ -17197,7 +18400,9 @@
<code><a href=#the-object-element>object</a></code> element, the node may also support other
interfaces.</p>
</dd>
- </dl><p>The <code><a href=#the-object-element>object</a></code> element can represent an external
+ </dl>
+
+ <p>The <code><a href=#the-object-element>object</a></code> element can represent an external
resource, which, depending on the type of the resource, will either
be treated as an image, as a nested <a href=#browsing-context>browsing context</a>,
or as an external resource to be processed by a
@@ -17229,8 +18434,10 @@
what the <code><a href=#the-object-element>object</a></code> element represents:</p> <!-- Changing
the base URL doesn't trigger this. -->
- <ol><li>
+ <ol>
+ <li>
+
<p>If the element has an ancestor <code><a href=#the-object-element>object</a></code> element that
is <em>not</em> showing its <a href=#fallback-content>fallback content</a>, then
jump to the last step in the overall set of steps (fallback).</p>
@@ -17266,7 +18473,9 @@
<li><p>If the <code title=attr-object-data><a href=#attr-object-data>data</a></code> attribute
is present, then:</p>
- <ol><li><p>If the <code title=attr-object-type><a href=#attr-object-type>type</a></code>
+ <ol>
+
+ <li><p>If the <code title=attr-object-type><a href=#attr-object-type>type</a></code>
attribute is present and its value is not a type that the user
agent supports, and is not a type that the user agent can find a
<a href=#plugin>plugin</a> for, then the user agent may jump to the last
@@ -17303,8 +18512,10 @@
<li><p>Determine the <var title="">resource type</var>, as follows:</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>Let the <var title="">resource type</var> be unknown.</p>
</li>
@@ -17343,12 +18554,16 @@
</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>Handle the content as given by the first of the following
cases that matches:</p>
- <dl class=switch><dt>If the <var title="">resource type</var> can be handled by
+ <dl class=switch>
+
+ <dt>If the <var title="">resource type</var> can be handled by
a <a href=#plugin>plugin</a> and <a href=#sandboxPluginObject>plugins aren't being
sandboxed</a></dt>
@@ -17431,8 +18646,10 @@
</dd>
- </dl></li>
+ </dl>
+ </li>
+
<li><p>The element's contents are not part of what the
<code><a href=#the-object-element>object</a></code> element represents.</p>
@@ -17440,8 +18657,10 @@
element.</li> <!-- XXX ordering of events (like with iframe)
-->
- </ol></li>
+ </ol>
+ </li>
+
<li><p>If the <code title=attr-object-data><a href=#attr-object-data>data</a></code> attribute
is absent but the <code title=attr-object-type><a href=#attr-object-type>type</a></code>
attribute is present, <a href=#sandboxPluginObject>plugins
@@ -17456,7 +18675,9 @@
leading <code><a href=#the-param-element>param</a></code> element children. This is the element's
<a href=#fallback-content>fallback content</a>.</li>
- </ol><p id=object-plugin>When the algorithm above instantiates a
+ </ol>
+
+ <p id=object-plugin>When the algorithm above instantiates a
<a href=#plugin>plugin</a>, the user agent should pass the names and values
of all the attributes on the element, and <!-- then a parameter
named "PARAM" whose value is null, and then --> all the names and
@@ -17564,7 +18785,8 @@
<h4 id=the-param-element><span class=secno>4.8.6 </span>The <dfn><code>param</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd>None.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>As a child of an <code><a href=#the-object-element>object</a></code> element, before any <a href=#flow-content-0>flow content</a>.</dd>
@@ -17581,7 +18803,9 @@
attribute DOMString <a href=#dom-param-value title=dom-param-value>value</a>;
};</pre>
</dd>
- </dl><p>The <code><a href=#the-param-element>param</a></code> element defines parameters for plugins
+ </dl>
+
+ <p>The <code><a href=#the-param-element>param</a></code> element defines parameters for plugins
invoked by <code><a href=#the-object-element>object</a></code> elements. It does not <a href=#represents title=represents>represent</a> anything on its own.</p>
<p>The <dfn id=attr-param-name title=attr-param-name><code>name</code></dfn>
@@ -17605,7 +18829,8 @@
<h4 id=video><span class=secno>4.8.7 </span>The <dfn><code>video</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dd><a href=#embedded-content-2>Embedded content</a>.</dd>
@@ -17634,8 +18859,10 @@
attribute DOMString <a href=#dom-video-poster title=dom-video-poster>poster</a>;
};</pre>
</dd>
- </dl><p>A <code><a href=#video>video</a></code> element represents a video or movie.</p>
+ </dl>
+ <p>A <code><a href=#video>video</a></code> element represents a video or movie.</p>
+
<p>Content may be provided inside the <code><a href=#video>video</a></code>
element. User agents should not show this content to the user; it is
intended for older Web browsers which do not support
@@ -17677,7 +18904,9 @@
<p>The <dfn id=dom-video-poster title=dom-video-poster><code>poster</code></dfn> DOM
attribute must <a href=#reflect>reflect</a> the <code title=attr-video-poster><a href=#attr-video-poster>poster</a></code> content attribute.</p>
- <hr><p>When no video data is available (the element's <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute is either
+ <hr>
+
+ <p>When no video data is available (the element's <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute is either
<code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code> or <code title=dom-media-HAVE_METADATA><a href=#dom-media-have_metadata>HAVE_METADATA</a></code>), the
<code><a href=#video>video</a></code> element <a href=#represents>represents</a> either the
<a href=#poster-frame>poster frame</a>, or nothing.</p>
@@ -17730,7 +18959,9 @@
element <a href=#represents title=represents>represent</a> a link to an
external video playback utility or to the video data itself.</p>
- <hr><p>The <dfn id=concept-video-intrinsic-width title=concept-video-intrinsic-width>intrinsic
+ <hr>
+
+ <p>The <dfn id=concept-video-intrinsic-width title=concept-video-intrinsic-width>intrinsic
width</dfn> and <dfn id=concept-video-intrinsic-height title=concept-video-intrinsic-height>intrinsic height</dfn> of the
<a href=#media-resource>media resource</a> are the dimensions of the resource in
CSS pixels after taking into account the resource's dimensions,
@@ -17768,10 +18999,14 @@
it is the intrinsic height of the <a href=#poster-frame>poster frame</a>, if that
is available; otherwise it is 150 CSS pixels.</p>
- <hr><!-- XXX
+ <hr>
+
+ <!-- XXX
default activation behavior is to do the play() if paused, pause()
otherwise
- --><p>User agents should provide controls to enable or disable the
+ -->
+
+ <p>User agents should provide controls to enable or disable the
display of closed captions associated with the video stream, though
such features should, again, not interfere with the page's normal
rendering.</p>
@@ -17841,7 +19076,8 @@
<h4 id=audio><span class=secno>4.8.8 </span>The <dfn><code>audio</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dd><a href=#embedded-content-2>Embedded content</a>.</dd>
@@ -17865,7 +19101,9 @@
// no members
};</pre>
</dd>
- </dl><p>An <code><a href=#audio>audio</a></code> element <a href=#represents>represents</a> a sound or
+ </dl>
+
+ <p>An <code><a href=#audio>audio</a></code> element <a href=#represents>represents</a> a sound or
audio stream.</p>
<p>Content may be provided inside the <code><a href=#audio>audio</a></code>
@@ -17922,7 +19160,8 @@
<h4 id=the-source-element><span class=secno>4.8.9 </span>The <dfn><code>source</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd>None.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>As a child of a <a href=#media-element>media element</a>, before any <a href=#flow-content-0>flow content</a>.</dd>
@@ -17941,7 +19180,9 @@
attribute DOMString <a href=#dom-source-media title=dom-source-media>media</a>;
};</pre>
</dd>
- </dl><p>The <code><a href=#the-source-element>source</a></code> element allows authors to specify
+ </dl>
+
+ <p>The <code><a href=#the-source-element>source</a></code> element allows authors to specify
multiple <a href=#media-resource title="media resource">media resources</a> for
<a href=#media-element title="media element">media elements</a>. It does not <a href=#represents title=represents>represent</a> anything on its own.</p>
@@ -17961,7 +19202,9 @@
<p>The following list shows some examples of how to use the <code title="">codecs=</code> MIME parameter in the <code title=attr-source-type><a href=#attr-source-type>type</a></code> attribute.</p>
- <dl><dt>H.264 Simple baseline profile video (main and extended video compatible) level 3 and Low-Complexity AAC audio in MP4 container</dt>
+ <dl>
+
+ <dt>H.264 Simple baseline profile video (main and extended video compatible) level 3 and Low-Complexity AAC audio in MP4 container</dt>
<dd><pre><source src="video.mp4" type="video/mp4; codecs="avc1.42E01E, mp4a.40.2""></pre></dd>
<dt>H.264 Extended profile video (baseline-compatible) level 3 and Low-Complexity AAC audio in MP4 container</dt>
@@ -18042,8 +19285,12 @@
<dd><pre><source src="video.mpg" type="video/mpeg; codecs="></pre></dd>
-->
- </dl><!-- XXX #refs https://trac.xiph.org/browser/experimental/ivo/drafts/draft-xiph-rfc3534bis.txt may be relevant --></div>
+ </dl>
+ <!-- XXX #refs https://trac.xiph.org/browser/experimental/ivo/drafts/draft-xiph-rfc3534bis.txt may be relevant -->
+
+ </div>
+
<p>The <dfn id=attr-source-media title=attr-source-media><code>media</code></dfn>
attribute gives the intended media type of the <a href=#media-resource>media
resource</a>, to help the user agent determine if this
@@ -18198,8 +19445,10 @@
attribute of a <code><a href=#mediaerror>MediaError</a></code> object must return the code
for the error, which must be one of the following:</p>
- <dl><dt><dfn id=dom-mediaerror-media_err_aborted title=dom-MediaError-MEDIA_ERR_ABORTED><code>MEDIA_ERR_ABORTED</code></dfn> (numeric value 1)</dt>
+ <dl>
+ <dt><dfn id=dom-mediaerror-media_err_aborted title=dom-MediaError-MEDIA_ERR_ABORTED><code>MEDIA_ERR_ABORTED</code></dfn> (numeric value 1)</dt>
+
<dd>The fetching process for the <a href=#media-resource>media resource</a> was
aborted by the user agent at the user's request.</dd>
@@ -18219,8 +19468,12 @@
<dd>No suitable <a href=#media-resource>media resource</a> could be found.</dd>
- </dl><h5 id=location-of-the-media-resource><span class=secno>4.8.10.2 </span>Location of the media resource</h5>
+ </dl>
+
+
+ <h5 id=location-of-the-media-resource><span class=secno>4.8.10.2 </span>Location of the media resource</h5>
+
<p>The <dfn id=attr-media-src title=attr-media-src><code>src</code></dfn> content
attribute on <a href=#media-element title="media element">media elements</a> gives
the address of the media resource (video, audio) to show. The
@@ -18257,12 +19510,16 @@
steps. These steps return a list of <a href=#absolute-url title="absolute
URL">absolute URLs</a> giving a resource's address.</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>If the <a href=#media-element>media element</a> has a <code title=attr-media-src><a href=#attr-media-src>src</a></code> attribute, then run these
substeps:</p>
- <ol><li><p><a href=#resolve-a-url title="resolve a url">Resolve</a> the
+ <ol>
+
+ <li><p><a href=#resolve-a-url title="resolve a url">Resolve</a> the
<a href=#url>URL</a> given in that attribute, relative to the
<a href=#media-element>media element</a>.</p>
@@ -18274,8 +19531,10 @@
<li><p>Abort the algorithm.</li>
- </ol><p>Otherwise, the <code><a href=#the-source-element>source</a></code> elements will be used.</p>
+ </ol>
+ <p>Otherwise, the <code><a href=#the-source-element>source</a></code> elements will be used.</p>
+
</li>
<li><p>If the <a href=#media-element>media element</a> has no <code><a href=#the-source-element>source</a></code>
@@ -18295,8 +19554,10 @@
<p>If all the following conditions are true:</p>
- <ul><li>The <var title="">candidate</var> element has a <code title=attr-source-src><a href=#attr-source-src>src</a></code> attribute.</li>
+ <ul>
+ <li>The <var title="">candidate</var> element has a <code title=attr-source-src><a href=#attr-source-src>src</a></code> attribute.</li>
+
<li><a href=#resolve-a-url title="resolve a url">Resolving</a> the
<a href=#url>URL</a> given by the <var title="">candidate</var>
element's <code title=attr-source-src><a href=#attr-source-src>src</a></code> attribute
@@ -18312,7 +19573,9 @@
processed according to the rules for <a href=#mq>media
queries</a>, matches the current environment. <a href=#refsMQ>[MQ]</a></li>
- </ul><p>...then append the <a href=#absolute-url>absolute URL</a> resulting from
+ </ul>
+
+ <p>...then append the <a href=#absolute-url>absolute URL</a> resulting from
<a href=#resolve-a-url title="resolve a url">resolving</a> the <a href=#url>URL</a>
given in that <var title="">candidate</var> element's <code title=attr-source-src><a href=#attr-source-src>src</a></code> attribute relative to <var title="">candidate</var> to the <var title="">result</var>
list.</p>
@@ -18329,8 +19592,12 @@
<li><p>Return <var title="">result</var>.</li>
- </ol><h5 id=media-types><span class=secno>4.8.10.3 </span>Media types</h5>
+ </ol>
+
+
+ <h5 id=media-types><span class=secno>4.8.10.3 </span>Media types</h5>
+
<p>A <a href=#media-resource>media resource</a> can be described in terms of its
<em>type</em>, specifically a MIME type, optionally with a <code title="">codecs</code> parameter. <a href=#refsRFC2046>[RFC2046]</a> <a href=#refsRFC4281>[RFC4281]</a>.</p>
@@ -18406,8 +19673,10 @@
attribute. On getting, it must return the current network state of
the element, which must be one of the following values:</p>
- <dl><dt><dfn id=dom-media-network_empty title=dom-media-NETWORK_EMPTY><code>NETWORK_EMPTY</code></dfn> (numeric value 0)</dt>
+ <dl>
+ <dt><dfn id=dom-media-network_empty title=dom-media-NETWORK_EMPTY><code>NETWORK_EMPTY</code></dfn> (numeric value 0)</dt>
+
<dd>The element has not yet been initialized. All attributes are in
their initial states.</dd>
@@ -18427,7 +19696,9 @@
available to the user agent locally. Network connectivity could be
lost without affecting the media playback.</dd>
- </dl><p>The algorithm for the <code title=dom-media-load><a href=#dom-media-load>load()</a></code>
+ </dl>
+
+ <p>The algorithm for the <code title=dom-media-load><a href=#dom-media-load>load()</a></code>
method defined below describes exactly when the <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute changes
value and what events fire to indicate changes in this state.</p>
@@ -18447,8 +19718,10 @@
aborted, e.g. if the <code title=dom-media-load><a href=#dom-media-load>load()</a></code>
method itself is invoked again.</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>If there are any <a href=#concept-task title=concept-task>tasks</a> from
the <a href=#media-element>media element</a>'s <a href=#media-element-new-resource-task-source>media element new resource
task source</a> or its <a href=#media-element-event-task-source>media element event task
@@ -18484,7 +19757,9 @@
<code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code>, then
run these substeps:</p>
- <ol><li><p>If a fetching process is in progress for the <a href=#media-element>media
+ <ol>
+
+ <li><p>If a fetching process is in progress for the <a href=#media-element>media
element</a>, the user agent should stop it.</li>
<!--<li>Let <var title="">events</var> be a list of event names,
@@ -18518,8 +19793,10 @@
<li><a href=#fire-a-simple-event>Fire a simple event</a> called <code title=event-emptied><a href=#event-emptied>emptied</a></code> at the <a href=#media-element>media
element</a>.</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p><a href=#generate-the-list-of-potential-media-resources>Generate the list of potential media resources</a>
and let the resulting list be <var title="">candidates</var>.</li>
@@ -18547,7 +19824,9 @@
<p><i>Candidate loop</i>: For each item in <var title="">candidates</var>, if any, and in the same order as they
were added to the list, run the following steps:</p>
- <ol><li><p>Let the <var title="">current media resource</var> be the
+ <ol>
+
+ <li><p>Let the <var title="">current media resource</var> be the
resource given by the <a href=#absolute-url>absolute URL</a> for the current
item in <var title="">candidates</var>. This is now the element's
<a href=#media-resource>media resource</a>.</li>
@@ -18561,7 +19840,7 @@
<p>Begin to <a href=#fetch>fetch</a> the <var title="">current media
resource</var>.</p>
- <p>Every 350ms (±200ms) or for every byte received,
+ <p>Every 350ms (±200ms) or for every byte received,
whichever is <em>least</em> frequent, <a href=#queue-a-task>queue a task</a>
to <a href=#fire-a-progress-event>fire a progress event</a> called <code title=event-progress><a href=#event-progress>progress</a></code> at the element.</p>
@@ -18599,7 +19878,9 @@
being fetched must, when appropriate, include the relevant
substeps from the following list:</p>
- <dl class=switch><dt>If the <a href=#media-data>media data</a> cannot be fetched at all, due
+ <dl class=switch>
+
+ <dt>If the <a href=#media-data>media data</a> cannot be fetched at all, due
to network errors, causing the user agent to give up trying to
fetch the resource</dt>
@@ -18616,7 +19897,9 @@
unsupported codecs for all the data, must cause the user agent
to execute the following steps:</p>
- <ol><li><p>The user agent should cancel the fetching
+ <ol>
+
+ <li><p>The user agent should cancel the fetching
process.</li>
<li><p>If there are more items in the <var title="">candidates</var> list, then move on to the next one,
@@ -18624,9 +19907,11 @@
otherwise, jump to the final step in the overall algorithm
(the <i>failure step</i>).</p>
- </ol></dd>
+ </ol>
+ </dd>
+
<dt id=getting-media-metadata>Once enough of the <a href=#media-data>media
data</a> has been fetched to determine the duration of the
<a href=#media-resource>media resource</a>, its dimensions, and other
@@ -18637,7 +19922,9 @@
<p>This indicates that the resource is usable. The user agent
must follow these substeps:</p>
- <ol><li><p>Set the <a href=#current-playback-position>current playback position</a> to the
+ <ol>
+
+ <li><p>Set the <a href=#current-playback-position>current playback position</a> to the
<var><a href=#earliest-possible-position>earliest possible position</a></var>.</li>
<li><p>Set the <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute to
@@ -18674,7 +19961,9 @@
</li>
- </ol><p class=note>The user agent is <em>required</em> to
+ </ol>
+
+ <p class=note>The user agent is <em>required</em> to
determine the duration of the <a href=#media-resource>media resource</a> and
go through this step before playing.</p> <!-- actually defined
in the 'duration' section -->
@@ -18692,8 +19981,10 @@
resource</var> is usable must cause the user agent to execute
the following steps:</p>
- <ol><li>The user agent should cancel the fetching process.</li>
+ <ol>
+ <li>The user agent should cancel the fetching process.</li>
+
<li>Set the <code title=dom-media-error><a href=#dom-media-error>error</a></code>
attribute to a new <code><a href=#mediaerror>MediaError</a></code> object whose <code title=dom-MediaError-code><a href=#dom-mediaerror-code>code</a></code> attribute is set to
<code title=dom-MediaError-MEDIA_ERR_NETWORK><a href=#dom-mediaerror-media_err_network>MEDIA_ERR_NETWORK</a></code>.</li>
@@ -18710,8 +20001,10 @@
<li>Abort the overall <code title=dom-media-load><a href=#dom-media-load>load()</a></code> method algorithm.</li>
- </ol></dd>
+ </ol>
+ </dd>
+
<dt id=fatal-decode-error>If the <a href=#media-data>media data</a> is
corrupted</dt>
@@ -18721,8 +20014,10 @@
occur after the user agent has established whether the <var title="">current media resource</var> is usable must cause the
user agent to execute the following steps:</p>
- <ol><li>The user agent should cancel the fetching process.</li>
+ <ol>
+ <li>The user agent should cancel the fetching process.</li>
+
<li>Set the <code title=dom-media-error><a href=#dom-media-error>error</a></code>
attribute to a new <code><a href=#mediaerror>MediaError</a></code> object whose <code title=dom-MediaError-code><a href=#dom-mediaerror-code>code</a></code> attribute is set to
<code title=dom-MediaError-MEDIA_ERR_DECODE><a href=#dom-mediaerror-media_err_decode>MEDIA_ERR_DECODE</a></code>.</li>
@@ -18739,8 +20034,10 @@
<li>Abort the overall <code title=dom-media-load><a href=#dom-media-load>load()</a></code> method algorithm.</li>
- </ol></dd>
+ </ol>
+ </dd>
+
<dt>If the <a href=#media-data>media data</a> fetching process is aborted by
the user</dt>
@@ -18753,8 +20050,10 @@
method itself is reinvoked, as the steps above handle that
particular kind of abort.</p>
- <ol><li>The user agent should cancel the fetching process.</li>
+ <ol>
+ <li>The user agent should cancel the fetching process.</li>
+
<li>Set the <code title=dom-media-error><a href=#dom-media-error>error</a></code>
attribute to a new <code><a href=#mediaerror>MediaError</a></code> object whose <code title=dom-MediaError-code><a href=#dom-mediaerror-code>code</a></code> attribute is set to
<code title=dom-MediaError-MEDIA_ERR_ABORT>MEDIA_ERR_ABORT</code>.</li>
@@ -18777,8 +20076,10 @@
<li>Abort the overall <code title=dom-media-load><a href=#dom-media-load>load()</a></code> method algorithm.</li>
- </ol></dd>
+ </ol>
+ </dd>
+
<dt id=non-fatal-media-error>If the <a href=#media-data>media data</a> can
be fetched but has non-fatal errors or uses, in part, codecs that
are unsupported, preventing the user agent from rendering the
@@ -18791,12 +20092,18 @@
be optimally rendered must cause the user agent to execute the
following steps.</p>
- <ol><li class=XXX>Should we fire a 'warning' event? Set the
+ <ol>
+
+ <li class=XXX>Should we fire a 'warning' event? Set the
'error' flag to 'MEDIA_ERR_SUBOPTIMAL' or something?</li>
- </ol></dd>
+ </ol>
- </dl><p>When the user agent has completely fetched of the entire
+ </dd>
+
+ </dl>
+
+ <p>When the user agent has completely fetched of the entire
<a href=#media-resource>media resource</a>, it must move on to the next
step. This might never happen, e.g. when streaming an infinite
resource such as Web radio.</p>
@@ -18812,14 +20119,18 @@
<li>Then, abort the overall <code title=dom-media-load><a href=#dom-media-load>load()</a></code> method algorithm.</li>
- </ol></li>
+ </ol>
+ </li>
+
<li>
<p><i>Failure step</i>: No usable resource was found. Run the
following steps:</p>
- <ol><li>Set the <code title=dom-media-error><a href=#dom-media-error>error</a></code> attribute
+ <ol>
+
+ <li>Set the <code title=dom-media-error><a href=#dom-media-error>error</a></code> attribute
to a new <code><a href=#mediaerror>MediaError</a></code> object whose <code title=dom-MediaError-code><a href=#dom-mediaerror-code>code</a></code> attribute is set to <code title=dom-MediaError-MEDIA_ERR_NONE_SUPPORTED><a href=#dom-mediaerror-media_err_none_supported>MEDIA_ERR_NONE_SUPPORTED</a></code>.</li>
<li>Set the <a href=#begun-flag>begun flag</a> to false and <a href=#queue-a-task>queue a
@@ -18832,9 +20143,13 @@
event</a> called <code title=event-emptied><a href=#event-emptied>emptied</a></code> at
the element.</li>
- </ol></li>
+ </ol>
- </ol><p>If a <a href=#media-element>media element</a> whose <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> has the value
+ </li>
+
+ </ol>
+
+ <p>If a <a href=#media-element>media element</a> whose <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> has the value
<code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code> is <a href=#insert-an-element-into-a-document title="insert an element into a document">inserted into a
document</a>, the user agent must <a href=#queue-a-task>queue a task</a> that
implicitly invokes the <code title=dom-media-load><a href=#dom-media-load>load()</a></code>
@@ -18949,8 +20264,10 @@
at any particular time is the greatest value describing the state of
the element:</p>
- <dl><dt><dfn id=dom-media-have_nothing title=dom-media-HAVE_NOTHING><code>HAVE_NOTHING</code></dfn> (numeric value 0)</dt>
+ <dl>
+ <dt><dfn id=dom-media-have_nothing title=dom-media-HAVE_NOTHING><code>HAVE_NOTHING</code></dfn> (numeric value 0)</dt>
+
<dd>No information regardig the <a href=#media-resource>media resource</a> is
available. No data for the <a href=#current-playback-position>current playback position</a>
is available. <a href=#media-element title="media element">Media elements</a>
@@ -18998,10 +20315,15 @@
attribute, would not overtake the available data before playback
reaches the end of the <a href=#media-resource>media resource</a>.</dd>
- </dl><p>When the ready state of a <a href=#media-element>media element</a> whose <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> is not <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code> changes, the
+ </dl>
+
+ <p>When the ready state of a <a href=#media-element>media element</a> whose <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> is not <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code> changes, the
user agent must follow the steps given below:</p>
- <dl class=switch><!-- going up to metadata --><dt>If the prevous ready state was <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, and the new
+ <dl class=switch>
+
+ <!-- going up to metadata -->
+ <dt>If the prevous ready state was <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, and the new
ready state is <code title=dom-media-HAVE_METADATA><a href=#dom-media-have_metadata>HAVE_METADATA</a></code></dt>
<dd>
@@ -19081,7 +20403,9 @@
</dd>
- </dl><p class=note>It is possible for the ready state of a media
+ </dl>
+
+ <p class=note>It is possible for the ready state of a media
element to jump between these states discontinuously. For example,
the state of a media element can jump straight from <code title=dom-media-HAVE_METADATA><a href=#dom-media-have_metadata>HAVE_METADATA</a></code> to <code title=dom-media-HAVE_ENOUGH_DATA><a href=#dom-media-have_enough_data>HAVE_ENOUGH_DATA</a></code> without
passing through the <code title=dom-media-HAVE_CURRENT_DATA><a href=#dom-media-have_current_data>HAVE_CURRENT_DATA</a></code> and
@@ -19113,12 +20437,14 @@
<dfn id=cue-range title="cue range">cue ranges</dfn>. Each cue range is made up
of the following information:</p>
- <dl><dt>A class name</dt>
+ <dl>
+
+ <dt>A class name</dt>
<dd>A group of related ranges can be given the same class name so
that they can all be removed at the same time.</dd>
<dt>An identifier<dt>
- </dt><dd>A string can be assigned to each cue range for identification
+ <dd>A string can be assigned to each cue range for identification
by script. The string need not be unique and can contain any
value.</dd>
@@ -19141,7 +20467,9 @@
<dt>An "active" boolean</dt>
<dd>A flag indicating whether the range is active or not.</dd>
- </dl><p>The <dfn id=dom-media-addcuerange title=dom-media-addCueRange><code>addCueRange(<var title="">className</var>, <var title="">id</var>, <var title="">start</var>, <var title="">end</var>, <var title="">pauseOnExit</var>, <var title="">enterCallback</var>, <var title="">exitCallback</var>)</code></dfn> method must, when called,
+ </dl>
+
+ <p>The <dfn id=dom-media-addcuerange title=dom-media-addCueRange><code>addCueRange(<var title="">className</var>, <var title="">id</var>, <var title="">start</var>, <var title="">end</var>, <var title="">pauseOnExit</var>, <var title="">enterCallback</var>, <var title="">exitCallback</var>)</code></dfn> method must, when called,
add a <a href=#cue-range>cue range</a> to the <a href=#media-element>media element</a>, that
cue range having the class name <var title="">className</var>, the
identifier <var title="">id</var>, the start time <var title="">start</var> (in seconds), the end time <var title="">end</var> (in seconds), the "pause" boolean with the same
@@ -19223,7 +20551,9 @@
of the <a href=#media-resource>media resource</a>, then the user agent must follow
these steps:</p>
- <ol><li><p>If the <a href=#media-element>media element</a> has a <code title=attr-media-loop><a href=#attr-media-loop>loop</a></code> attribute specified, then <a href=#dom-media-seek title=dom-media-seek>seek</a> to the <var><a href=#earliest-possible-position>earliest possible
+ <ol>
+
+ <li><p>If the <a href=#media-element>media element</a> has a <code title=attr-media-loop><a href=#attr-media-loop>loop</a></code> attribute specified, then <a href=#dom-media-seek title=dom-media-seek>seek</a> to the <var><a href=#earliest-possible-position>earliest possible
position</a></var> of the <a href=#media-resource>media resource</a> and abort these
steps.</li>
@@ -19237,7 +20567,9 @@
a simple event</a> called <code title=event-ended><a href=#event-ended>ended</a></code>
at the element.</li>
- </ol><p>The <dfn id=dom-media-defaultplaybackrate title=dom-media-defaultPlaybackRate><code>defaultPlaybackRate</code></dfn>
+ </ol>
+
+ <p>The <dfn id=dom-media-defaultplaybackrate title=dom-media-defaultPlaybackRate><code>defaultPlaybackRate</code></dfn>
attribute gives the desired speed at which the <a href=#media-resource>media
resource</a> is to play, as a multiple of its intrinsic
speed. The attribute is mutable: on getting it must return the last
@@ -19277,11 +20609,15 @@
the <a href=#media-resource>media resource</a>, if any, that the user agent has so
far rendered, at the time the attribute is evaluated.</p>
- <hr><p>When the <dfn id=dom-media-play title=dom-media-play><code>play()</code></dfn>
+ <hr>
+
+ <p>When the <dfn id=dom-media-play title=dom-media-play><code>play()</code></dfn>
method on a <a href=#media-element>media element</a> is invoked, the user agent
must run the following steps.</p>
- <ol><li><p>If the <a href=#media-element>media element</a>'s <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute has
+ <ol>
+
+ <li><p>If the <a href=#media-element>media element</a>'s <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute has
the value <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code>, then the user
agent must invoke the <code title=dom-media-load><a href=#dom-media-load>load()</a></code>
method and wait for it to return. If that raises an exception, that
@@ -19309,7 +20645,9 @@
<p>If this changed the value of <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code>, the user agent must run the following substeps:</p>
- <ol><li><p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a>
+ <ol>
+
+ <li><p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a>
called <code title=event-play><a href=#event-play>play</a></code> at the element.</li>
<li><p>If the <a href=#media-element>media element</a>'s <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute has the
@@ -19326,17 +20664,25 @@
called <code title=event-playing><a href=#event-playing>playing</a></code> at the
element.</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>The <a href=#media-element>media element</a>'s <a href=#autoplaying-flag>autoplaying
flag</a> must be set to false.</li>
<li><p>The method must then return.</li>
- </ol><hr><p>When the <dfn id=dom-media-pause title=dom-media-pause><code>pause()</code></dfn>
+ </ol>
+
+ <hr>
+
+ <p>When the <dfn id=dom-media-pause title=dom-media-pause><code>pause()</code></dfn>
method is invoked, the user agent must run the following steps:</p>
- <ol><li><p>If the <a href=#media-element>media element</a>'s <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute has
+ <ol>
+
+ <li><p>If the <a href=#media-element>media element</a>'s <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute has
the value <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code>, then the user
agent must invoke the <code title=dom-media-load><a href=#dom-media-load>load()</a></code>
method and wait for it to return. If that raises an exception, that
@@ -19357,14 +20703,18 @@
event</a> called <code title=event-pause><a href=#event-pause>pause</a></code> at the
element.</li>
- </ol><hr><p id=media-playback>When a <a href=#media-element>media element</a> is
+ </ol>
+
+ <hr>
+
+ <p id=media-playback>When a <a href=#media-element>media element</a> is
<a href=#potentially-playing>potentially playing</a> and its <code>Document</code> is an
<a href=#active-document>active document</a>, its <a href=#current-playback-position>current playback
position</a> must increase monotonically at <code title=dom-media-playbackRate><a href=#dom-media-playbackrate>playbackRate</a></code> units of media
time per unit time of wall clock time.</p>
<p class=note>This specification doesn't define how the user agent
- achieves the appropriate playback rate — depending on the
+ achieves the appropriate playback rate — depending on the
protocol and media available, it is plausible that the user agent
could negotiate with the server to have the server provide the media
data at the appropriate rate, so that (except for the period between
@@ -19396,17 +20746,21 @@
has been reached, or because its <code title=dom-media-playbackRate><a href=#dom-media-playbackrate>playbackRate</a></code> is 0.0) may the
element be <span>garbage collected</span><!-- XXX xref -->.</p>
- <hr><p>When the <a href=#current-playback-position>current playback position</a> of a <a href=#media-element>media
+ <hr>
+
+ <p>When the <a href=#current-playback-position>current playback position</a> of a <a href=#media-element>media
element</a> changes (e.g. due to playback or seeking), the user
agent must run the following steps. If the <a href=#current-playback-position>current playback
position</a> changes while the steps are running, then the user
agent must wait for the steps to complete, and then must immediately
rerun the steps. (These steps are thus run as often as possible or
- needed — if one iteration takes a long time, this can cause
+ needed — if one iteration takes a long time, this can cause
certain ranges to be skipped over as the user agent rushes ahead to
"catch up".)</p>
- <ol><li><p>Let <var title="">current ranges</var> be an ordered list of
+ <ol>
+
+ <li><p>Let <var title="">current ranges</var> be an ordered list of
<a href=#cue-range title="cue range">cue ranges</a>, initialized to contain
all the <a href=#cue-range title="cue range">cue ranges</a> of the
<a href=#media-element>media element</a> whose start times are less than or equal
@@ -19473,7 +20827,9 @@
list to "true" (active), and the "active" boolean of all the <a href=#cue-range title="cue range">cue ranges</a> in the <var title="">other
ranges</var> list to "false" (inactive).</li>
- </ol><p>When a <a href=#media-element>media element</a> is <span>removed from a
+ </ol>
+
+ <p>When a <a href=#media-element>media element</a> is <span>removed from a
<code>Document</code><!-- XXX xref removed --></span>, if the
<a href=#media-element>media element</a>'s <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute has a
value other than <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code> then the user
@@ -19496,7 +20852,9 @@
playback position</var> in the <a href=#media-resource>media resource</a>, it means
that the user agent must run the following steps:</p>
- <ol><li><p>If the <a href=#media-element>media element</a>'s <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> is <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, then the user
+ <ol>
+
+ <li><p>If the <a href=#media-element>media element</a>'s <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> is <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, then the user
agent must raise an <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> exception (if
the seek was in response to a DOM method call or setting of a DOM
attribute), and abort these steps.</li>
@@ -19554,7 +20912,9 @@
<li><p>The user agent must <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire
a simple event</a> called <code title=event-seeked><a href=#event-seeked>seeked</a></code> at the element.</li>
- </ol><p>The <dfn id=dom-media-seekable title=dom-media-seekable><code>seekable</code></dfn>
+ </ol>
+
+ <p>The <dfn id=dom-media-seekable title=dom-media-seekable><code>seekable</code></dfn>
attribute must return a new static <a href=#normalized-timeranges-object>normalized
<code>TimeRanges</code> object</a> that represents the ranges of
the <a href=#media-resource>media resource</a>, if any, that the user agent is able
@@ -19684,13 +21044,17 @@
<dfn id=normalized-timeranges-object>normalized <code>TimeRanges</code> object</dfn>, the ranges it
represents must obey the following criteria:</p>
- <ul><li>The start of a range must be greater than the end of all
+ <ul>
+
+ <li>The start of a range must be greater than the end of all
earlier ranges.</li>
<li>The start of a range must be less than the end of that same
range.</li>
- </ul><p>In other words, the ranges in such an object are ordered, don't
+ </ul>
+
+ <p>In other words, the ranges in such an object are ordered, don't
overlap, aren't empty, and don't touch (adjacent ranges are folded
into one bigger range).</p>
@@ -19704,111 +21068,145 @@
<p>The following events fire on <a href=#media-element title="media element">media
elements</a> as part of the processing model described above:</p>
- <table><thead><tr><th>Event name
+ <table>
+ <thead>
+ <tr>
+ <th>Event name
<th>Interface
<th>Dispatched when...
<th>Preconditions
- <tbody><tr><td><dfn id=event-loadstart title=event-loadstart><code>loadstart</code></dfn>
+ <tbody>
+ <tr>
+ <td><dfn id=event-loadstart title=event-loadstart><code>loadstart</code></dfn>
<td><code>ProgressEvent</code> <a href=#refsPROGRESS>[PROGRESS]</a>
<td>The user agent begins fetching the <a href=#media-data>media data</a>, synchronously during the <code title=dom-media-load><a href=#dom-media-load>load()</a></code> method call.
<td><code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> equals <code title=dom-media-NETWORK_LOADING><a href=#dom-media-network_loading>NETWORK_LOADING</a></code>
- <tr><td><dfn id=event-progress title=event-progress><code>progress</code></dfn>
+ <tr>
+ <td><dfn id=event-progress title=event-progress><code>progress</code></dfn>
<td><code>ProgressEvent</code> <a href=#refsPROGRESS>[PROGRESS]</a>
<td>The user agent is fetching <a href=#media-data>media data</a>.
<td><code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> equals <code title=dom-media-NETWORK_LOADING><a href=#dom-media-network_loading>NETWORK_LOADING</a></code>
- <tr><td><dfn id=event-suspend title=event-suspend><code>suspend</code></dfn>
+ <tr>
+ <td><dfn id=event-suspend title=event-suspend><code>suspend</code></dfn>
<td><code>ProgressEvent</code> <a href=#refsPROGRESS>[PROGRESS]</a>
<td>The user agent is intentionally not currently fetching <a href=#media-data>media data</a>, but does not have the entire <a href=#media-resource>media resource</a> downloaded.
<td><code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> equals <code title=dom-media-NETWORK_IDLE><a href=#dom-media-network_idle>NETWORK_IDLE</a></code>
- <tr><td><dfn id=event-load title=event-load><code>load</code></dfn>
+ <tr>
+ <td><dfn id=event-load title=event-load><code>load</code></dfn>
<td><code>ProgressEvent</code> <a href=#refsPROGRESS>[PROGRESS]</a>
<td>The user agent finishes fetching the entire <a href=#media-resource>media resource</a>.
<td><code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> equals <code title=dom-media-NETWORK_LOADED><a href=#dom-media-network_loaded>NETWORK_LOADED</a></code>
- <tr><td><dfn id=event-abort title=event-abort><code>abort</code></dfn>
+ <tr>
+ <td><dfn id=event-abort title=event-abort><code>abort</code></dfn>
<td><code>ProgressEvent</code> <a href=#refsPROGRESS>[PROGRESS]</a>
<td>The user agent stops fetching the <a href=#media-data>media data</a> before it is completely downloaded. This can be fired synchronously during the <code title=dom-media-load><a href=#dom-media-load>load()</a></code> method call.
<td><code title=dom-media-error><a href=#dom-media-error>error</a></code> is an object with the code <code title=dom-MediaError-MEDIA_ERR_ABORTED><a href=#dom-mediaerror-media_err_aborted>MEDIA_ERR_ABORTED</a></code>.
<code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> equals either <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code> or <code title=dom-media-NETWORK_LOADED><a href=#dom-media-network_loaded>NETWORK_LOADED</a></code>, depending on when the download was aborted.
- <tr><td><dfn id=event-error title=event-error><code>error</code></dfn>
+ <tr>
+ <td><dfn id=event-error title=event-error><code>error</code></dfn>
<td><code>ProgressEvent</code> <a href=#refsPROGRESS>[PROGRESS]</a>
<td>An error occurs while fetching the <a href=#media-data>media data</a>.
<td><code title=dom-media-error><a href=#dom-media-error>error</a></code> is an object with the code <code title=dom-MediaError-MEDIA_ERR_NETWORK><a href=#dom-mediaerror-media_err_network>MEDIA_ERR_NETWORK</a></code> or higher.
<code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> equals either <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code> or <code title=dom-media-NETWORK_LOADED><a href=#dom-media-network_loaded>NETWORK_LOADED</a></code>, depending on when the download was aborted.
- <tr><td><dfn id=event-emptied title=event-emptied><code>emptied</code></dfn>
+ <tr>
+ <td><dfn id=event-emptied title=event-emptied><code>emptied</code></dfn>
<td><code>Event</code>
<td>A <a href=#media-element>media element</a> whose <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> was previously not in the <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code> state has just switched to that state (either because of a fatal error during load that's about to be reported, or because the <code title=dom-media-load><a href=#dom-media-load>load()</a></code> method was reinvoked, in which case it is fired synchronously during the <code title=dom-media-load><a href=#dom-media-load>load()</a></code> method call).
<td><code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> is <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code>; all the DOM attributes are in their initial states.
- <tr><td><dfn id=event-stalled title=event-stalled><code>stalled</code></dfn>
+ <tr>
+ <td><dfn id=event-stalled title=event-stalled><code>stalled</code></dfn>
<td><code>ProgressEvent</code>
<td>The user agent is trying to fetch <a href=#media-data>media data</a>, but data is unexpectedly not forthcoming.
<td><code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> is <code title=dom-media-NETWORK_LOADING><a href=#dom-media-network_loading>NETWORK_LOADING</a></code>.
- <tbody><tr><td><dfn id=event-play title=event-play><code>play</code></dfn>
+ <tbody>
+ <tr>
+ <td><dfn id=event-play title=event-play><code>play</code></dfn>
<td><code>Event</code>
<td>Playback has begun. Fired after the <code title=dom-media-play><a href=#dom-media-play>play()</a></code> method has returned.
<td><code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> is newly false.
- <tr><td><dfn id=event-pause title=event-pause><code>pause</code></dfn>
+ <tr>
+ <td><dfn id=event-pause title=event-pause><code>pause</code></dfn>
<td><code>Event</code>
<td>Playback has been paused. Fired after the <code title=dom-media-pause><a href=#dom-media-pause>pause</a></code> method has returned.
<td><code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> is newly true.
- <tbody><tr><td><dfn id=event-loadedmetadata title=event-loadedmetadata><code>loadedmetadata</code></dfn>
+ <tbody>
+ <tr>
+ <td><dfn id=event-loadedmetadata title=event-loadedmetadata><code>loadedmetadata</code></dfn>
<td><code>Event</code>
<td>The user agent has just determined the the duration and dimensions of the <a href=#media-resource>media resource</a>.
<td><code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> is newly equal to <code title=dom-media-HAVE_METADATA><a href=#dom-media-have_metadata>HAVE_METADATA</a></code> or greater for the first time.
- <tr><td><dfn id=event-loadeddata title=event-loadeddata><code>loadeddata</code></dfn>
+ <tr>
+ <td><dfn id=event-loadeddata title=event-loadeddata><code>loadeddata</code></dfn>
<td><code>Event</code>
<td>The user agent can render the <a href=#media-data>media data</a> at the <a href=#current-playback-position>current playback position</a> for the first time.
<td><code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> newly increased to <code title=dom-media-HAVE_CURRENT_DATA><a href=#dom-media-have_current_data>HAVE_CURRENT_DATA</a></code> or greater for the first time.
- <tr><td><dfn id=event-waiting title=event-waiting><code>waiting</code></dfn>
+ <tr>
+ <td><dfn id=event-waiting title=event-waiting><code>waiting</code></dfn>
<td><code>Event</code>
<td>Playback has stopped because the next frame is not available, but the user agent expects that frame to become available in due course.
<td><code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> is newly equal to or less than <code title=dom-media-HAVE_CURRENT_DATA><a href=#dom-media-have_current_data>HAVE_CURRENT_DATA</a></code>, and <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> is false. Either <code title=dom-media-seeking><a href=#dom-media-seeking>seeking</a></code> is true, or the <a href=#current-playback-position>current playback position</a> is not contained in any of the ranges in <code title=dom-media-buffered><a href=#dom-media-buffered>buffered</a></code>. It is possible for playback to stop for two other reasons without <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> being false, but those two reasons do not fire this event: maybe <a href=#ended-playback title="ended playback">playback ended</a>, or playback <a href=#stopped-due-to-errors>stopped due to errors</a>.
- <tr><td><dfn id=event-playing title=event-playing><code>playing</code></dfn>
+ <tr>
+ <td><dfn id=event-playing title=event-playing><code>playing</code></dfn>
<td><code>Event</code>
<td>Playback has started.
<td><code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> is newly equal to or greater than <code title=dom-media-HAVE_FUTURE_DATA><a href=#dom-media-have_future_data>HAVE_FUTURE_DATA</a></code>, <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> is false, <code title=dom-media-seeking><a href=#dom-media-seeking>seeking</a></code> is false, or the <a href=#current-playback-position>current playback position</a> is contained in one of the ranges in <code title=dom-media-buffered><a href=#dom-media-buffered>buffered</a></code>.
- <tr><td><dfn id=event-canplay title=event-canplay><code>canplay</code></dfn>
+ <tr>
+ <td><dfn id=event-canplay title=event-canplay><code>canplay</code></dfn>
<td><code>Event</code>
<td>The user agent can resume playback of the <a href=#media-data>media data</a>, but estimates that if playback were to be started now, the <a href=#media-resource>media resource</a> could not be rendered at the current playback rate up to its end without having to stop for further buffering of content.
<td><code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> newly increased to <code title=dom-media-HAVE_FUTURE_DATA><a href=#dom-media-have_future_data>HAVE_FUTURE_DATA</a></code> or greater.
- <tr><td><dfn id=event-canplaythrough title=event-canplaythrough><code>canplaythrough</code></dfn>
+ <tr>
+ <td><dfn id=event-canplaythrough title=event-canplaythrough><code>canplaythrough</code></dfn>
<td><code>Event</code>
<td>The user agent estimates that if playback were to be started now, the <a href=#media-resource>media resource</a> could be rendered at the current playback rate all the way to its end without having to stop for further buffering.
<td><code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> is newly equal to <code title=dom-media-HAVE_ENOUGH_DATA><a href=#dom-media-have_enough_data>HAVE_ENOUGH_DATA</a></code>.
- <tbody><tr><td><dfn id=event-seeking title=event-seeking><code>seeking</code></dfn>
+ <tbody>
+ <tr>
+ <td><dfn id=event-seeking title=event-seeking><code>seeking</code></dfn>
<td><code>Event</code>
<td>The <code title=dom-media-seeking><a href=#dom-media-seeking>seeking</a></code> DOM attribute changed to true and the seek operation is taking long enough that the user agent has time to fire the event.
<td>
- <tr><td><dfn id=event-seeked title=event-seeked><code>seeked</code></dfn>
+ <tr>
+ <td><dfn id=event-seeked title=event-seeked><code>seeked</code></dfn>
<td><code>Event</code>
<td>The <code title=dom-media-seeking><a href=#dom-media-seeking>seeking</a></code> DOM attribute changed to false.
<td>
- <tr><td><dfn id=event-timeupdate title=event-timeupdate><code>timeupdate</code></dfn>
+ <tr>
+ <td><dfn id=event-timeupdate title=event-timeupdate><code>timeupdate</code></dfn>
<td><code>Event</code>
<td>The <a href=#current-playback-position>current playback position</a> changed as part of normal playback or in an especially interesting way, for example discontinuously.
<td>
- <tr><td><dfn id=event-ended title=event-ended><code>ended</code></dfn>
+ <tr>
+ <td><dfn id=event-ended title=event-ended><code>ended</code></dfn>
<td><code>Event</code>
<td>Playback has stopped because the end of the <a href=#media-resource>media resource</a> was reached.
<td><code title=dom-media-currentTime><a href=#dom-media-currenttime>currentTime</a></code> equals the end of the <a href=#media-resource>media resource</a>; <code title=dom-media-ended><a href=#dom-media-ended>ended</a></code> is true.
- <tbody><tr><td><dfn id=event-ratechange title=event-ratechange><code>ratechange</code></dfn>
+ <tbody>
+ <tr>
+ <td><dfn id=event-ratechange title=event-ratechange><code>ratechange</code></dfn>
<td><code>Event</code>
<td>Either the <code title=dom-media-defaultPlaybackRate><a href=#dom-media-defaultplaybackrate>defaultPlaybackRate</a></code> or the <code title=dom-media-playbackRate><a href=#dom-media-playbackrate>playbackRate</a></code> attribute has just been updated.
<td>
- <tr><td><dfn id=event-durationchange title=event-durationchange><code>durationchange</code></dfn>
+ <tr>
+ <td><dfn id=event-durationchange title=event-durationchange><code>durationchange</code></dfn>
<td><code>Event</code>
<td>The <code title=dom-media-duration><a href=#dom-media-duration>duration</a></code> attribute has just been updated.
<td>
- <tr><td><dfn id=event-volumechange title=event-volumechange><code>volumechange</code></dfn>
+ <tr>
+ <td><dfn id=event-volumechange title=event-volumechange><code>volumechange</code></dfn>
<td><code>Event</code>
<td>Either the <code title=dom-media-volume><a href=#dom-media-volume>volume</a></code> attribute or the <code title=dom-media-muted><a href=#dom-media-muted>muted</a></code> attribute has changed. Fired after the relevant attribute's setter has returned.
<td>
- </table><h5 id=security-and-privacy-considerations><span class=secno>4.8.10.14 </span>Security and privacy considerations</h5>
+ </table>
+
+ <h5 id=security-and-privacy-considerations><span class=secno>4.8.10.14 </span>Security and privacy considerations</h5>
+
<p class=XXX>Talk about making sure interactive media files
(e.g. SVG) don't have access to the container DOM (XSS potential);
talk about not exposing any sensitive data like metadata from tracks
@@ -19820,7 +21218,8 @@
<h4 id=the-canvas-element><span class=secno>4.8.11 </span>The <dfn id=canvas><code>canvas</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dd><a href=#embedded-content-2>Embedded content</a>.</dd>
@@ -19843,7 +21242,9 @@
Object <a href=#dom-canvas-getcontext title=dom-canvas-getContext>getContext</a>(in DOMString contextId);
};</pre>
</dd>
- </dl><p>The <code><a href=#the-canvas-element>canvas</a></code> element <a href=#represents>represents</a> a
+ </dl>
+
+ <p>The <code><a href=#the-canvas-element>canvas</a></code> element <a href=#represents>represents</a> a
resolution-dependent bitmap canvas, which can be used for rendering
graphs, game graphics, or other visual images on the fly.</p>
@@ -19916,8 +21317,7 @@
<div class=example>
<p>Only one square appears to be drawn in the following example:</p>
- <pre>
- // canvas is a reference to a <canvas> element
+ <pre> // canvas is a reference to a <canvas> element
var context = canvas.getContext('2d');
context.fillRect(0,0,50,50);
canvas.setAttribute('width', '300'); // clears the canvas
@@ -19955,7 +21355,9 @@
define a <code>3d</code> context (probably based on the OpenGL ES
API).</p>
- <hr><p>The <dfn id=dom-canvas-todataurl title=dom-canvas-toDataURL><code>toDataURL()</code></dfn> method
+ <hr>
+
+ <p>The <dfn id=dom-canvas-todataurl title=dom-canvas-toDataURL><code>toDataURL()</code></dfn> method
must, when called with no arguments, return a <code title="">data:</code> URL containing a representation of the image
as a PNG file. <a href=#refsPNG>[PNG]</a>.</p>
@@ -19999,13 +21401,19 @@
subsequent arguments, if any, must be treated as described in the
second cell of that row.</p>
- <table><thead><tr><th> Type <th> Other arguments
- <tbody><tr><td> image/jpeg
+ <table>
+ <thead>
+ <tr> <th> Type <th> Other arguments
+ <tbody>
+ <tr>
+ <td> image/jpeg
<td> The second argument, if it is a number between 0.0 and 1.0,
must be treated as the desired quality level. If it is not a
number or is outside that range, the user agent must use its
default value, as if the argument had been omitted.
- </table><p>Other arguments must be ignored and must not cause the user agent
+ </table>
+
+ <p>Other arguments must be ignored and must not cause the user agent
to raise an exception. A future version of this specification will
probably define other parameters to be passed to <code title=dom-canvas-toDataURL><a href=#dom-canvas-todataurl>toDataURL()</a></code> to allow authors to
more carefully control compression settings, image metadata,
@@ -20183,10 +21591,13 @@
<p>Each context maintains a stack of drawing states. <dfn id=drawing-state title="drawing state">Drawing states</dfn> consist of:</p>
- <ul class=brief><li>The current <a href=#transformations title=dom-context-2d-transformation>transformation matrix</a>.</li>
+ <ul class=brief>
+ <li>The current <a href=#transformations title=dom-context-2d-transformation>transformation matrix</a>.</li>
<li>The current <a href=#clipping-region>clipping region</a>.</li>
<li>The current values of the following attributes: <code title=dom-context-2d-strokeStyle><a href=#dom-context-2d-strokestyle>strokeStyle</a></code>, <code title=dom-context-2d-fillStyle><a href=#dom-context-2d-fillstyle>fillStyle</a></code>, <code title=dom-context-2d-globalAlpha><a href=#dom-context-2d-globalalpha>globalAlpha</a></code>, <code title=dom-context-2d-lineWidth><a href=#dom-context-2d-linewidth>lineWidth</a></code>, <code title=dom-context-2d-lineCap><a href=#dom-context-2d-linecap>lineCap</a></code>, <code title=dom-context-2d-lineJoin><a href=#dom-context-2d-linejoin>lineJoin</a></code>, <code title=dom-context-2d-miterLimit><a href=#dom-context-2d-miterlimit>miterLimit</a></code>, <code title=dom-context-2d-shadowOffsetX><a href=#dom-context-2d-shadowoffsetx>shadowOffsetX</a></code>, <code title=dom-context-2d-shadowOffsetY><a href=#dom-context-2d-shadowoffsety>shadowOffsetY</a></code>, <code title=dom-context-2d-shadowBlur><a href=#dom-context-2d-shadowblur>shadowBlur</a></code>, <code title=dom-context-2d-shadowColor><a href=#dom-context-2d-shadowcolor>shadowColor</a></code>, <code title=dom-context-2d-globalCompositeOperation><a href=#dom-context-2d-globalcompositeoperation>globalCompositeOperation</a></code>, <code title=dom-context-2d-font><a href=#dom-context-2d-font>font</a></code>, <code title=dom-context-2d-textAlign><a href=#dom-context-2d-textalign>textAlign</a></code>, <code title=dom-context-2d-textBaseline><a href=#dom-context-2d-textbaseline>textBaseline</a></code>.</li>
- </ul><p class=note>The current path and the current bitmap are not part
+ </ul>
+
+ <p class=note>The current path and the current bitmap are not part
of the drawing state. The current path is persistent, and can only
be reset using the <code title=dom-context-2d-beginPath><a href=#dom-context-2d-beginpath>beginPath()</a></code> method. The
current bitmap is <span title=concept-canvas-image>a property of
@@ -20258,16 +21669,25 @@
<var title="">dy</var>)</code></dfn> method must multiply the
current transformation matrix with the matrix described by:</p>
- <table class=matrix><tr><td><var title="">m11</var></td>
+ <table class=matrix>
+ <tr>
+ <td><var title="">m11</var></td>
<td><var title="">m21</var></td>
<td><var title="">dx</var></td>
- <tr><td><var title="">m12</var></td>
+ </tr>
+ <tr>
+ <td><var title="">m12</var></td>
<td><var title="">m22</var></td>
<td><var title="">dy</var></td>
- <tr><td>0</td>
+ </tr>
+ <tr>
<td>0</td>
+ <td>0</td>
<td>1</td>
- </table><p>The <dfn id=dom-context-2d-settransform title=dom-context-2d-setTransform><code>setTransform(<var title="">m11</var>, <var title="">m12</var>, <var title="">m21</var>, <var title="">m22</var>, <var title="">dx</var>,
+ </tr>
+ </table>
+
+ <p>The <dfn id=dom-context-2d-settransform title=dom-context-2d-setTransform><code>setTransform(<var title="">m11</var>, <var title="">m12</var>, <var title="">m21</var>, <var title="">m22</var>, <var title="">dx</var>,
<var title="">dy</var>)</code></dfn> method must reset the current
transform to the identity matrix, and then invoke the <code><a href=#dom-context-2d-transform title=dom-context-2d-transform>transform</a>(<var title="">m11</var>, <var title="">m12</var>, <var title="">m21</var>, <var title="">m22</var>, <var title="">dx</var>,
<var title="">dy</var>)</code> method with the same arguments.</p>
@@ -20299,8 +21719,10 @@
and the destination image, <var title="">B</var>, is the current
state of the bitmap.</p>
- <dl><dt><dfn id=gcop-source-atop title=gcop-source-atop><code>source-atop</code></dfn></dt>
+ <dl>
+ <dt><dfn id=gcop-source-atop title=gcop-source-atop><code>source-atop</code></dfn></dt>
+
<dd><var title="">A</var> atop <var title="">B</var>. Display the
source image wherever both images are opaque. Display the
destination image wherever the destination image is opaque but the
@@ -20379,7 +21801,9 @@
<dd>Vendor-specific extensions to the list of composition operators
should use this syntax.</dd>
- </dl><p>These values are all case-sensitive — they must be used
+ </dl>
+
+ <p>These values are all case-sensitive — they must be used
exactly as shown. User agents must not recognize values that are not
a <a href=#case-sensitive>case-sensitive</a> match for one of the values given
above.</p>
@@ -20496,7 +21920,7 @@
gradient must be transformed as described by the <a href=#transformations title=dom-context-2d-transformation>current transformation
matrix</a> when rendering.</p>
- <p>If <span><var title="">x<sub>0</sub></var> = <var title="">x<sub>1</sub></var></span> and <span><var title="">y<sub>0</sub></var> = <var title="">y<sub>1</sub></var></span>, then the linear gradient must
+ <p>If <span><var title="">x<sub>0</sub></var> = <var title="">x<sub>1</sub></var></span> and <span><var title="">y<sub>0</sub></var> = <var title="">y<sub>1</sub></var></span>, then the linear gradient must
paint nothing.</p> <!-- XXX could make this paint the start color,
or the end color, or raise an exception -->
@@ -20514,34 +21938,38 @@
<p>Radial gradients must be rendered by following these steps:</p>
- <ol><li><p>If <span><var title="">x<sub>0</sub></var> = <var title="">x<sub>1</sub></var></span> and <span><var title="">y<sub>0</sub></var> = <var title="">y<sub>1</sub></var></span> and <span><var title="">r<sub>0</sub></var> = <var title="">r<sub>1</sub></var></span>, then the radial gradient must
+ <ol>
+
+ <li><p>If <span><var title="">x<sub>0</sub></var> = <var title="">x<sub>1</sub></var></span> and <span><var title="">y<sub>0</sub></var> = <var title="">y<sub>1</sub></var></span> and <span><var title="">r<sub>0</sub></var> = <var title="">r<sub>1</sub></var></span>, then the radial gradient must
paint nothing. Abort these steps.</p> <!-- XXX could make this
paint the start color, or the end color, or a circle of one in
the other, or raise an exception --> </li>
<li>
- <p>Let <span>x(<var title="">ω</var>) = (<var title="">x<sub>1</sub></var>-<var title="">x<sub>0</sub></var>)<var title="">ω</var> + <var title="">x<sub>0</sub></var></span></p>
+ <p>Let <span>x(<var title="">ω</var>) = (<var title="">x<sub>1</sub></var>-<var title="">x<sub>0</sub></var>)<var title="">ω</var> + <var title="">x<sub>0</sub></var></span></p>
- <p>Let <span>y(<var title="">ω</var>) = (<var title="">y<sub>1</sub></var>-<var title="">y<sub>0</sub></var>)<var title="">ω</var> + <var title="">y<sub>0</sub></var></span></p>
+ <p>Let <span>y(<var title="">ω</var>) = (<var title="">y<sub>1</sub></var>-<var title="">y<sub>0</sub></var>)<var title="">ω</var> + <var title="">y<sub>0</sub></var></span></p>
- <p>Let <span>r(<var title="">ω</var>) = (<var title="">r<sub>1</sub></var>-<var title="">r<sub>0</sub></var>)<var title="">ω</var> + <var title="">r<sub>0</sub></var></span></p>
+ <p>Let <span>r(<var title="">ω</var>) = (<var title="">r<sub>1</sub></var>-<var title="">r<sub>0</sub></var>)<var title="">ω</var> + <var title="">r<sub>0</sub></var></span></p>
- <p>Let the color at <var title="">ω</var> be the color at
+ <p>Let the color at <var title="">ω</var> be the color at
that position on the gradient (with the colors coming from the <a href=#interpolation>interpolation and extrapolation</a>
described above).</p>
</li>
- <li><p>For all values of <var title="">ω</var> where
- <span>r(<var title="">ω</var>) > 0</span>,
- starting with the value of <var title="">ω</var> nearest to
- positive infinity and ending with the value of <var title="">ω</var> nearest to negative infinity, draw the
- circumference of the circle with radius <span>r(<var title="">ω</var>)</span> at position (<span>x(<var title="">ω</var>)</span>, <span>y(<var title="">ω</var>)</span>), with the color at <var title="">ω</var>, but only painting on the parts of the
+ <li><p>For all values of <var title="">ω</var> where
+ <span>r(<var title="">ω</var>) > 0</span>,
+ starting with the value of <var title="">ω</var> nearest to
+ positive infinity and ending with the value of <var title="">ω</var> nearest to negative infinity, draw the
+ circumference of the circle with radius <span>r(<var title="">ω</var>)</span> at position (<span>x(<var title="">ω</var>)</span>, <span>y(<var title="">ω</var>)</span>), with the color at <var title="">ω</var>, but only painting on the parts of the
canvas that have not yet been painted on by earlier circles in this
step for this rendering of the gradient.</li>
- </ol><p class=note>This effectively creates a cone, touched by the two
+ </ol>
+
+ <p class=note>This effectively creates a cone, touched by the two
circles defined in the creation of the gradient, with the part of
the cone before the start circle (0.0) using the color of the first
offset, the part of the cone after the end circle (1.0) using the
@@ -20797,7 +22225,9 @@
<p>When shadows are drawn, they must be rendered as follows:</p>
- <ol><li> <p>Let <var title="">A</var> be the source image for which a
+ <ol>
+
+ <li> <p>Let <var title="">A</var> be the source image for which a
shadow is being created.</p> </li>
<li> <p>Let <var title="">B</var> be an infinite transparent black
@@ -20810,17 +22240,21 @@
<li> <p>If <code title=dom-context-2d-shadowBlur><a href=#dom-context-2d-shadowblur>shadowBlur</a></code> is greater than
0:</p>
- <ol><li> <p>If <code title=dom-context-2d-shadowBlur><a href=#dom-context-2d-shadowblur>shadowBlur</a></code> is less than
- 8, let <var title="">σ</var> be half the value of <code title=dom-context-2d-shadowBlur><a href=#dom-context-2d-shadowblur>shadowBlur</a></code>; otherwise,
- let <var title="">σ</var> be the square root of multiplying
+ <ol>
+
+ <li> <p>If <code title=dom-context-2d-shadowBlur><a href=#dom-context-2d-shadowblur>shadowBlur</a></code> is less than
+ 8, let <var title="">σ</var> be half the value of <code title=dom-context-2d-shadowBlur><a href=#dom-context-2d-shadowblur>shadowBlur</a></code>; otherwise,
+ let <var title="">σ</var> be the square root of multiplying
the value of <code title=dom-context-2d-shadowBlur><a href=#dom-context-2d-shadowblur>shadowBlur</a></code> by
2.</li>
<li> <p>Perform a 2D Gaussian Blur on <var title="">B</var>,
- using <var title="">σ</var> as the standard
+ using <var title="">σ</var> as the standard
deviation. </li> <!-- need a reference for this XXX -->
- </ol><p>User agents may limit values of <var title="">σ</var> to
+ </ol>
+
+ <p>User agents may limit values of <var title="">σ</var> to
an implementation-specific maximum value to avoid exceeding
hardware limitations during the Gaussian blur operation.</p>
@@ -20835,8 +22269,11 @@
<li> <p>The shadow is in the bitmap <var title="">B</var>, and is
rendered as part of the drawing model described below.</p> </li>
- </ol><h6 id=simple-shapes-(rectangles)><span class=secno>4.8.11.1.7 </span>Simple shapes (rectangles)</h6>
+ </ol>
+
+ <h6 id=simple-shapes-(rectangles)><span class=secno>4.8.11.1.7 </span>Simple shapes (rectangles)</h6>
+
<p>There are three methods that immediately draw rectangles to the
bitmap. They each take four arguments; the first two give the <var title="">x</var> and <var title="">y</var> coordinates of the top
left of the rectangle, and the second two give the width <var title="">w</var> and height <var title="">h</var> of the rectangle,
@@ -20929,7 +22366,7 @@
<p>The <dfn id=dom-context-2d-quadraticcurveto title=dom-context-2d-quadraticCurveTo><code>quadraticCurveTo(<var title="">cpx</var>, <var title="">cpy</var>, <var title="">x</var>,
<var title="">y</var>)</code></dfn> method must do nothing if the
context has no subpaths. Otherwise it must connect the last point in
- the subpath to the given point (<var title="">x</var>, <var title="">y</var>) using a quadratic Bézier curve with control
+ the subpath to the given point (<var title="">x</var>, <var title="">y</var>) using a quadratic Bézier curve with control
point (<var title="">cpx</var>, <var title="">cpy</var>), and must
then add the given point (<var title="">x</var>, <var title="">y</var>) to the subpath. <a href=#refsBEZIER>[BEZIER]</a></p>
<!-- XXX [BEZIER] Paul de Casteljau, Courbes à pôles, INPI, 1959 -->
@@ -20937,7 +22374,7 @@
<p>The <dfn id=dom-context-2d-beziercurveto title=dom-context-2d-bezierCurveTo><code>bezierCurveTo(<var title="">cp1x</var>, <var title="">cp1y</var>, <var title="">cp2x</var>, <var title="">cp2y</var>, <var title="">x</var>, <var title="">y</var>)</code></dfn> method must do
nothing if the context has no subpaths. Otherwise, it must connect
- the last point in the subpath to the given point (<var title="">x</var>, <var title="">y</var>) using a cubic Bézier
+ the last point in the subpath to the given point (<var title="">x</var>, <var title="">y</var>) using a cubic Bézier
curve with control points (<var title="">cp1x</var>, <var title="">cp1y</var>) and (<var title="">cp2x</var>, <var title="">cp2y</var>). Then, it must add the point (<var title="">x</var>, <var title="">y</var>) to the subpath. <a href=#refsBEZIER>[BEZIER]</a></p>
<!-- XXX [BEZIER] Paul de Casteljau, Courbes à pôles, INPI, 1959 -->
@@ -20971,8 +22408,8 @@
must add the point (<var title="">x1</var>, <var title="">y1</var>)
to the subpath, and connect that point to the previous point (<var title="">x0</var>, <var title="">y0</var>) by a straight line;
otherwise, the direction from (<var title="">x0</var>, <var title="">y0</var>) to (<var title="">x1</var>, <var title="">y1</var>) is the opposite of the direction from (<var title="">x1</var>, <var title="">y1</var>) to (<var title="">x2</var>, <var title="">y2</var>), and the method must add
- a point (<var title="">x<sub>∞</sub></var>, <var title="">y<sub>∞</sub></var>) to the subpath, and connect that
- point to the previous point (<var title="">x0</var>, <var title="">y0</var>) by a straight line, where (<var title="">x<sub>∞</sub></var>, <var title="">y<sub>∞</sub></var>) is the point that is infinitely
+ a point (<var title="">x<sub>∞</sub></var>, <var title="">y<sub>∞</sub></var>) to the subpath, and connect that
+ point to the previous point (<var title="">x0</var>, <var title="">y0</var>) by a straight line, where (<var title="">x<sub>∞</sub></var>, <var title="">y<sub>∞</sub></var>) is the point that is infinitely
far away from (<var title="">x1</var>, <var title="">y1</var>), that
lies on the same line as (<var title="">x0</var>, <var title="">y0</var>), (<var title="">x1</var>, <var title="">y1</var>), and (<var title="">x2</var>, <var title="">y2</var>), and that is on the same side of (<var title="">x1</var>, <var title="">y1</var>) on that line as (<var title="">x2</var>, <var title="">y2</var>).</p>
@@ -21008,9 +22445,9 @@
<p>If the <var title="">anticlockwise</var> argument is false and
<span><var title="">endAngle</var>-<var title="">startAngle</var></span> is equal to or greater than
- <span>2π</span>, or, if the <var title="">anticlockwise</var>
+ <span>2π</span>, or, if the <var title="">anticlockwise</var>
argument is <em>true</em> and <span><var title="">startAngle</var>-<var title="">endAngle</var></span> is
- equal to or greater than <span>2π</span>, then the arc is the
+ equal to or greater than <span>2π</span>, then the arc is the
whole circumference of this circle.</p>
<!--alternatively (this is not equivalent, but might make more
@@ -21025,7 +22462,7 @@
if the <var title="">anticlockwise</var> argument is true, and
clockwise otherwise. Since the points are on the circle, as opposed
to being simply angles from zero, the arc can never cover an angle
- greater than <span>2π</span> radians. If the two points are the
+ greater than <span>2π</span> radians. If the two points are the
same, or if the radius is zero, then the arc is defined as being of
zero length in both directions.</p>
@@ -21167,18 +22604,20 @@
<p><img alt="The top of the em square is
roughly at the top of the glyphs in a font, the hanging baseline is
- where some glyphs like आ are anchored, the middle is half-way
+ where some glyphs like आ are anchored, the middle is half-way
between the top of the em square and the bottom of the em square,
- the alphabetic baseline is where characters like Á, ÿ,
- f, and Ω are anchored, the ideographic baseline is
- where glyphs like 私 and 達 are anchored, and the bottom
+ the alphabetic baseline is where characters like Á, ÿ,
+ f, and Ω are anchored, the ideographic baseline is
+ where glyphs like 私 and 達 are anchored, and the bottom
of the em square is roughly at the bottom of the glyphs in a
font. The top and bottom of the bounding box can be far from these
baselines, due to glyphs extending far outside the em square." src=images/baselines.png></p>
<p>The keywords map to these alignment points as follows:</p>
- <dl><dt><dfn id=dom-context-2d-textbaseline-top title=dom-context-2d-textBaseline-top><code>top</code></dfn>
+ <dl>
+
+ <dt><dfn id=dom-context-2d-textbaseline-top title=dom-context-2d-textBaseline-top><code>top</code></dfn>
<dd>The top of the em square</dd>
<dt><dfn id=dom-context-2d-textbaseline-hanging title=dom-context-2d-textBaseline-hanging><code>hanging</code></dfn>
@@ -21196,7 +22635,9 @@
<dt><dfn id=dom-context-2d-textbaseline-bottom title=dom-context-2d-textBaseline-bottom><code>bottom</code></dfn>
<dd>The bottom of the em square</dd>
- </dl><p>The <dfn id=dom-context-2d-filltext title=dom-context-2d-fillText><code>fillText()</code></dfn> and
+ </dl>
+
+ <p>The <dfn id=dom-context-2d-filltext title=dom-context-2d-fillText><code>fillText()</code></dfn> and
<dfn id=dom-context-2d-stroketext title=dom-context-2d-strokeText><code>strokeText()</code></dfn>
methods take three or four arguments, <var title="">text</var>, <var title="">x</var>, <var title="">y</var>, and optionally <var title="">maxWidth</var>, and render the given <var title="">text</var> at the given (<var title="">x</var>, <var title="">y</var>) coordinates ensuring that the text isn't wider
than <var title="">maxWidth</var> if specified, using the current
@@ -21204,7 +22645,9 @@
values. Specifically, when the methods are called, the user agent
must run the following steps:</p>
- <ol><li><p>Let <var title="">font</var> be the current font of the
+ <ol>
+
+ <li><p>Let <var title="">font</var> be the current font of the
context, as given by the <code title=dom-context-2d-font><a href=#dom-context-2d-font>font</a></code> attribute.</li>
<li><p>Replace all the <a href=#space-character title="space character">space
@@ -21237,7 +22680,9 @@
<p>Horizontal position:</p>
- <dl><dt> If <code title=dom-context-2d-textAlign><a href=#dom-context-2d-textalign>textAlign</a></code> is <code title="">left</code></dt>
+ <dl>
+
+ <dt> If <code title=dom-context-2d-textAlign><a href=#dom-context-2d-textalign>textAlign</a></code> is <code title="">left</code></dt>
<dt> If <code title=dom-context-2d-textAlign><a href=#dom-context-2d-textalign>textAlign</a></code> is <code title="">start</code> and <a href=#the-directionality>the directionality</a> of the
<code><a href=#the-canvas-element>canvas</a></code> element is 'ltr'</dt>
<dt> If <code title=dom-context-2d-textAlign><a href=#dom-context-2d-textalign>textAlign</a></code> is <code title="">end</code> and <a href=#the-directionality>the directionality</a> of the
@@ -21263,10 +22708,14 @@
position be half way between the left and right edges of the
inline box.</dd>
- </dl><p>Vertical position:</p>
+ </dl>
- <dl><dt> If <code title=dom-context-2d-textBaseline><a href=#dom-context-2d-textbaseline>textBaseline</a></code> is <code title=dom-context-2d-textBaseline-top><a href=#dom-context-2d-textbaseline-top>top</a></code></dt>
+ <p>Vertical position:</p>
+ <dl>
+
+ <dt> If <code title=dom-context-2d-textBaseline><a href=#dom-context-2d-textbaseline>textBaseline</a></code> is <code title=dom-context-2d-textBaseline-top><a href=#dom-context-2d-textbaseline-top>top</a></code></dt>
+
<dd>Let the <var title="">anchor point</var>'s vertical position
be the top of the em box of the first available font of the
inline box.</dd>
@@ -21306,8 +22755,10 @@
be the bottom of the em box of the first available font of the
inline box.</dd>
- </dl></li>
+ </dl>
+ </li>
+
<li>
<p>Paint the hypothetical inline box as the shape given by the
@@ -21331,7 +22782,9 @@
</li>
- </ol><!--XXXDVT - this is commented out until CSS can get its act together
+ </ol>
+
+<!--XXXDVT - this is commented out until CSS can get its act together
enough to actual specify vertical text rendering (how long have we
been waiting now?)
@@ -21475,7 +22928,9 @@
</ol>
-XXXDVT (also check for '- -' bits in the part above) --><p>The <dfn id=dom-context-2d-measuretext title=dom-context-2d-measureText><code>measureText()</code></dfn>
+XXXDVT (also check for '- -' bits in the part above) -->
+
+ <p>The <dfn id=dom-context-2d-measuretext title=dom-context-2d-measureText><code>measureText()</code></dfn>
method takes one argument, <var title="">text</var>. When the method
is invoked, the user agent must replace all the <a href=#space-character title="space
character">space characters</a> in <var title="">text</var> with
@@ -21643,13 +23098,13 @@
that component. The components must be assigned consecutive indices
starting with 0 for the top left pixel's red component.</p>
- <p>The <code><a href=#canvaspixelarray>CanvasPixelArray</a></code> object thus represents <var title="">h</var>×<var title="">w</var>×4 integers. The
+ <p>The <code><a href=#canvaspixelarray>CanvasPixelArray</a></code> object thus represents <var title="">h</var>×<var title="">w</var>×4 integers. The
<dfn id=dom-canvaspixelarray-length title=dom-canvaspixelarray-length><code>length</code></dfn>
attribute of a <code><a href=#canvaspixelarray>CanvasPixelArray</a></code> object must return this
number.</p>
<p>The object's <span>indices of the supported indexed
- properties</span> are the numbers in the range 0 .. <span><var title="">h</var>×<var title="">w</var>×4-1</span>.</p>
+ properties</span> are the numbers in the range 0 .. <span><var title="">h</var>×<var title="">w</var>×4-1</span>.</p>
<p>When a <code><a href=#canvaspixelarray>CanvasPixelArray</a></code> object is <dfn id=dom-canvaspixelarray-get title=dom-CanvasPixelArray-get>indexed to retrieve an indexed
property</dfn> <var title="">index</var>, the value returned must be
@@ -21690,8 +23145,10 @@
paragraphs, cause an exception to be raised, the <code title=dom-context-2d-putImageData><a href=#dom-context-2d-putimagedata>putImageData()</a></code> method
must act as follows:</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>Let <var title="">dx<sub>device</sub></var> be the x-coordinate
of the device pixel in the underlying pixel data of the canvas
corresponding to the <var title="">dx</var> coordinate in the
@@ -21743,14 +23200,16 @@
</li>
<li><p>Otherwise, for all integer values of <var title="">x</var>
- and <var title="">y</var> where <span><var title="">dirtyX</var> ≤ <var title="">x</var> < <span><var title="">dirtyX</var>+<var title="">dirtyWidth</var></span></span>
- and <span><var title="">dirtyY</var> ≤ <var title="">y</var> < <span><var title="">dirtyY</var>+<var title="">dirtyHeight</var></span></span>, copy the four channels of
+ and <var title="">y</var> where <span><var title="">dirtyX</var> ≤ <var title="">x</var> < <span><var title="">dirtyX</var>+<var title="">dirtyWidth</var></span></span>
+ and <span><var title="">dirtyY</var> ≤ <var title="">y</var> < <span><var title="">dirtyY</var>+<var title="">dirtyHeight</var></span></span>, copy the four channels of
the pixel with coordinate (<var title="">x</var>, <var title="">y</var>) in the <var title="">imagedata</var> data
structure to the pixel with coordinate (<span><var title="">dx<sub>device</sub></var>+<var title="">x</var></span>,
<span><var title="">dy<sub>device</sub></var>+<var title="">y</var></span>) in the underlying pixel data of the
canvas.</li>
- </ol><p>The handling of pixel rounding when the specified coordinates do
+ </ol>
+
+ <p>The handling of pixel rounding when the specified coordinates do
not exactly map to the device coordinate space is not defined by
this specification, except that the following must result in no
visible changes to the rendering:</p>
@@ -21874,7 +23333,9 @@
<p>When a shape or image is painted, user agents must follow these
steps, in the order given (or act as if they do):</p>
- <ol><li><p>Render the shape or image, creating image <var title="">A</var>, as described in the previous sections. For
+ <ol>
+
+ <li><p>Render the shape or image, creating image <var title="">A</var>, as described in the previous sections. For
shapes, the current fill, stroke, and line styles must be honored,
and the stroke must itself also be subjected to the current
transformation matrix.</li>
@@ -21894,12 +23355,23 @@
over the current canvas bitmap using the current composition
operator.</li>
- </ol><!-- XXX add xrefs in the list above --><!--
+ </ol>
+
+ <!-- XXX add xrefs in the list above -->
+
+
+
+<!--
<h5 id="3d">The 3D context</h5>
<p class="XXX">Well, one day.</p>
---><h5 id=color-spaces-and-color-correction><span class=secno>4.8.11.2 </span>Color spaces and color correction</h5>
+-->
+
+
+
+ <h5 id=color-spaces-and-color-correction><span class=secno>4.8.11.2 </span>Color spaces and color correction</h5>
+
<p>The <code><a href=#the-canvas-element>canvas</a></code> APIs must perform color correction at
only two points: when rendering images with their own gamma
correction and color space information onto the canvas, to convert
@@ -21948,7 +23420,9 @@
<i>origin-clean</i> set to true. The flag must be set to false if
any of the following actions occur:</p>
- <ul><li><p>The element's 2D context's <code title=dom-context-2d-drawImage><a href=#dom-context-2d-drawimage>drawImage()</a></code> method is
+ <ul>
+
+ <li><p>The element's 2D context's <code title=dom-context-2d-drawImage><a href=#dom-context-2d-drawimage>drawImage()</a></code> method is
called with an <code><a href=#htmlimageelement>HTMLImageElement</a></code> whose
<a href=#origin-0>origin</a> is not the <a href=#same-origin title="same
origin">same</a> as that of the <code>Document</code> object
@@ -21982,7 +23456,9 @@
<code><a href=#htmlcanvaselement>HTMLCanvasElement</a></code> whose <i>origin-clean</i> flag was
false when the pattern was created.</li>
- </ul><p>Whenever the <code title=dom-canvas-toDataURL><a href=#dom-canvas-todataurl>toDataURL()</a></code> method of a
+ </ul>
+
+ <p>Whenever the <code title=dom-canvas-toDataURL><a href=#dom-canvas-todataurl>toDataURL()</a></code> method of a
<code><a href=#the-canvas-element>canvas</a></code> element whose <i>origin-clean</i> flag is set to
false is called, the method must raise a <code><a href=#security_err>SECURITY_ERR</a></code>
exception.</p>
@@ -22001,7 +23477,8 @@
<h4 id=the-map-element><span class=secno>4.8.12 </span>The <dfn><code>map</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>Where <a href=#flow-content-0>flow content</a> is expected.</dd>
@@ -22018,7 +23495,9 @@
readonly attribute <a href=#htmlcollection-0>HTMLCollection</a> <a href=#dom-map-images title=dom-map-images>images</a>;
};</pre>
</dd>
- </dl><p>The <code><a href=#the-map-element>map</a></code> element, in conjunction with any
+ </dl>
+
+ <p>The <code><a href=#the-map-element>map</a></code> element, in conjunction with any
<code><a href=#the-area-element>area</a></code> element descendants, defines an <a href=#image-map>image
map</a>. The element <a href=#represents>represents</a> its children.</p>
@@ -22046,7 +23525,8 @@
<h4 id=the-area-element><span class=secno>4.8.13 </span>The <dfn><code>area</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
@@ -22081,7 +23561,9 @@
attribute DOMString <a href=#dom-area-type title=dom-area-type>type</a>;
};</pre>
</dd>
- </dl><p>The <code><a href=#the-area-element>area</a></code> element <a href=#represents>represents</a> either a
+ </dl>
+
+ <p>The <code><a href=#the-area-element>area</a></code> element <a href=#represents>represents</a> either a
hyperlink with some text and a corresponding area on an <a href=#image-map>image
map</a>, or a dead area on an image map.</p>
@@ -22114,28 +23596,41 @@
states to which those keywords map. Some of the keywords are
non-conforming, as noted in the last column.</p>
- <table><thead><tr><th>State
+ <table>
+ <thead>
+ <tr>
+ <th>State
<th>Keywords
<th>Notes
- <tbody><tr><td rowspan=2><a href=#attr-area-shape-circle title=attr-area-shape-circle>Circle state</a>
+ <tbody>
+ <tr>
+ <td rowspan=2><a href=#attr-area-shape-circle title=attr-area-shape-circle>Circle state</a>
<td><dfn id=attr-area-shape-keyword-circ title=attr-area-shape-keyword-circ><code>circ</code></dfn>
<td>Non-conforming
- <tr><td><dfn id=attr-area-shape-keyword-circle title=attr-area-shape-keyword-circle><code>circle</code></dfn>
+ <tr>
+ <td><dfn id=attr-area-shape-keyword-circle title=attr-area-shape-keyword-circle><code>circle</code></dfn>
<td>
- <tr><td><a href=#attr-area-shape-default title=attr-area-shape-default>Default state</a>
+ <tr>
+ <td><a href=#attr-area-shape-default title=attr-area-shape-default>Default state</a>
<td><dfn id=attr-area-shape-keyword-default title=attr-area-shape-keyword-default><code>default</code></dfn>
<td>
- <tr><td rowspan=2><a href=#attr-area-shape-poly title=attr-area-shape-poly>Polygon state</a>
+ <tr>
+ <td rowspan=2><a href=#attr-area-shape-poly title=attr-area-shape-poly>Polygon state</a>
<td><dfn id=attr-area-shape-keyword-poly title=attr-area-shape-keyword-poly><code>poly</code></dfn>
<td>
- <tr><td><dfn id=attr-area-shape-keyword-polygon title=attr-area-shape-keyword-polygon><code>polygon</code></dfn>
+ <tr>
+ <td><dfn id=attr-area-shape-keyword-polygon title=attr-area-shape-keyword-polygon><code>polygon</code></dfn>
<td>Non-conforming
- <tr><td rowspan=2><a href=#attr-area-shape-rect title=attr-area-shape-rect>Rectangle state</a>
+ <tr>
+ <td rowspan=2><a href=#attr-area-shape-rect title=attr-area-shape-rect>Rectangle state</a>
<td><dfn id=attr-area-shape-keyword-rect title=attr-area-shape-keyword-rect><code>rect</code></dfn>
<td>
- <tr><td><dfn id=attr-area-shape-keyword-rectangle title=attr-area-shape-keyword-rectangle><code>rectangle</code></dfn>
+ <tr>
+ <td><dfn id=attr-area-shape-keyword-rectangle title=attr-area-shape-keyword-rectangle><code>rectangle</code></dfn>
<td>Non-conforming
- </table><p>The attribute may be omitted. The <i>missing value default</i> is
+ </table>
+
+ <p>The attribute may be omitted. The <i>missing value default</i> is
the <a href=#attr-area-shape-rect title=attr-area-shape-rect>rectangle</a> state.</p>
<p>The <dfn id=attr-area-coords title=attr-area-coords><code>coords</code></dfn>
@@ -22197,7 +23692,9 @@
<p>The <a href=#activation-behavior>activation behavior</a> of <code><a href=#the-area-element>area</a></code>
elements is to run the following steps:</p>
- <ol><li>If the <code title=event-DOMActivate>DOMActivate</code> event
+ <ol>
+
+ <li>If the <code title=event-DOMActivate>DOMActivate</code> event
in question is not <span title=concept-events-trusted>trusted</span> (i.e. a <code title=dom-click><a href=#dom-click>click()</a></code> method call was the reason for the
event being dispatched), and the <code><a href=#the-area-element>area</a></code> element's <code title=attr-area-target>target</code> attribute is <span class=XXX>...</span> then raise an
<code><a href=#invalid_access_err>INVALID_ACCESS_ERR</a></code> exception.</li>
@@ -22206,7 +23703,9 @@
hyperlinks">follow the hyperlink</a> defined by the
<code><a href=#the-area-element>area</a></code> element, if any.</li>
- </ol><p>The DOM attributes <dfn id=dom-area-alt title=dom-area-alt><code>alt</code></dfn>, <dfn id=dom-area-coords title=dom-area-coords><code>coords</code></dfn>, <dfn id=dom-area-href title=dom-area-href><code>href</code></dfn>, <dfn id=dom-area-target title=dom-area-target><code>target</code></dfn>, <dfn id=dom-area-ping title=dom-area-ping><code>ping</code></dfn>, <dfn id=dom-area-rel title=dom-area-rel><code>rel</code></dfn>, <dfn id=dom-area-media title=dom-area-media><code>media</code></dfn>, <dfn id=dom-area-hreflang title=dom-area-hreflang><code>hreflang</code></dfn>, and <dfn id=dom-area-type title=dom-area-type><code>type</code></dfn>, each must
+ </ol>
+
+ <p>The DOM attributes <dfn id=dom-area-alt title=dom-area-alt><code>alt</code></dfn>, <dfn id=dom-area-coords title=dom-area-coords><code>coords</code></dfn>, <dfn id=dom-area-href title=dom-area-href><code>href</code></dfn>, <dfn id=dom-area-target title=dom-area-target><code>target</code></dfn>, <dfn id=dom-area-ping title=dom-area-ping><code>ping</code></dfn>, <dfn id=dom-area-rel title=dom-area-rel><code>rel</code></dfn>, <dfn id=dom-area-media title=dom-area-media><code>media</code></dfn>, <dfn id=dom-area-hreflang title=dom-area-hreflang><code>hreflang</code></dfn>, and <dfn id=dom-area-type title=dom-area-type><code>type</code></dfn>, each must
<a href=#reflect>reflect</a> the respective content attributes of the same
name.</p>
@@ -22274,7 +23773,9 @@
representing an image has a <code title=attr-area-usemap>usemap</code> attribute specified, user
agents must process it as follows:</p>
- <ol><li><p>First, <a href=#rules-for-parsing-a-hash-name-reference>rules for parsing a hash-name reference</a>
+ <ol>
+
+ <li><p>First, <a href=#rules-for-parsing-a-hash-name-reference>rules for parsing a hash-name reference</a>
to a <code><a href=#the-map-element>map</a></code> element must be followed. This will return
either an element (the <var title="">map</var>) or null.</li>
@@ -22284,7 +23785,9 @@
<li><p>Otherwise, the user agent must collect all the
<code><a href=#the-area-element>area</a></code> elements that are descendants of the <var title="">map</var>. Let those be the <var title="">areas</var>.</li>
- </ol><p>Having obtained the list of <code><a href=#the-area-element>area</a></code> elements that form
+ </ol>
+
+ <p>Having obtained the list of <code><a href=#the-area-element>area</a></code> elements that form
the image map (the <var title="">areas</var>), interactive user
agents must process the list in one of two ways.</p>
@@ -22298,8 +23801,10 @@
content</a> is shown instead). The following steps therefore only
apply to <code><a href=#the-img-element>img</a></code> elements.</p>
- <ol><li><p>Remove all the <code><a href=#the-area-element>area</a></code> elements in <var title="">areas</var> that have no <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute.</li>
+ <ol>
+ <li><p>Remove all the <code><a href=#the-area-element>area</a></code> elements in <var title="">areas</var> that have no <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute.</li>
+
<li><p>Remove all the <code><a href=#the-area-element>area</a></code> elements in <var title="">areas</var> that have no <code title=attr-area-alt><a href=#attr-area-alt>alt</a></code> attribute, or whose <code title=attr-area-alt><a href=#attr-area-alt>alt</a></code> attribute's value is the empty
string, <em>if</em> there is another <code><a href=#the-area-element>area</a></code> element in
<var title="">areas</var> with the same value in the <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute and with a
@@ -22315,7 +23820,9 @@
a user-agent-defined fashion intended to indicate the lack of
suitable author-provided text.</li>
- </ol><p>If the user agent intends to show the image and allow interaction
+ </ol>
+
+ <p>If the user agent intends to show the image and allow interaction
with the image to select hyperlinks, then the image must be
associated with a set of layered shapes, taken from the
<code><a href=#the-area-element>area</a></code> elements in <var title="">areas</var>, in reverse
@@ -22328,8 +23835,10 @@
be processed as follows to obtain a shape to layer onto the
image:</p>
- <ol><li><p>Find the state that the element's <code title=attr-area-shape><a href=#attr-area-shape>shape</a></code> attribute represents.</li>
+ <ol>
+ <li><p>Find the state that the element's <code title=attr-area-shape><a href=#attr-area-shape>shape</a></code> attribute represents.</li>
+
<li><p>Use the <a href=#rules-for-parsing-a-list-of-integers>rules for parsing a list of integers</a> to
parse the element's <code title=attr-area-coords><a href=#attr-area-coords>coords</a></code>
attribute, if it is present, and let the result be the <var title="">coords</var> list. If the attribute is absent, let the
@@ -22339,22 +23848,32 @@
list is less than the minimum number given for the
<code><a href=#the-area-element>area</a></code> element's current state, as per the following
table, then the shape is empty; abort these steps.</p>
- <table><thead><tr><th>State
+ <table>
+ <thead>
+ <tr>
+ <th>State
<th>Minimum number of items
- <tbody><tr><td><a href=#attr-area-shape-circle title=attr-area-shape-circle>Circle state</a>
+ <tbody>
+ <tr>
+ <td><a href=#attr-area-shape-circle title=attr-area-shape-circle>Circle state</a>
<td>3
- <tr><td><a href=#attr-area-shape-default title=attr-area-shape-default>Default state</a>
+ <tr>
+ <td><a href=#attr-area-shape-default title=attr-area-shape-default>Default state</a>
<td>0
- <tr><td><a href=#attr-area-shape-poly title=attr-area-shape-poly>Polygon state</a>
+ <tr>
+ <td><a href=#attr-area-shape-poly title=attr-area-shape-poly>Polygon state</a>
<td>6
- <tr><td><a href=#attr-area-shape-rect title=attr-area-shape-rect>Rectangle state</a>
+ <tr>
+ <td><a href=#attr-area-shape-rect title=attr-area-shape-rect>Rectangle state</a>
<td>4
- </table></li>
+ </table>
+ </li>
<li><p>Check for excess items in the <var title="">coords</var>
list as per the entry in the following list corresponding to the
<code title=attr-area-shape><a href=#attr-area-shape>shape</a></code> attribute's state:</p>
- <dl class=switch><dt><a href=#attr-area-shape-circle title=attr-area-shape-circle>Circle state</a></dt>
+ <dl class=switch>
+ <dt><a href=#attr-area-shape-circle title=attr-area-shape-circle>Circle state</a></dt>
<dd>Drop any items in the list beyond the third.</dd>
<dt><a href=#attr-area-shape-default title=attr-area-shape-default>Default state</a></dt>
<dd>Drop all items in the list.</dd>
@@ -22362,7 +23881,8 @@
<dd>Drop the last item if there's an odd number of items.</dd>
<dt><a href=#attr-area-shape-rect title=attr-area-shape-rect>Rectangle state</a></dt>
<dd>Drop any items in the list beyond the fourth.</dd>
- </dl></li>
+ </dl>
+ </li>
<li><p>If the <code title=attr-area-shape><a href=#attr-area-shape>shape</a></code> attribute
represents the <a href=#attr-area-shape-rect title=attr-area-shape-rect>rectangle
@@ -22386,7 +23906,9 @@
state of the <code title=attr-area-shape><a href=#attr-area-shape>shape</a></code>
attribute:</p>
- <dl class=switch><dt><a href=#attr-area-shape-circle title=attr-area-shape-circle>Circle state</a></dt>
+ <dl class=switch>
+
+ <dt><a href=#attr-area-shape-circle title=attr-area-shape-circle>Circle state</a></dt>
<dd>
<p>Let <var title="">x</var> be the first number in <var title="">coords</var>, <var title="">y</var> be the second
number, and <var title="">r</var> be the third number.</p>
@@ -22448,14 +23970,18 @@
</dd>
- </dl><p>For historical reasons, the coordinates must be interpreted
+ </dl>
+
+ <p>For historical reasons, the coordinates must be interpreted
relative to the <em>displayed</em> image, even if it stretched
using CSS or the image element's <code title="">width</code> and
<code title="">height</code> attributes.</p>
</li>
- </ol><p>Mouse clicks on an image associated with a set of layered shapes
+ </ol>
+
+ <p>Mouse clicks on an image associated with a set of layered shapes
per the above algorithm must be dispatched to the top-most shape
covering the point that the pointing device indicated (if any), and
then, must be dispatched again (with a new <code>Event</code>
@@ -22540,15 +24066,19 @@
resolution depends on the reading distance.) If both attributes are
specified, then one of the following statements must be true:</p>
- <ul><li><span><var title="">specified width</var> - 0.5 ≤
- <var title="">specified height</var> * <var title="">target ratio</var> ≤
+ <ul>
+
+ <li><span><var title="">specified width</var> - 0.5 ≤
+ <var title="">specified height</var> * <var title="">target ratio</var> ≤
<var title="">specified width</var> + 0.5</span></li>
- <li><span><var title="">specified height</var> - 0.5 ≤
- <var title="">specified width</var> / <var title="">target ratio</var> ≤
+ <li><span><var title="">specified height</var> - 0.5 ≤
+ <var title="">specified width</var> / <var title="">target ratio</var> ≤
<var title="">specified height</var> + 0.5</span></li>
- </ul><p>The <var title="">target ratio</var> is the ratio of the
+ </ul>
+
+ <p>The <var title="">target ratio</var> is the ratio of the
intrinsic width to the intrinsic height in the resource. The <var title="">specified width</var> and <var title="">specified
height</var> are the values of the <code title=attr-dim-width><a href=#attr-dim-width>width</a></code> and <code title=attr-dim-height><a href=#attr-dim-height>height</a></code> attributes respectively.</p>
@@ -22579,7 +24109,8 @@
<h4 id=the-table-element><span class=secno>4.9.2 </span>The <dfn><code>table</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>Where <a href=#flow-content-0>flow content</a> is expected.</dd>
@@ -22613,7 +24144,9 @@
void <a href=#dom-table-deleterow title=dom-table-deleteRow>deleteRow</a>(in long index);
};</pre>
</dd>
- </dl><p>The <code><a href=#the-table-element>table</a></code> element <a href=#represents>represents</a> data with
+ </dl>
+
+ <p>The <code><a href=#the-table-element>table</a></code> element <a href=#represents>represents</a> data with
more than one dimension, in the form of a <a href=#concept-table title=concept-table>table</a>.</p>
<p class=XXX>we need some editorial text on how layout
@@ -22622,8 +24155,10 @@
<p>The children of a <code><a href=#the-table-element>table</a></code> element must be, in
order:</p><!-- XXX do we need this? it's already up there... -->
- <ol><li><p>Zero or one <code><a href=#the-caption-element>caption</a></code> elements.</li>
+ <ol>
+ <li><p>Zero or one <code><a href=#the-caption-element>caption</a></code> elements.</li>
+
<li><p>Zero or more <code><a href=#the-colgroup-element>colgroup</a></code> elements.</li>
<li><p>Zero or one <code><a href=#the-thead-element>thead</a></code> elements.</li>
@@ -22633,17 +24168,23 @@
<li><p>Either:</p>
- <ul><li>Zero or more <code><a href=#the-tbody-element>tbody</a></code> elements, or</li>
+ <ul>
+ <li>Zero or more <code><a href=#the-tbody-element>tbody</a></code> elements, or</li>
+
<li>One or more <code><a href=#the-tr-element>tr</a></code> elements. <strong class=note>(Only expressible in the <span title="">XML
serialization</span><!-- XXX xref -->.)</strong></li>
- </ul></li>
+ </ul>
+ </li>
+
<li><p>Zero or one <code><a href=#the-tfoot-element>tfoot</a></code> element, if there are no
other <code><a href=#the-tfoot-element>tfoot</a></code> elements in the table.</li>
- </ol><p>The <code><a href=#the-table-element>table</a></code> element takes part in the <a href=#table-model>table
+ </ol>
+
+ <p>The <code><a href=#the-table-element>table</a></code> element takes part in the <a href=#table-model>table
model</a>.</p>
<p>The <dfn id=dom-table-caption title=dom-table-caption><code>caption</code></dfn> DOM
@@ -22754,7 +24295,9 @@
first item in the following list of conditions that describes the
state of the table and the <var title="">index</var> argument:</p>
- <dl class=switch><dt>If <var title="">index</var> is less than −1 or greater than
+ <dl class=switch>
+
+ <dt>If <var title="">index</var> is less than −1 or greater than
the number of elements in <code title=dom-table-rows><a href=#dom-table-rows>rows</a></code>
collection:</dt>
@@ -22778,7 +24321,7 @@
the last <code><a href=#the-tbody-element>tbody</a></code> element in the table, and return the
<code><a href=#the-tr-element>tr</a></code> element.</dd>
- <dt>If <var title="">index</var> is missing, equal to −1, or
+ <dt>If <var title="">index</var> is missing, equal to −1, or
equal to the number of items in <code title=dom-table-rows><a href=#dom-table-rows>rows</a></code> collection:</dt>
<dd>The method must create a <code><a href=#the-tr-element>tr</a></code> element, and append it
@@ -22793,10 +24336,14 @@
in the same parent, and finally must return the newly created
<code><a href=#the-tr-element>tr</a></code> element.</dd>
- </dl><p>When the <dfn id=dom-table-deleterow title=dom-table-deleteRow><code>deleteRow(<var title="">index</var>)</code></dfn> method is called, the user agent
+ </dl>
+
+ <p>When the <dfn id=dom-table-deleterow title=dom-table-deleteRow><code>deleteRow(<var title="">index</var>)</code></dfn> method is called, the user agent
must run the following steps:</p>
- <ol><li><p>If <var title="">index</var> is equal to −1, then
+ <ol>
+
+ <li><p>If <var title="">index</var> is equal to −1, then
<var title="">index</var> must be set to the number if items in the
<code title=dom-table-rows><a href=#dom-table-rows>rows</a></code> collection, minus
one.</li>
@@ -22808,9 +24355,13 @@
<li><p>Otherwise, the method must remove the <var title="">index</var>th element in the <code title=dom-table-rows><a href=#dom-table-rows>rows</a></code> collection from its parent.</p>
- </ol><h4 id=the-caption-element><span class=secno>4.9.3 </span>The <dfn><code>caption</code></dfn> element</h4>
+ </ol>
- <dl class=element><dt>Categories</dt>
+
+ <h4 id=the-caption-element><span class=secno>4.9.3 </span>The <dfn><code>caption</code></dfn> element</h4>
+
+ <dl class=element>
+ <dt>Categories</dt>
<dd>None.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>As the first element child of a <code><a href=#the-table-element>table</a></code> element.</dd>
@@ -22820,7 +24371,9 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-caption-element>caption</a></code> element <a href=#represents>represents</a> the title of the
+ </dl>
+
+ <p>The <code><a href=#the-caption-element>caption</a></code> element <a href=#represents>represents</a> the title of the
<code><a href=#the-table-element>table</a></code> that is its parent, if it has a parent and that
is a <code><a href=#the-table-element>table</a></code> element.</p>
@@ -22830,7 +24383,8 @@
<h4 id=the-colgroup-element><span class=secno>4.9.4 </span>The <dfn><code>colgroup</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd>None.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>As a child of a <code><a href=#the-table-element>table</a></code> element, after any
@@ -22848,7 +24402,9 @@
attribute unsigned long <a href=#dom-colgroup-span title=dom-colgroup-span>span</a>;
};</pre>
</dd>
- </dl><p>The <code><a href=#the-colgroup-element>colgroup</a></code> element <a href=#represents>represents</a> a <a href=#concept-column-group title=concept-column-group>group</a> of one or more <a href=#concept-column title=concept-column>columns</a> in the <code><a href=#the-table-element>table</a></code> that
+ </dl>
+
+ <p>The <code><a href=#the-colgroup-element>colgroup</a></code> element <a href=#represents>represents</a> a <a href=#concept-column-group title=concept-column-group>group</a> of one or more <a href=#concept-column title=concept-column>columns</a> in the <code><a href=#the-table-element>table</a></code> that
is its parent, if it has a parent and that is a <code><a href=#the-table-element>table</a></code>
element.</p>
@@ -22868,7 +24424,8 @@
<h4 id=the-col-element><span class=secno>4.9.5 </span>The <dfn><code>col</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd>None.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>As a child of a <code><a href=#the-colgroup-element>colgroup</a></code> element that doesn't have
@@ -22885,7 +24442,9 @@
<code><a href=#the-colgroup-element>colgroup</a></code> elements. This interface defines one member,
<code title=dom-col-span><a href=#dom-col-span>span</a></code>.</p>
</dd>
- </dl><p>If a <code><a href=#the-col-element>col</a></code> element has a parent and that is a
+ </dl>
+
+ <p>If a <code><a href=#the-col-element>col</a></code> element has a parent and that is a
<code><a href=#the-colgroup-element>colgroup</a></code> element that itself has a parent that is a
<code><a href=#the-table-element>table</a></code> element, then the <code><a href=#the-col-element>col</a></code> element
<a href=#represents>represents</a> one or more <a href=#concept-column title=concept-column>columns</a>
@@ -22907,7 +24466,8 @@
<h4 id=the-tbody-element><span class=secno>4.9.6 </span>The <dfn><code>tbody</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd>None.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>As a child of a <code><a href=#the-table-element>table</a></code> element, after any
@@ -22929,7 +24489,9 @@
<p>The <code><a href=#htmltablesectionelement>HTMLTableSectionElement</a></code> interface is also
used for <code><a href=#the-thead-element>thead</a></code> and <code><a href=#the-tfoot-element>tfoot</a></code> elements.</p>
</dd>
- </dl><p>The <code><a href=#the-tbody-element>tbody</a></code> element <a href=#represents>represents</a> a <a href=#concept-row-group title=concept-row-group>block</a> of <a href=#concept-row title=concept-row>rows</a> that consist of a body of data for
+ </dl>
+
+ <p>The <code><a href=#the-tbody-element>tbody</a></code> element <a href=#represents>represents</a> a <a href=#concept-row-group title=concept-row-group>block</a> of <a href=#concept-row title=concept-row>rows</a> that consist of a body of data for
the parent <code><a href=#the-table-element>table</a></code> element, if the <code><a href=#the-tbody-element>tbody</a></code>
element has a parent and it is a <code><a href=#the-table-element>table</a></code>.</p>
@@ -22944,12 +24506,12 @@
<p>The <dfn id=dom-tbody-insertrow title=dom-tbody-insertRow><code>insertRow(<var title="">index</var>)</code></dfn> method must, when invoked on an
element <var title="">table section</var>, act as follows:</p>
- <p>If <var title="">index</var> is less than −1 or greater than the
+ <p>If <var title="">index</var> is less than −1 or greater than the
number of elements in the <code title=dom-tbody-rows><a href=#dom-tbody-rows>rows</a></code>
collection, the method must raise an <code><a href=#index_size_err>INDEX_SIZE_ERR</a></code>
exception.</p>
- <p>If <var title="">index</var> is missing, equal to −1, or
+ <p>If <var title="">index</var> is missing, equal to −1, or
equal to the number of items in the <code title=dom-tbody-rows><a href=#dom-tbody-rows>rows</a></code> collection, the method must
create a <code><a href=#the-tr-element>tr</a></code> element, append it to the element <var title="">table section</var>, and return the newly created
<code><a href=#the-tr-element>tr</a></code> element.</p>
@@ -22969,7 +24531,8 @@
<h4 id=the-thead-element><span class=secno>4.9.7 </span>The <dfn><code>thead</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd>None.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>As a child of a <code><a href=#the-table-element>table</a></code> element, after any
@@ -22985,7 +24548,9 @@
<dt>DOM interface:</dt>
<dd><code><a href=#htmltablesectionelement>HTMLTableSectionElement</a></code>, as defined for
<code><a href=#the-tbody-element>tbody</a></code> elements.</dd>
- </dl><p>The <code><a href=#the-thead-element>thead</a></code> element <a href=#represents>represents</a> the <a href=#concept-row-group title=concept-row-group>block</a> of <a href=#concept-row title=concept-row>rows</a> that consist of the column labels
+ </dl>
+
+ <p>The <code><a href=#the-thead-element>thead</a></code> element <a href=#represents>represents</a> the <a href=#concept-row-group title=concept-row-group>block</a> of <a href=#concept-row title=concept-row>rows</a> that consist of the column labels
(headers) for the parent <code><a href=#the-table-element>table</a></code> element, if the
<code><a href=#the-thead-element>thead</a></code> element has a parent and it is a
<code><a href=#the-table-element>table</a></code>.</p>
@@ -22996,7 +24561,8 @@
<h4 id=the-tfoot-element><span class=secno>4.9.8 </span>The <dfn><code>tfoot</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd>None.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>As a child of a <code><a href=#the-table-element>table</a></code> element, after any
@@ -23016,7 +24582,9 @@
<dt>DOM interface:</dt>
<dd><code><a href=#htmltablesectionelement>HTMLTableSectionElement</a></code>, as defined for
<code><a href=#the-tbody-element>tbody</a></code> elements.</dd>
- </dl><p>The <code><a href=#the-tfoot-element>tfoot</a></code> element <a href=#represents>represents</a> the <a href=#concept-row-group title=concept-row-group>block</a> of <a href=#concept-row title=concept-row>rows</a> that consist of the column summaries
+ </dl>
+
+ <p>The <code><a href=#the-tfoot-element>tfoot</a></code> element <a href=#represents>represents</a> the <a href=#concept-row-group title=concept-row-group>block</a> of <a href=#concept-row title=concept-row>rows</a> that consist of the column summaries
(footers) for the parent <code><a href=#the-table-element>table</a></code> element, if the
<code><a href=#the-tfoot-element>tfoot</a></code> element has a parent and it is a
<code><a href=#the-table-element>table</a></code>.</p>
@@ -23027,7 +24595,8 @@
<h4 id=the-tr-element><span class=secno>4.9.9 </span>The <dfn><code>tr</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd>None.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>As a child of a <code><a href=#the-thead-element>thead</a></code> element.</dd>
@@ -23051,8 +24620,10 @@
void <span>deleteCell</span>(in long index);
};</pre>
</dd>
- </dl><p>The <code><a href=#the-tr-element>tr</a></code> element <a href=#represents>represents</a> a <a href=#concept-row title=concept-row>row</a> of <a href=#concept-cell title=concept-cell>cells</a> in a <a href=#concept-table title=concept-table>table</a>.</p>
+ </dl>
+ <p>The <code><a href=#the-tr-element>tr</a></code> element <a href=#represents>represents</a> a <a href=#concept-row title=concept-row>row</a> of <a href=#concept-cell title=concept-cell>cells</a> in a <a href=#concept-table title=concept-table>table</a>.</p>
+
<p>The <code><a href=#the-tr-element>tr</a></code> element takes part in the <a href=#table-model>table
model</a>.</p>
@@ -23063,7 +24634,7 @@
<code><a href=#the-table-element>table</a></code> element, return the index of the <code><a href=#the-tr-element>tr</a></code>
element in that <code><a href=#the-table-element>table</a></code> element's <code title=dom-table-rows><a href=#dom-table-rows>rows</a></code> collection. If there is no such
<code><a href=#the-table-element>table</a></code> element, then the attribute must return
- −1.</p>
+ −1.</p>
<p>The <dfn id=dom-tr-sectionrowindex title=dom-tr-sectionRowIndex><code>sectionRowIndex</code></dfn>
attribute must, if the element has a parent <code><a href=#the-table-element>table</a></code>,
@@ -23073,7 +24644,7 @@
that's the <code title=dom-table-rows><a href=#dom-table-rows>rows</a></code> collection; for
table sections, that's the <code title=dom-tbody-rows><a href=#dom-tbody-rows>rows</a></code>
collection). If there is no such parent element, then the attribute
- must return −1.</p>
+ must return −1.</p>
<p>The <dfn id=dom-tr-cells title=dom-tr-cells><code>cells</code></dfn> attribute
must return an <code><a href=#htmlcollection-0>HTMLCollection</a></code> rooted at the
@@ -23083,12 +24654,12 @@
<p>The <dfn id=dom-tr-insertcell title=dom-tr-insertCell><code>insertCell(<var title="">index</var>)</code></dfn> method must act as follows:</p>
- <p>If <var title="">index</var> is less than −1 or greater than the
+ <p>If <var title="">index</var> is less than −1 or greater than the
number of elements in the <code title=dom-tr-cells><a href=#dom-tr-cells>cells</a></code>
collection, the method must raise an <code><a href=#index_size_err>INDEX_SIZE_ERR</a></code>
exception.</p>
- <p>If <var title="">index</var> is missing, equal to −1, or
+ <p>If <var title="">index</var> is missing, equal to −1, or
equal to the number of items in <code title=dom-tr-cells><a href=#dom-tr-cells>cells</a></code> collection, the method must create
a <code><a href=#the-td-element>td</a></code> element, append it to the <code><a href=#the-tr-element>tr</a></code> element,
and return the newly created <code><a href=#the-td-element>td</a></code> element.</p>
@@ -23107,7 +24678,8 @@
<h4 id=the-td-element><span class=secno>4.9.10 </span>The <dfn><code>td</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#sectioning-root>Sectioning root</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>As a child of a <code><a href=#the-tr-element>tr</a></code> element.</dd>
@@ -23123,15 +24695,18 @@
<dd>
<pre class=idl>interface <dfn id=htmltabledatacellelement>HTMLTableDataCellElement</dfn> : <a href=#htmltablecellelement>HTMLTableCellElement</a> {};</pre>
</dd>
- </dl><p>The <code><a href=#the-td-element>td</a></code> element <a href=#represents>represents</a> a data <a href=#concept-cell title=concept-cell>cell</a> in a table.</p>
+ </dl>
+ <p>The <code><a href=#the-td-element>td</a></code> element <a href=#represents>represents</a> a data <a href=#concept-cell title=concept-cell>cell</a> in a table.</p>
+
<p class=note>The <code><a href=#the-td-element>td</a></code> element and its <code title=attr-tdth-colspan><a href=#attr-tdth-colspan>colspan</a></code>, <code title=attr-tdth-rowspan><a href=#attr-tdth-rowspan>rowspan</a></code>, and <code title=attr-tdth-headers><a href=#attr-tdth-headers>headers</a></code> attributes take part in the
<a href=#table-model>table model</a>.</p>
<h4 id=the-th-element><span class=secno>4.9.11 </span>The <dfn><code>th</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd>None.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>As a child of a <code><a href=#the-tr-element>tr</a></code> element.</dd>
@@ -23149,14 +24724,18 @@
attribute DOMString <a href=#dom-th-scope title=dom-th-scope>scope</a>;
};</pre>
</dd>
- </dl><p>The <code><a href=#the-th-element>th</a></code> element <a href=#represents>represents</a> a header <a href=#concept-cell title=concept-cell>cell</a> in a table.</p>
+ </dl>
+ <p>The <code><a href=#the-th-element>th</a></code> element <a href=#represents>represents</a> a header <a href=#concept-cell title=concept-cell>cell</a> in a table.</p>
+
<p>The <code><a href=#the-th-element>th</a></code> element may have a <dfn id=attr-th-scope title=attr-th-scope><code>scope</code></dfn> content attribute
specified. The <code title=attr-th-scope><a href=#attr-th-scope>scope</a></code> attribute is
an <a href=#enumerated-attribute>enumerated attribute</a> with five states, four of which
have explicit keywords:</p>
- <dl><dt>The <dfn id=attr-th-scope-row title=attr-th-scope-row><code>row</code></dfn>
+ <dl>
+
+ <dt>The <dfn id=attr-th-scope-row title=attr-th-scope-row><code>row</code></dfn>
keyword, which maps to the <i>row</i> state</dt>
<dd>The <i>row</i> state means the header cell applies to some of
@@ -23191,7 +24770,9 @@
<dd>The <i>auto</i> state makes the header cell apply to a set of
cells selected based on context.</dd>
- </dl><p>The <code title=attr-th-scope><a href=#attr-th-scope>scope</a></code> attribute's
+ </dl>
+
+ <p>The <code title=attr-th-scope><a href=#attr-th-scope>scope</a></code> attribute's
<i>missing value default</i> is the <i>auto</i> state.</p>
<p class=note>The <code><a href=#the-th-element>th</a></code> element and its <code title=attr-tdth-colspan><a href=#attr-tdth-colspan>colspan</a></code>, <code title=attr-tdth-rowspan><a href=#attr-tdth-rowspan>rowspan</a></code>, <code title=attr-tdth-headers><a href=#attr-tdth-headers>headers</a></code>, and <code title=attr-th-scope><a href=#attr-th-scope>scope</a></code> attributes take part in the
@@ -23268,15 +24849,15 @@
aligned on a two-dimensional grid of <dfn id=concept-slots title=concept-slots>slots</dfn> with coordinates (<var title="">x</var>, <var title="">y</var>). The grid is finite, and is
either empty or has one or more slots. If the grid has one or more
slots, then the <var title="">x</var> coordinates are always in the
- range <span>0 ≤ <var title="">x</var> < <var title="">x<sub title="">width</sub></var></span>, and the <var title="">y</var>
- coordinates are always in the range <span>0 ≤ <var title="">y</var> < <var title="">y<sub title="">height</sub></var></span>. If one or both of <var title="">x<sub title="">width</sub></var> and <var title="">y<sub title="">height</sub></var> are zero, then the table is empty (has
+ range <span>0 ≤ <var title="">x</var> < <var title="">x<sub title="">width</sub></var></span>, and the <var title="">y</var>
+ coordinates are always in the range <span>0 ≤ <var title="">y</var> < <var title="">y<sub title="">height</sub></var></span>. If one or both of <var title="">x<sub title="">width</sub></var> and <var title="">y<sub title="">height</sub></var> are zero, then the table is empty (has
no slots). Tables correspond to <code><a href=#the-table-element>table</a></code> elements.</p>
<p>A <dfn id=concept-cell title=concept-cell>cell</dfn> is a set of slots anchored
at a slot (<var title="">cell<sub title="">x</sub></var>, <var title="">cell<sub title="">y</sub></var>), and with a particular
<var title="">width</var> and <var title="">height</var> such that
- the cell covers all the slots with coordinates (<var title="">x</var>, <var title="">y</var>) where <span><var title="">cell<sub title="">x</sub></var> ≤ <var title="">x</var> < <var title="">cell<sub title="">x</sub></var>+<var title="">width</var></span> and
- <span><var title="">cell<sub title="">y</sub></var> ≤ <var title="">y</var> < <var title="">cell<sub title="">y</sub></var>+<var title="">height</var></span>. Cells can
+ the cell covers all the slots with coordinates (<var title="">x</var>, <var title="">y</var>) where <span><var title="">cell<sub title="">x</sub></var> ≤ <var title="">x</var> < <var title="">cell<sub title="">x</sub></var>+<var title="">width</var></span> and
+ <span><var title="">cell<sub title="">y</sub></var> ≤ <var title="">y</var> < <var title="">cell<sub title="">y</sub></var>+<var title="">height</var></span>. Cells can
either be <em>data cells</em> or <em>header cells</em>. Data cells
correspond to <code><a href=#the-td-element>td</a></code> elements, and header cells correspond
to <code><a href=#the-th-element>th</a></code> elements. Cells of both types can have zero or
@@ -23296,7 +24877,7 @@
<p>A <dfn id=concept-row-group title=concept-row-group>row group</dfn> is a set of
<a href=#concept-row title=concept-row>rows</a> anchored at a slot (0, <var title="">group<sub title="">y</sub></var>) with a particular <var title="">height</var> such that the row group covers all the slots
with coordinates (<var title="">x</var>, <var title="">y</var>)
- where <span>0 ≤ <var title="">x</var> < <var title="">x<sub title="">width</sub></var></span> and <span><var title="">group<sub title="">y</sub></var> ≤ <var title="">y</var> < <var title="">group<sub title="">y</sub></var>+<var title="">height</var></span>. Row groups
+ where <span>0 ≤ <var title="">x</var> < <var title="">x<sub title="">width</sub></var></span> and <span><var title="">group<sub title="">y</sub></var> ≤ <var title="">y</var> < <var title="">group<sub title="">y</sub></var>+<var title="">height</var></span>. Row groups
correspond to <code><a href=#the-tbody-element>tbody</a></code>, <code><a href=#the-thead-element>thead</a></code>, and
<code><a href=#the-tfoot-element>tfoot</a></code> elements. Not every row is necessarily in a row
group.</p>
@@ -23305,8 +24886,8 @@
of <a href=#concept-column title=concept-column>columns</a> anchored at a slot
(<var title="">group<sub title="">x</sub></var>, 0) with a
particular <var title="">width</var> such that the column group
- covers all the slots with coordinates (<var title="">x</var>, <var title="">y</var>) where <span><var title="">group<sub title="">x</sub></var> ≤ <var title="">x</var> < <var title="">group<sub title="">x</sub></var>+<var title="">width</var></span> and
- <span>0 ≤ <var title="">y</var> < <var title="">y<sub title="">height</sub></var></span>. Column groups
+ covers all the slots with coordinates (<var title="">x</var>, <var title="">y</var>) where <span><var title="">group<sub title="">x</sub></var> ≤ <var title="">x</var> < <var title="">group<sub title="">x</sub></var>+<var title="">width</var></span> and
+ <span>0 ≤ <var title="">y</var> < <var title="">y<sub title="">height</sub></var></span>. Column groups
correspond to <code><a href=#the-colgroup-element>colgroup</a></code> elements. Not every column is
necessarily in a column group.</p>
@@ -23339,7 +24920,9 @@
there are any <a href=#table-model-error title="table model error">table model
errors</a>, user agents must use the following algorithm:</p>
- <ol><li>
+ <ol>
+
+ <li>
<p>Let <var title="">x<sub title="">width</sub></var> be zero.</p>
</li>
@@ -23401,32 +24984,41 @@
following elements, <a href=#concept-table-advance title=concept-table-advance>advance</a> the <var title="">current element</var> to the next child of the
<code><a href=#the-table-element>table</a></code>:</p>
- <ul class=brief><li><code><a href=#the-colgroup-element>colgroup</a></code></li>
+ <ul class=brief>
+ <li><code><a href=#the-colgroup-element>colgroup</a></code></li>
<li><code><a href=#the-thead-element>thead</a></code></li>
<li><code><a href=#the-tbody-element>tbody</a></code></li>
<li><code><a href=#the-tfoot-element>tfoot</a></code></li>
<li><code><a href=#the-tr-element>tr</a></code></li>
- </ul></li>
+ </ul>
+ </li>
+
<li>
<p>If the <var title="">current element</var> is a
<code><a href=#the-colgroup-element>colgroup</a></code>, follow these substeps:</p>
- <ol><li>
+ <ol>
+ <li>
+
<p><i>Column groups</i>: Process the <var title="">current
element</var> according to the appropriate case below:</p>
- <dl class=switch><dt>If the <var title="">current element</var> has any
+ <dl class=switch>
+
+ <dt>If the <var title="">current element</var> has any
<code><a href=#the-col-element>col</a></code> element children</dt>
<dd>
<p>Follow these steps:</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>Let <var title="">x<sub title="">start</sub></var> have
the value of <span><var title="">x<sub title="">width</sub></var></span>.</p>
@@ -23492,16 +25084,20 @@
</li>
- </ol></dd>
+ </ol>
+ </dd>
+
<dt>If the <var title="">current element</var> has no
<code><a href=#the-col-element>col</a></code> element children</dt>
<dd>
- <ol><li>
+ <ol>
+ <li>
+
<p>If the <code><a href=#the-colgroup-element>colgroup</a></code> element has a <code title=attr-colgroup-span><a href=#attr-colgroup-span>span</a></code> attribute, then parse
its value using the <a href=#rules-for-parsing-non-negative-integers>rules for parsing non-negative
integers</a>.</p>
@@ -23533,10 +25129,14 @@
</li>
- </ol></dd>
+ </ol>
- </dl></li>
+ </dd>
+ </dl>
+
+ </li>
+
<li>
<p><a href=#concept-table-advance title=concept-table-advance>Advance</a> the <var title="">current element</var> to the next child of the
@@ -23550,13 +25150,16 @@
the following elements, <a href=#concept-table-advance title=concept-table-advance>advance</a> the <var title="">current element</var> to the next child of the
<code><a href=#the-table-element>table</a></code>:</p>
- <ul class=brief><li><code><a href=#the-colgroup-element>colgroup</a></code></li>
+ <ul class=brief>
+ <li><code><a href=#the-colgroup-element>colgroup</a></code></li>
<li><code><a href=#the-thead-element>thead</a></code></li>
<li><code><a href=#the-tbody-element>tbody</a></code></li>
<li><code><a href=#the-tfoot-element>tfoot</a></code></li>
<li><code><a href=#the-tr-element>tr</a></code></li>
- </ul></li>
+ </ul>
+ </li>
+
<li>
<p>If the <var title="">current element</var> is a
@@ -23565,8 +25168,10 @@
</li>
- </ol></li>
+ </ol>
+ </li>
+
<li>
<p>Let <var title="">y<sub title="">current</sub></var> be
@@ -23587,12 +25192,15 @@
not one of the following elements, <a href=#concept-table-advance title=concept-table-advance>advance</a> the <var title="">current element</var> to the next child of the
<code><a href=#the-table-element>table</a></code>:</p>
- <ul class=brief><li><code><a href=#the-thead-element>thead</a></code></li>
+ <ul class=brief>
+ <li><code><a href=#the-thead-element>thead</a></code></li>
<li><code><a href=#the-tbody-element>tbody</a></code></li>
<li><code><a href=#the-tfoot-element>tfoot</a></code></li>
<li><code><a href=#the-tr-element>tr</a></code></li>
- </ul></li>
+ </ul>
+ </li>
+
<li>
<p>If the <var title="">current element</var> is a
@@ -23665,13 +25273,17 @@
</li>
- </ol><p>The <dfn id=algorithm-for-processing-row-groups>algorithm for processing row groups</dfn>, which is
+ </ol>
+
+ <p>The <dfn id=algorithm-for-processing-row-groups>algorithm for processing row groups</dfn>, which is
invoked by the set of steps above for processing
<code><a href=#the-thead-element>thead</a></code>, <code><a href=#the-tbody-element>tbody</a></code>, and <code><a href=#the-tfoot-element>tfoot</a></code>
elements, is:</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>Let <var title="">y<sub title="">start</sub></var> have the
value of <var title="">y<sub title="">height</sub></var>.</p>
@@ -23688,7 +25300,7 @@
<li>
<!-- if we added any rows, make them part of a row group -->
- <p>If <span><var title="">y<sub title="">height</sub></var> > <var title="">y<sub title="">start</sub></var></span>, then let all the last <a href=#concept-row title=concept-row>rows</a> in <var title="">the table</var>
+ <p>If <span><var title="">y<sub title="">height</sub></var> > <var title="">y<sub title="">start</sub></var></span>, then let all the last <a href=#concept-row title=concept-row>rows</a> in <var title="">the table</var>
from <span>y=<var title="">y<sub title="">start</sub></var></span>
to <span>y=<var title="">y<sub title="">height</sub></var>-1</span> form a new <a href=#concept-row-group title=concept-row-group>row group</a>, anchored at the slot
with coordinate (0, <var title="">y<sub title="">start</sub></var>), with height <span><var title="">y<sub title="">height</sub></var>-<var title="">y<sub title="">start</sub></var></span>, corresponding to the element
@@ -23702,18 +25314,24 @@
</li>
- </ol><p>The <dfn id=algorithm-for-ending-a-row-group>algorithm for ending a row group</dfn>, which is invoked
+ </ol>
+
+ <p>The <dfn id=algorithm-for-ending-a-row-group>algorithm for ending a row group</dfn>, which is invoked
by the set of steps above when starting and ending a block of rows,
is:</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>While <var title="">y<sub title="">current</sub></var> is less
than <var title="">y<sub title="">height</sub></var>, follow these
steps:</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>Run the <a href=#algorithm-for-growing-downward-growing-cells>algorithm for growing downward-growing
cells</a>.</p>
@@ -23726,8 +25344,10 @@
</li>
- </ol></li>
+ </ol>
+ </li>
+
<li>
<p>Empty the <var title="">list of downward-growing
@@ -23735,12 +25355,17 @@
</li>
- </ol><p>The <dfn id=algorithm-for-processing-rows>algorithm for processing rows</dfn>, which is invoked by
+ </ol>
+
+
+ <p>The <dfn id=algorithm-for-processing-rows>algorithm for processing rows</dfn>, which is invoked by
the set of steps above for processing <code><a href=#the-tr-element>tr</a></code> elements,
is:</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>If <var title="">y<sub title="">height</sub></var> is equal to
<var title="">y<sub title="">current</sub></var>, then increase
<var title="">y<sub title="">height</sub></var> by 1. (<var title="">y<sub title="">current</sub></var> is never
@@ -23827,7 +25452,7 @@
<li>
- <p>If <span><var title="">x<sub title="">width</sub></var> < <var title="">x<sub title="">current</sub></var>+<var title="">colspan</var></span>,
+ <p>If <span><var title="">x<sub title="">width</sub></var> < <var title="">x<sub title="">current</sub></var>+<var title="">colspan</var></span>,
then let <var title="">x<sub title="">width</sub></var> be
<span><var title="">x<sub title="">current</sub></var>+<var title="">colspan</var></span>.</p>
@@ -23835,7 +25460,7 @@
<li>
- <p>If <span><var title="">y<sub title="">height</sub></var> < <var title="">y<sub title="">current</sub></var>+<var title="">rowspan</var></span>,
+ <p>If <span><var title="">y<sub title="">height</sub></var> < <var title="">y<sub title="">current</sub></var>+<var title="">rowspan</var></span>,
then let <var title="">y<sub title="">height</sub></var> be
<span><var title="">y<sub title="">current</sub></var>+<var title="">rowspan</var></span>.</p>
@@ -23843,8 +25468,8 @@
<li>
- <p>Let the slots with coordinates (<var title="">x</var>, <var title="">y</var>) such that <span><var title="">x<sub title="">current</sub></var> ≤ <var title="">x</var> < <var title="">x<sub title="">current</sub></var>+<var title="">colspan</var></span>
- and <span><var title="">y<sub title="">current</sub></var> ≤ <var title="">y</var> < <var title="">y<sub title="">current</sub></var>+<var title="">rowspan</var></span> be
+ <p>Let the slots with coordinates (<var title="">x</var>, <var title="">y</var>) such that <span><var title="">x<sub title="">current</sub></var> ≤ <var title="">x</var> < <var title="">x<sub title="">current</sub></var>+<var title="">colspan</var></span>
+ and <span><var title="">y<sub title="">current</sub></var> ≤ <var title="">y</var> < <var title="">y<sub title="">current</sub></var>+<var title="">rowspan</var></span> be
covered by a new <a href=#concept-cell title=concept-cell>cell</a> <var title="">c</var>, anchored at (<var title="">x<sub title="">current</sub></var>, <var title="">y<sub title="">current</sub></var>), which has width <var title="">colspan</var> and height <var title="">rowspan</var>,
corresponding to the <var title="">current cell</var> element.</p>
@@ -23899,12 +25524,15 @@
</li>
- </ol><p>When the algorithms above require the user agent to run the
+ </ol>
+
+
+ <p>When the algorithms above require the user agent to run the
<dfn id=algorithm-for-growing-downward-growing-cells>algorithm for growing downward-growing cells</dfn>, the user
agent must, for each {<var title="">cell</var>, <var title="">cell<sub title="">x</sub></var>, <var title="">width</var>}
tuple in the <var title="">list of downward-growing cells</var>, if
any, extend the <a href=#concept-cell title=concept-cell>cell</a> <var title="">cell</var> so that it also covers the slots with
- coordinates (<var title="">x</var>, <var title="">y<sub title="">current</sub></var>), where <span><var title="">cell<sub title="">x</sub></var> ≤ <var title="">x</var> < <var title="">cell<sub title="">x</sub></var>+<var title="">width</var></span>.</p>
+ coordinates (<var title="">x</var>, <var title="">y<sub title="">current</sub></var>), where <span><var title="">cell<sub title="">x</sub></var> ≤ <var title="">x</var> < <var title="">cell<sub title="">x</sub></var>+<var title="">width</var></span>.</p>
@@ -23914,8 +25542,13 @@
<p>Each cell can be assigned zero or more header cells. The
<dfn id=algorithm-for-assigning-header-cells>algorithm for assigning header cells</dfn> to a cell <var title="">principal cell</var> is as follows.</p>
- <ol><!-- INITIALIZATION --><li>
+ <ol>
+
+ <!-- INITIALIZATION -->
+
+ <li>
+
<p>Let <var title="">header list</var> be an empty list of
cells.</p>
@@ -23931,14 +25564,18 @@
<li>
- <dl class=switch><dt>If the <var title="">principal cell</var> has a <code title=attr-tdth-headers><a href=#attr-tdth-headers>headers</a></code> attribute specified</dt>
+ <dl class=switch>
+ <dt>If the <var title="">principal cell</var> has a <code title=attr-tdth-headers><a href=#attr-tdth-headers>headers</a></code> attribute specified</dt>
+
<dd>
<!-- HEADERS="" -->
- <ol><li>
+ <ol>
+ <li>
+
<p>Take the value of the <var title="">principal cell</var>'s
<code title=attr-tdth-headers><a href=#attr-tdth-headers>headers</a></code> attribute and
<a href=#split-a-string-on-spaces title="split a string on spaces">split it on
@@ -23958,15 +25595,19 @@
</li>
- </ol></dd>
+ </ol>
+ </dd>
+
<dt>If <var title="">principal cell</var> does not have a <code title=attr-tdth-headers><a href=#attr-tdth-headers>headers</a></code> attribute specified</dt>
<dd>
- <ol><li>
+ <ol>
+ <li>
+
<p>Let <var title="">principal<sub title="">width</sub></var>
be the width of the <var title="">principal cell</var>.</p>
@@ -23989,8 +25630,8 @@
header cells</a>, with the <var title="">principal
cell</var>, the <var title="">header list</var>, the initial
coordinate (<var title="">principal<sub title="">x</sub></var>,<var title="">y</var>), and the
- increments <span>Δ<var title="">x</var>=−1</span>
- and <span>Δ<var title="">y</var>=0</span>.</p>
+ increments <span>Δ<var title="">x</var>=−1</span>
+ and <span>Δ<var title="">y</var>=0</span>.</p>
</li>
@@ -24003,7 +25644,7 @@
run the <a href=#internal-algorithm-for-scanning-and-assigning-header-cells>internal algorithm for scanning and assigning
header cells</a>, with the <var title="">principal
cell</var>, the <var title="">header list</var>, the initial
- coordinate (<var title="">x</var>,<var title="">principal<sub title="">y</sub></var>), and the increments <span>Δ<var title="">x</var>=0</span> and <span>Δ<var title="">y</var>=−1</span>.</p>
+ coordinate (<var title="">x</var>,<var title="">principal<sub title="">y</sub></var>), and the increments <span>Δ<var title="">x</var>=0</span> and <span>Δ<var title="">y</var>=−1</span>.</p>
</li>
@@ -24039,11 +25680,15 @@
</li>
- </ol></dd>
+ </ol>
- </dl></li>
+ </dd>
+ </dl>
+ </li>
+
+
<!-- CLEANUP -->
<li>
@@ -24067,12 +25712,16 @@
</li>
- </ol><p>The <dfn id=internal-algorithm-for-scanning-and-assigning-header-cells>internal algorithm for scanning and assigning header
- cells</dfn>, given a <var title="">principal cell</var>, a <var title="">header list</var>, an initial coordinate (<var title="">initial<sub title="">x</sub></var>, <var title="">initial<sub title="">y</sub></var>), and Δ<var title="">x</var> and Δ<var title="">y</var> increments, is as
+ </ol>
+
+ <p>The <dfn id=internal-algorithm-for-scanning-and-assigning-header-cells>internal algorithm for scanning and assigning header
+ cells</dfn>, given a <var title="">principal cell</var>, a <var title="">header list</var>, an initial coordinate (<var title="">initial<sub title="">x</sub></var>, <var title="">initial<sub title="">y</sub></var>), and Δ<var title="">x</var> and Δ<var title="">y</var> increments, is as
follows:</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>Let <var title="">x</var> equal <var title="">initial<sub title="">x</sub></var>.</p>
</li>
@@ -24092,8 +25741,10 @@
<li>
- <dl class=switch><dt>If <var title="">principal cell</var> is a header cell</dt>
+ <dl class=switch>
+ <dt>If <var title="">principal cell</var> is a header cell</dt>
+
<dd><p>Let <var title="">in header block</var> be true, and let
<var title="">headers from current header block</var> be a list
of cells containing just the <var title="">principal
@@ -24105,15 +25756,17 @@
<var title="">headers from current header block</var> be an
empty list of cells.</p>
- </dl></li>
+ </dl>
+ </li>
+
<li>
- <p><i>Loop</i>: Increment <var title="">x</var> by Δ<var title="">x</var>; increment <var title="">y</var> by Δ<var title="">y</var>.</p>
+ <p><i>Loop</i>: Increment <var title="">x</var> by Δ<var title="">x</var>; increment <var title="">y</var> by Δ<var title="">y</var>.</p>
<p class=note>For each invocation of this algorithm, one of
- Δ<var title="">x</var> and Δ<var title="">y</var> will
- be −1, and the other will be 0.</p>
+ Δ<var title="">x</var> and Δ<var title="">y</var> will
+ be −1, and the other will be 0.</p>
</li>
@@ -24142,11 +25795,15 @@
<li>
- <dl class=switch><dt>If <var title="">current cell</var> is a header cell</dt>
+ <dl class=switch>
+ <dt>If <var title="">current cell</var> is a header cell</dt>
+
<dd>
- <ol><li><p>Set <var title="">in header block</var> to
+ <ol>
+
+ <li><p>Set <var title="">in header block</var> to
true.</li>
<li><p>Add <var title="">current cell</var> to <var title="">headers from current header block</var>.</li>
@@ -24155,8 +25812,10 @@
<li>
- <dl class=switch><dt>If Δ<var title="">x</var> is 0</dt>
+ <dl class=switch>
+ <dt>If Δ<var title="">x</var> is 0</dt>
+
<dd>
<p>If there is no cell in the <var title="">opaque
@@ -24170,7 +25829,7 @@
</dd>
- <dt>If Δ<var title="">y</var> is 0</dt>
+ <dt>If Δ<var title="">y</var> is 0</dt>
<dd>
@@ -24183,14 +25842,18 @@
</dd>
- </dl></li>
+ </dl>
+ </li>
+
<li><p>If <var title="">blocked</var> is false, then add the
<var title="">current cell</var> to the <var title="">headers
list</var>.</li>
- </ol></dd>
+ </ol>
+ </dd>
+
<dt>If <var title="">current cell</var> is a data cell and <var title="">in header block</var> is true</dt>
<dd><p>Set <var title="">in header block</var> to false. Add
@@ -24199,19 +25862,25 @@
empty the <var title="">headers from current header block</var>
list.</p>
- </dl></li>
+ </dl>
+ </li>
+
<li>
<p>Return to the step marked <i>loop</i>.</p>
</li>
- </ol><p>A header cell anchored at the slot with coordinate (<var title="">x</var>, <var title="">y</var>) with width <var title="">width</var> and height <var title="">height</var> is said
+ </ol>
+
+ <p>A header cell anchored at the slot with coordinate (<var title="">x</var>, <var title="">y</var>) with width <var title="">width</var> and height <var title="">height</var> is said
to be a <dfn id=column-header>column header</dfn> if any of the following conditions
are true:</p>
- <ul><li>The cell's <code title=attr-th-scope><a href=#attr-th-scope>scope</a></code> attribute
+ <ul>
+
+ <li>The cell's <code title=attr-th-scope><a href=#attr-th-scope>scope</a></code> attribute
is in the <a href=#attr-th-scope-col title=attr-th-scope-col>column</a> state, or</li>
<li>The cell's <code title=attr-th-scope><a href=#attr-th-scope>scope</a></code> attribute
@@ -24220,11 +25889,15 @@
<var title="">y</var>-coordinates <var title="">y</var>
.. <span><var title="">y</var>+<var title="">height</var>-1</span>.</li>
- </ul><p>A header cell anchored at the slot with coordinate (<var title="">x</var>, <var title="">y</var>) with width <var title="">width</var> and height <var title="">height</var> is said
+ </ul>
+
+ <p>A header cell anchored at the slot with coordinate (<var title="">x</var>, <var title="">y</var>) with width <var title="">width</var> and height <var title="">height</var> is said
to be a <dfn id=row-header>row header</dfn> if any of the following conditions
are true:</p>
- <ul><li>The cell's <code title=attr-th-scope><a href=#attr-th-scope>scope</a></code> attribute
+ <ul>
+
+ <li>The cell's <code title=attr-th-scope><a href=#attr-th-scope>scope</a></code> attribute
is in the <a href=#attr-th-scope-row title=attr-th-scope-row>row</a> state, or</li>
<li>The cell's <code title=attr-th-scope><a href=#attr-th-scope>scope</a></code> attribute
@@ -24232,7 +25905,9 @@
cell is not a <a href=#column-header>column header</a>, and there are no data
cells in any of the cells covering slots with <var title="">x</var>-coordinates <var title="">x</var> .. <span><var title="">x</var>+<var title="">width</var>-1</span>.</li>
- </ul><p>A header cell is said to be a <dfn id=column-group-header>column group header</dfn> if
+ </ul>
+
+ <p>A header cell is said to be a <dfn id=column-group-header>column group header</dfn> if
its <code title=attr-th-scope><a href=#attr-th-scope>scope</a></code> attribute is in the
<a href=#attr-th-scope-colgroup title=attr-th-scope-colgroup>column group</a> state.</p>
@@ -24270,8 +25945,10 @@
<p>The <a href=#form-associated-element title="form-associated element">form-associated
elements</a> fall into several subcategories:</p>
- <dl><dt><dfn id=category-submit title=category-submit>Submittable elements</dfn></dt>
+ <dl>
+ <dt><dfn id=category-submit title=category-submit>Submittable elements</dfn></dt>
+
<dd>Denotes elements that can be used for <a href=#constructing-form-data-set>constructing the form data
set</a> when a <code><a href=#the-form-element>form</a></code> element is <a href=#concept-form-submit title=concept-form-submit>submitted</a>.</dd>
@@ -24290,7 +25967,9 @@
<dd>Denotes elements that can be associated with <code><a href=#the-label-element>label</a></code>
elements.</dd>
- </dl><p>In addition, some <a href=#category-submit title=category-submit>submittable
+ </dl>
+
+ <p>In addition, some <a href=#category-submit title=category-submit>submittable
elements</a> can be, depending on their attributes, <dfn id=concept-button title=concept-button>buttons</dfn>. The prose below defines when
an element is a button. Some buttons are specifically <dfn id=concept-submit-button title=concept-submit-button>submit buttons</dfn>.</p>
@@ -24302,7 +25981,8 @@
<h4 id=the-form-element><span class=secno>4.10.1 </span>The <dfn><code>form</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>Where <a href=#flow-content-0>flow content</a> is expected.</dd>
@@ -24344,7 +26024,9 @@
void <a href=#dom-form-dispatchformchange title=dom-form-dispatchFormChange>dispatchFormChange</a>();
};</pre>
</dd>
- </dl><p>The <code><a href=#the-form-element>form</a></code> element <a href=#represents>represents</a> a
+ </dl>
+
+ <p>The <code><a href=#the-form-element>form</a></code> element <a href=#represents>represents</a> a
collection of <a href=#form-associated-element title="form-associated element">form-associated
elements</a>, some of which can represent editable values that
can be submitted to a server for processing.</p>
@@ -24394,7 +26076,9 @@
for historical reasons, be excluded from this particular
collection.</p>
- <hr><p>The <dfn id=dom-form-length title=dom-form-length><code>length</code></dfn> DOM
+ <hr>
+
+ <p>The <dfn id=dom-form-length title=dom-form-length><code>length</code></dfn> DOM
attribute must return the number of nodes <a href=#represented-by-the-collection title="represented
by the collection">represented</a> by the <code title=dom-form-elements><a href=#dom-form-elements>elements</a></code> collection.</p>
@@ -24420,14 +26104,18 @@
<p>The <dfn id=dom-form-nameditem title=dom-form-namedItem><code>namedItem(<var title="">name</var>)</code></dfn> method, when called, must run the
following steps:</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>If <var title="">name</var> is one of the <span>names of the
supported named properties</span> of the object returned by the
<code title=dom-form-elements><a href=#dom-form-elements>elements</a></code> attribute, then
run these substeps:</p>
- <ol><li><p>Let <var title="">candidate</var> be the object returned
+ <ol>
+
+ <li><p>Let <var title="">candidate</var> be the object returned
by the <code title=dom-HTMLFormControlsCollection-namedItem><a href=#dom-htmlformcontrolscollection-nameditem>namedItem()</a></code>
method on the object returned by the <code title=dom-form-elements><a href=#dom-form-elements>elements</a></code> attribute when passed
the <var title="">name</var> argument.</li>
@@ -24440,13 +26128,17 @@
<li><p>Return <var title="">candidate</var> and abort these
steps.</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>Otherwise, <var title="">name</var> is the name of one of
the entries in the <code><a href=#the-form-element>form</a></code> element's <a href=#past-names-map>past names
map</a>: return the object associated with <var title="">name</var> in that map.</li>
- </ol><p>If an element listed in the <code><a href=#the-form-element>form</a></code> element's <a href=#past-names-map>past
+ </ol>
+
+ <p>If an element listed in the <code><a href=#the-form-element>form</a></code> element's <a href=#past-names-map>past
names map</a> is removed from the <code>Document</code>, then its
entries must be removed from the map.</p>
@@ -24472,7 +26164,9 @@
http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E...%3Cform%20action%3D%22%2F%22%3E%3Cinput%20name%3Da%20id%3Dfirst%3E%3Cinput%20name%3Da%20id%3Dsecond%3E%3C%2Fform%3E%0A%3Cscript%3E%0A%20w%28document.forms[0].a%29%3B%0A%20document.getElementsByTagName%28%27input%27%29[0].name%20%3D%20%27b%27%3B%0A%20document.getElementsByTagName%28%27input%27%29[1].name%20%3D%20%27b%27%3B%0A%20w%28document.forms[0].length%29%3B%0A%20w%28document.forms[0].a.id%29%3B%0A%3C%2Fscript%3E
-->
- <hr><p>The <dfn id=dom-form-submit title=dom-form-submit><code>submit()</code></dfn>
+ <hr>
+
+ <p>The <dfn id=dom-form-submit title=dom-form-submit><code>submit()</code></dfn>
method, when invoked, must <a href=#concept-form-submit title=concept-form-submit>submit</a> the <code><a href=#the-form-element>form</a></code>
element from the <code><a href=#the-form-element>form</a></code> element itself.</p>
@@ -24497,7 +26191,8 @@
<h4 id=the-fieldset-element><span class=secno>4.10.2 </span>The <dfn><code>fieldset</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#category-listed title=category-listed>Listed</a> <a href=#form-associated-element>form-associated element</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
@@ -24527,7 +26222,9 @@
void <a href=#dom-cva-setcustomvalidity title=dom-cva-setCustomValidity>setCustomValidity</a>(in DOMString error);
};</pre>
</dd>
- </dl><p>The <code><a href=#the-fieldset-element>fieldset</a></code> element <a href=#represents>represents</a> a set of form
+ </dl>
+
+ <p>The <code><a href=#the-fieldset-element>fieldset</a></code> element <a href=#represents>represents</a> a set of form
controls grouped under a common name.</p>
<p>The name of the group is given by the first <code><a href=#the-legend-element>legend</a></code>
@@ -24569,7 +26266,8 @@
<h4 id=the-label-element><span class=secno>4.10.3 </span>The <dfn><code>label</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dd><a href=#interactive-content-0>Interactive content</a>.</dd>
@@ -24590,7 +26288,9 @@
readonly attribute <a href=#htmlelement>HTMLElement</a> <a href=#dom-label-control title=dom-label-control>control</a>;
};</pre>
</dd>
- </dl><p>The <code><a href=#the-label-element>label</a></code> <a href=#represents>represents</a> a caption in a user
+ </dl>
+
+ <p>The <code><a href=#the-label-element>label</a></code> <a href=#represents>represents</a> a caption in a user
interface. The caption can be associated with a specific form
control, known as the <code><a href=#the-label-element>label</a></code> element's <dfn id=labeled-control>labeled
control</dfn>.</p>
@@ -24647,7 +26347,9 @@
attribute must return the <code><a href=#the-label-element>label</a></code> element's <a href=#labeled-control>labeled
control</a>, if any, or null if there isn't one.</p>
- <hr><p><a href=#category-label title=category-label>Labelable form-associated
+ <hr>
+
+ <p><a href=#category-label title=category-label>Labelable form-associated
elements</a> have a <code>NodeList</code> object associated with
them that represents the list of <code><a href=#the-label-element>label</a></code> elements, in
<a href=#tree-order>tree order</a>, whose <a href=#labeled-control>labeled control</a> is the
@@ -24659,7 +26361,8 @@
<h4 id=the-input-element><span class=secno>4.10.4 </span>The <dfn><code>input</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dd>If the <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is <em>not</em> in the <a href=#hidden-state title=attr-input-type-hidden>Hidden</a> state: <a href=#interactive-content-0>Interactive content</a>.</dd>
@@ -24750,110 +26453,142 @@
readonly attribute <span>NodeList</span> <a href=#dom-lfe-labels title=dom-lfe-labels>labels</a>;
};</pre>
</dd>
- </dl><!-- XXX add selectionStart and company --><p>The <code><a href=#the-input-element>input</a></code> element <a href=#represents>represents</a> a typed data field,
+ </dl>
+
+ <!-- XXX add selectionStart and company -->
+
+ <p>The <code><a href=#the-input-element>input</a></code> element <a href=#represents>represents</a> a typed data field,
usually with a form control to allow the user to edit the data.</p>
<p>The <dfn id=attr-input-type title=attr-input-type><code>type</code></dfn>
attribute controls the data type (and associated control) of the
element. It is an <a href=#enumerated-attribute>enumerated attribute</a>. The following
- table lists the keywords and states for the attribute — the
+ table lists the keywords and states for the attribute — the
keywords in the left column map to the states in the cell in the
second column on the same row as the keyword.</p>
- <table><thead><tr><th> Keyword
+ <table>
+ <thead>
+ <tr>
+ <th> Keyword
<th> State
<th> Data type
<th> Control type
- <tbody><tr><td> <dfn id=attr-input-type-hidden-keyword title=attr-input-type-hidden-keyword><code>hidden</code></dfn>
+ <tbody>
+ <tr>
+ <td> <dfn id=attr-input-type-hidden-keyword title=attr-input-type-hidden-keyword><code>hidden</code></dfn>
<td> <a href=#hidden-state title=attr-input-type-hidden>Hidden</a>
<td> An arbitrary string
<td> n/a
- <tr><td> <dfn id=attr-input-type-text-keyword title=attr-input-type-text-keyword><code>text</code></dfn>
+ <tr>
+ <td> <dfn id=attr-input-type-text-keyword title=attr-input-type-text-keyword><code>text</code></dfn>
<td> <a href=#text-state-and-search-state title=attr-input-type-text>Text</a>
<td> Text with no line breaks
<td> Text field
- <tr><td> <dfn id=attr-input-type-search-keyword title=attr-input-type-search-keyword><code>search</code></dfn>
+ <tr>
+ <td> <dfn id=attr-input-type-search-keyword title=attr-input-type-search-keyword><code>search</code></dfn>
<td> <a href=#text-state-and-search-state title=attr-input-type-search>Search</a>
<td> Text with no line breaks
<td> Search field
- <tr><td> <dfn id=attr-input-type-url-keyword title=attr-input-type-url-keyword><code>url</code></dfn>
+ <tr>
+ <td> <dfn id=attr-input-type-url-keyword title=attr-input-type-url-keyword><code>url</code></dfn>
<td> <a href=#url-state title=attr-input-type-url>URL</a>
<td> An absolute IRI
<td> A text field
- <tr><td> <dfn id=attr-input-type-email-keyword title=attr-input-type-email-keyword><code>email</code></dfn>
+ <tr>
+ <td> <dfn id=attr-input-type-email-keyword title=attr-input-type-email-keyword><code>email</code></dfn>
<td> <a href=#e-mail-state title=attr-input-type-email>E-mail</a>
<td> An e-mail address or list of e-mail addresses
<td> A text field
- <tr><td> <dfn id=attr-input-type-password-keyword title=attr-input-type-password-keyword><code>password</code></dfn>
+ <tr>
+ <td> <dfn id=attr-input-type-password-keyword title=attr-input-type-password-keyword><code>password</code></dfn>
<td> <a href=#password-state title=attr-input-type-password>Password</a>
<td> Text with no line breaks (sensitive information)
<td> Text field that obscures data entry
- <tr><td> <dfn id=attr-input-type-datetime-keyword title=attr-input-type-datetime-keyword><code>datetime</code></dfn>
+ <tr>
+ <td> <dfn id=attr-input-type-datetime-keyword title=attr-input-type-datetime-keyword><code>datetime</code></dfn>
<td> <a href=#date-and-time-state title=attr-input-type-datetime>Date and Time</a>
<td> A date and time (year, month, day, hour, minute, second, fraction of a second) with the time zone set to UTC
<td> A date and time control
- <tr><td> <dfn id=attr-input-type-date-keyword title=attr-input-type-date-keyword><code>date</code></dfn>
+ <tr>
+ <td> <dfn id=attr-input-type-date-keyword title=attr-input-type-date-keyword><code>date</code></dfn>
<td> <a href=#date-state title=attr-input-type-date>Date</a>
<td> A date (year, month, day) with no time zone
<td> A date control
- <tr><td> <dfn id=attr-input-type-month-keyword title=attr-input-type-month-keyword><code>month</code></dfn>
+ <tr>
+ <td> <dfn id=attr-input-type-month-keyword title=attr-input-type-month-keyword><code>month</code></dfn>
<td> <a href=#month-state title=attr-input-type-month>Month</a>
<td> A date consisting of a year and a month with no time zone
<td> A month control
- <tr><td> <dfn id=attr-input-type-week-keyword title=attr-input-type-week-keyword><code>week</code></dfn>
+ <tr>
+ <td> <dfn id=attr-input-type-week-keyword title=attr-input-type-week-keyword><code>week</code></dfn>
<td> <a href=#week-state title=attr-input-type-week>Week</a>
<td> A date consisting of a week-year number and a week number with no time zone
<td> A week control
- <tr><td> <dfn id=attr-input-type-time-keyword title=attr-input-type-time-keyword><code>time</code></dfn>
+ <tr>
+ <td> <dfn id=attr-input-type-time-keyword title=attr-input-type-time-keyword><code>time</code></dfn>
<td> <a href=#time-state title=attr-input-type-time>Time</a>
<td> A time (hour, minute, seconds, fractional seconds) with no time zone
<td> A time control
- <tr><td> <dfn id=attr-input-type-datetime-local-keyword title=attr-input-type-datetime-local-keyword><code>datetime-local</code></dfn>
+ <tr>
+ <td> <dfn id=attr-input-type-datetime-local-keyword title=attr-input-type-datetime-local-keyword><code>datetime-local</code></dfn>
<td> <a href=#local-date-and-time-state title=attr-input-type-datetime-local>Local Date and Time</a>
<td> A date and time (year, month, day, hour, minute, second, fraction of a second) with no time zone
<td> A date and time control
- <tr><td> <dfn id=attr-input-type-number-keyword title=attr-input-type-number-keyword><code>number</code></dfn>
+ <tr>
+ <td> <dfn id=attr-input-type-number-keyword title=attr-input-type-number-keyword><code>number</code></dfn>
<td> <a href=#number-state title=attr-input-type-number>Number</a>
<td> A numerical value
<td> A text field or spinner control
- <tr><td> <dfn id=attr-input-type-range-keyword title=attr-input-type-range-keyword><code>range</code></dfn>
+ <tr>
+ <td> <dfn id=attr-input-type-range-keyword title=attr-input-type-range-keyword><code>range</code></dfn>
<td> <a href=#range-state title=attr-input-type-range>Range</a>
<td> A numerical value, with the extra semantic that the exact value is not important
<td> A slider control or similar
- <tr><td> <dfn id=attr-input-type-color-keyword title=attr-input-type-color-keyword><code>color</code></dfn>
+ <tr>
+ <td> <dfn id=attr-input-type-color-keyword title=attr-input-type-color-keyword><code>color</code></dfn>
<td> <a href=#color-state title=attr-input-type-color>Color</a>
<td> An sRGB color with 8-bit red, green, and blue components
<td> A color well
- <tr><td> <dfn id=attr-input-type-checkbox-keyword title=attr-input-type-checkbox-keyword><code>checkbox</code></dfn>
+ <tr>
+ <td> <dfn id=attr-input-type-checkbox-keyword title=attr-input-type-checkbox-keyword><code>checkbox</code></dfn>
<td> <a href=#checkbox-state title=attr-input-type-checkbox>Checkbox</a>
<td> A set of zero or more values from a predefined list
<td> A checkbox
- <tr><td> <dfn id=attr-input-type-radio-keyword title=attr-input-type-radio-keyword><code>radio</code></dfn>
+ <tr>
+ <td> <dfn id=attr-input-type-radio-keyword title=attr-input-type-radio-keyword><code>radio</code></dfn>
<td> <a href=#radio-button-state title=attr-input-type-radio>Radio Button</a>
<td> An enumerated value
<td> A radio button
- <tr><td> <dfn id=attr-input-type-file-keyword title=attr-input-type-file-keyword><code>file</code></dfn>
+ <tr>
+ <td> <dfn id=attr-input-type-file-keyword title=attr-input-type-file-keyword><code>file</code></dfn>
<td> <a href=#file-upload-state title=attr-input-type-file>File Upload</a>
<td> Zero or more files each with a MIME type and optionally a file name
<td> A label and a button
- <tr><td> <dfn id=attr-input-type-submit-keyword title=attr-input-type-submit-keyword><code>submit</code></dfn>
+ <tr>
+ <td> <dfn id=attr-input-type-submit-keyword title=attr-input-type-submit-keyword><code>submit</code></dfn>
<td> <a href=#submit-button-state title=attr-input-type-submit>Submit Button</a>
<td> An enumerated value, with the extra semantic that it must be the last value selected and initiates form submission
<td> A button
- <tr><td> <dfn id=attr-input-type-image-keyword title=attr-input-type-image-keyword><code>image</code></dfn>
+ <tr>
+ <td> <dfn id=attr-input-type-image-keyword title=attr-input-type-image-keyword><code>image</code></dfn>
<td> <a href=#image-button-state title=attr-input-type-image>Image Button</a>
<td> A coordinate, relative to a particular image's size, with the extra semantic that it must be the last value selected and initiates form submission
<td> Either a clickable image, or a button
- <tr><td> <dfn id=attr-input-type-reset-keyword title=attr-input-type-reset-keyword><code>reset</code></dfn>
+ <tr>
+ <td> <dfn id=attr-input-type-reset-keyword title=attr-input-type-reset-keyword><code>reset</code></dfn>
<td> <a href=#reset-button-state title=attr-input-type-reset>Reset Button</a>
<td> n/a
<td> A button
- <tr><td> <dfn id=attr-input-type-button-keyword title=attr-input-type-button-keyword><code>button</code></dfn>
+ <tr>
+ <td> <dfn id=attr-input-type-button-keyword title=attr-input-type-button-keyword><code>button</code></dfn>
<td> <a href=#button-state title=attr-input-type-button>Button</a>
<td> n/a
<td> A button
- </table><p>The <i>missing value default</i> is the <a href=#text-state-and-search-state title=attr-input-type-text>Text</a> state.</p>
+ </table>
+ <p>The <i>missing value default</i> is the <a href=#text-state-and-search-state title=attr-input-type-text>Text</a> state.</p>
+
<p>Which of the <code title=attr-input-accept><a href=#attr-input-accept>accept</a></code>, <code title=attr-fs-action><a href=#attr-fs-action>action</a></code>, <code title=attr-input-alt><a href=#attr-input-alt>alt</a></code>, <code title=attr-input-autocomplete><a href=#attr-input-autocomplete>autocomplete</a></code>, <code title=attr-input-checked><a href=#attr-input-checked>checked</a></code>, <code title=attr-fs-enctype><a href=#attr-fs-enctype>enctype</a></code>, <code title=attr-dim-height><a href=#attr-dim-height>height</a></code>, <code title=attr-input-list><a href=#attr-input-list>list</a></code>, <code title=attr-input-max><a href=#attr-input-max>max</a></code>, <code title=attr-input-maxlength><a href=#attr-input-maxlength>maxlength</a></code>, <code title=attr-fs-method><a href=#attr-fs-method>method</a></code>, <code title=attr-input-min><a href=#attr-input-min>min</a></code>, <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code>, <code title=attr-fs-novalidate><a href=#attr-fs-novalidate>novalidate</a></code>, <code title=attr-input-pattern><a href=#attr-input-pattern>pattern</a></code>, <code title=attr-input-readonly><a href=#attr-input-readonly>readonly</a></code>, <code title=attr-input-required><a href=#attr-input-required>required</a></code>, <code title=attr-input-size><a href=#attr-input-size>size</a></code>, <code title=attr-input-src><a href=#attr-input-src>src</a></code>, <code title=attr-input-step><a href=#attr-input-step>step</a></code>, <code title=attr-fs-target><a href=#attr-fs-target>target</a></code>, and <code title=attr-dim-width><a href=#attr-dim-width>width</a></code> attributes apply to an
<code><a href=#the-input-element>input</a></code> element depends on the state of its <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute. Similarly, the <code title=dom-input-checked><a href=#dom-input-checked>checked</a></code>, <code title=dom-input-valueAsDate><a href=#dom-input-valueasdate>valueAsDate</a></code>, <code title=dom-input-valueAsNumber><a href=#dom-input-valueasnumber>valueAsNumber</a></code>, <code title=dom-input-list><a href=#dom-input-list>list</a></code>, and <code title=dom-input-selectedOption><a href=#dom-input-selectedoption>selectedOption</a></code> DOM
attributes, and the <code title=dom-input-stepUp><a href=#dom-input-stepup>stepUp()</a></code>
@@ -24862,7 +26597,10 @@
summarises which content attributes, DOM attrbutes, and methods
apply to each state:</p>
- <table class=applies><thead><tr><td>
+ <table class=applies>
+ <thead>
+ <tr>
+ <td>
<th> <span title=""><a href=#hidden-state title=attr-input-type-hidden>Hidden</a></span>
<th> <span title=""><a href=#text-state-and-search-state title=attr-input-type-text>Text</a>,</span>
<span title=""><a href=#text-state-and-search-state title=attr-input-type-search>Search</a>,</span>
@@ -24886,80 +26624,85 @@
<th> <span title=""><a href=#reset-button-state title=attr-input-type-reset>Reset Button</a>,</span>
<span title=""><a href=#button-state title=attr-input-type-button>Button</a></span>
- <tbody><tr><th> <code title=attr-input-accept><a href=#attr-input-accept>accept</a></code>
- <td class=no> · <!-- Hidden -->
- <td class=no> · <!-- Text -->
+ <tbody>
+ <tr>
+ <th> <code title=attr-input-accept><a href=#attr-input-accept>accept</a></code>
+ <td class=no> · <!-- Hidden -->
+ <td class=no> · <!-- Text -->
<!-- <td class="no"> · Search -->
<!-- <td class="no"> · URL -->
- <td class=no> · <!-- E-mail -->
- <td class=no> · <!-- Password -->
- <td class=no> · <!-- Date and Time -->
+ <td class=no> · <!-- E-mail -->
+ <td class=no> · <!-- Password -->
+ <td class=no> · <!-- Date and Time -->
<!-- <td class="no"> · Date -->
<!-- <td class="no"> · Month -->
<!-- <td class="no"> · Week -->
<!-- <td class="no"> · Time -->
- <td class=no> · <!-- Local Date and Time -->
+ <td class=no> · <!-- Local Date and Time -->
<!-- <td class="no"> · Number -->
- <td class=no> · <!-- Range -->
- <td class=no> · <!-- Color -->
- <td class=no> · <!-- Checkbox -->
+ <td class=no> · <!-- Range -->
+ <td class=no> · <!-- Color -->
+ <td class=no> · <!-- Checkbox -->
<!-- <td class="no"> · Radio Button -->
<td class=yes> Yes <!-- File Upload -->
- <td class=no> · <!-- Submit Button -->
- <td class=no> · <!-- Image Button -->
- <td class=no> · <!-- Reset Button -->
+ <td class=no> · <!-- Submit Button -->
+ <td class=no> · <!-- Image Button -->
+ <td class=no> · <!-- Reset Button -->
<!-- <td class="no"> · Button -->
- <tr><th> <code title=attr-fs-action><a href=#attr-fs-action>action</a></code>
- <td class=no> · <!-- Hidden -->
- <td class=no> · <!-- Text -->
+ <tr>
+ <th> <code title=attr-fs-action><a href=#attr-fs-action>action</a></code>
+ <td class=no> · <!-- Hidden -->
+ <td class=no> · <!-- Text -->
<!-- <td class="no"> · Search -->
<!-- <td class="no"> · URL -->
- <td class=no> · <!-- E-mail -->
- <td class=no> · <!-- Password -->
- <td class=no> · <!-- Date and Time -->
+ <td class=no> · <!-- E-mail -->
+ <td class=no> · <!-- Password -->
+ <td class=no> · <!-- Date and Time -->
<!-- <td class="no"> · Date -->
<!-- <td class="no"> · Month -->
<!-- <td class="no"> · Week -->
<!-- <td class="no"> · Time -->
- <td class=no> · <!-- Local Date and Time -->
+ <td class=no> · <!-- Local Date and Time -->
<!-- <td class="no"> · Number -->
- <td class=no> · <!-- Range -->
- <td class=no> · <!-- Color -->
- <td class=no> · <!-- Checkbox -->
+ <td class=no> · <!-- Range -->
+ <td class=no> · <!-- Color -->
+ <td class=no> · <!-- Checkbox -->
<!-- <td class="no"> · Radio Button -->
- <td class=no> · <!-- File Upload -->
+ <td class=no> · <!-- File Upload -->
<td class=yes> Yes <!-- Submit Button -->
<td class=yes> Yes <!-- Image Button -->
- <td class=no> · <!-- Reset Button -->
+ <td class=no> · <!-- Reset Button -->
<!-- <td class="no"> · Button -->
- <tr><th> <code title=attr-input-alt><a href=#attr-input-alt>alt</a></code>
- <td class=no> · <!-- Hidden -->
- <td class=no> · <!-- Text -->
+ <tr>
+ <th> <code title=attr-input-alt><a href=#attr-input-alt>alt</a></code>
+ <td class=no> · <!-- Hidden -->
+ <td class=no> · <!-- Text -->
<!-- <td class="no"> · Search -->
<!-- <td class="no"> · URL -->
- <td class=no> · <!-- E-mail -->
- <td class=no> · <!-- Password -->
- <td class=no> · <!-- Date and Time -->
+ <td class=no> · <!-- E-mail -->
+ <td class=no> · <!-- Password -->
+ <td class=no> · <!-- Date and Time -->
<!-- <td class="no"> · Date -->
<!-- <td class="no"> · Month -->
<!-- <td class="no"> · Week -->
<!-- <td class="no"> · Time -->
- <td class=no> · <!-- Local Date and Time -->
+ <td class=no> · <!-- Local Date and Time -->
<!-- <td class="no"> · Number -->
- <td class=no> · <!-- Range -->
- <td class=no> · <!-- Color -->
- <td class=no> · <!-- Checkbox -->
+ <td class=no> · <!-- Range -->
+ <td class=no> · <!-- Color -->
+ <td class=no> · <!-- Checkbox -->
<!-- <td class="no"> · Radio Button -->
- <td class=no> · <!-- File Upload -->
- <td class=no> · <!-- Submit Button -->
+ <td class=no> · <!-- File Upload -->
+ <td class=no> · <!-- Submit Button -->
<td class=yes> Yes <!-- Image Button -->
- <td class=no> · <!-- Reset Button -->
+ <td class=no> · <!-- Reset Button -->
<!-- <td class="no"> · Button -->
- <tr><th> <code title=attr-input-autocomplete><a href=#attr-input-autocomplete>autocomplete</a></code>
- <td class=no> · <!-- Hidden -->
+ <tr>
+ <th> <code title=attr-input-autocomplete><a href=#attr-input-autocomplete>autocomplete</a></code>
+ <td class=no> · <!-- Hidden -->
<td class=yes> Yes <!-- Text -->
<!-- <td class="yes"> Yes Search -->
<!-- <td class="yes"> Yes URL -->
@@ -24974,93 +26717,97 @@
<!-- <td class="yes"> Yes Number -->
<td class=yes> Yes <!-- Range -->
<td class=yes> Yes <!-- Color -->
- <td class=no> · <!-- Checkbox -->
+ <td class=no> · <!-- Checkbox -->
<!-- <td class="no"> · Radio Button -->
- <td class=no> · <!-- File Upload -->
- <td class=no> · <!-- Submit Button -->
- <td class=no> · <!-- Image Button -->
- <td class=no> · <!-- Reset Button -->
+ <td class=no> · <!-- File Upload -->
+ <td class=no> · <!-- Submit Button -->
+ <td class=no> · <!-- Image Button -->
+ <td class=no> · <!-- Reset Button -->
<!-- <td class="no"> · Button -->
- <tr><th> <code title=attr-input-checked><a href=#attr-input-checked>checked</a></code>
- <td class=no> · <!-- Hidden -->
- <td class=no> · <!-- Text -->
+ <tr>
+ <th> <code title=attr-input-checked><a href=#attr-input-checked>checked</a></code>
+ <td class=no> · <!-- Hidden -->
+ <td class=no> · <!-- Text -->
<!-- <td class="no"> · Search -->
<!-- <td class="no"> · URL -->
- <td class=no> · <!-- E-mail -->
- <td class=no> · <!-- Password -->
- <td class=no> · <!-- Date and Time -->
+ <td class=no> · <!-- E-mail -->
+ <td class=no> · <!-- Password -->
+ <td class=no> · <!-- Date and Time -->
<!-- <td class="no"> · Date -->
<!-- <td class="no"> · Month -->
<!-- <td class="no"> · Week -->
<!-- <td class="no"> · Time -->
- <td class=no> · <!-- Local Date and Time -->
+ <td class=no> · <!-- Local Date and Time -->
<!-- <td class="no"> · Number -->
- <td class=no> · <!-- Range -->
- <td class=no> · <!-- Color -->
+ <td class=no> · <!-- Range -->
+ <td class=no> · <!-- Color -->
<td class=yes> Yes <!-- Checkbox -->
<!-- <td class="yes"> Yes Radio Button -->
- <td class=no> · <!-- File Upload -->
- <td class=no> · <!-- Submit Button -->
- <td class=no> · <!-- Image Button -->
- <td class=no> · <!-- Reset Button -->
+ <td class=no> · <!-- File Upload -->
+ <td class=no> · <!-- Submit Button -->
+ <td class=no> · <!-- Image Button -->
+ <td class=no> · <!-- Reset Button -->
<!-- <td class="no"> · Button -->
- <tr><th> <code title=attr-fs-enctype><a href=#attr-fs-enctype>enctype</a></code>
- <td class=no> · <!-- Hidden -->
- <td class=no> · <!-- Text -->
+ <tr>
+ <th> <code title=attr-fs-enctype><a href=#attr-fs-enctype>enctype</a></code>
+ <td class=no> · <!-- Hidden -->
+ <td class=no> · <!-- Text -->
<!-- <td class="no"> · Search -->
<!-- <td class="no"> · URL -->
- <td class=no> · <!-- E-mail -->
- <td class=no> · <!-- Password -->
- <td class=no> · <!-- Date and Time -->
+ <td class=no> · <!-- E-mail -->
+ <td class=no> · <!-- Password -->
+ <td class=no> · <!-- Date and Time -->
<!-- <td class="no"> · Date -->
<!-- <td class="no"> · Month -->
<!-- <td class="no"> · Week -->
<!-- <td class="no"> · Time -->
- <td class=no> · <!-- Local Date and Time -->
+ <td class=no> · <!-- Local Date and Time -->
<!-- <td class="no"> · Number -->
- <td class=no> · <!-- Range -->
- <td class=no> · <!-- Color -->
- <td class=no> · <!-- Checkbox -->
+ <td class=no> · <!-- Range -->
+ <td class=no> · <!-- Color -->
+ <td class=no> · <!-- Checkbox -->
<!-- <td class="no"> · Radio Button -->
- <td class=no> · <!-- File Upload -->
+ <td class=no> · <!-- File Upload -->
<td class=yes> Yes <!-- Submit Button -->
<td class=yes> Yes <!-- Image Button -->
- <td class=no> · <!-- Reset Button -->
+ <td class=no> · <!-- Reset Button -->
<!-- <td class="no"> · Button -->
- <tr><th> <code title=attr-dim-height><a href=#attr-dim-height>height</a></code>
- <td class=no> · <!-- Hidden -->
- <td class=no> · <!-- Text -->
+ <tr>
+ <th> <code title=attr-dim-height><a href=#attr-dim-height>height</a></code>
+ <td class=no> · <!-- Hidden -->
+ <td class=no> · <!-- Text -->
<!-- <td class="no"> · Search -->
<!-- <td class="no"> · URL -->
- <td class=no> · <!-- E-mail -->
- <td class=no> · <!-- Password -->
- <td class=no> · <!-- Date and Time -->
+ <td class=no> · <!-- E-mail -->
+ <td class=no> · <!-- Password -->
+ <td class=no> · <!-- Date and Time -->
<!-- <td class="no"> · Date -->
<!-- <td class="no"> · Month -->
<!-- <td class="no"> · Week -->
<!-- <td class="no"> · Time -->
- <td class=no> · <!-- Local Date and Time -->
+ <td class=no> · <!-- Local Date and Time -->
<!-- <td class="no"> · Number -->
- <td class=no> · <!-- Range -->
- <td class=no> · <!-- Color -->
- <td class=no> · <!-- Checkbox -->
+ <td class=no> · <!-- Range -->
+ <td class=no> · <!-- Color -->
+ <td class=no> · <!-- Checkbox -->
<!-- <td class="no"> · Radio Button -->
- <td class=no> · <!-- File Upload -->
- <td class=no> · <!-- Submit Button -->
+ <td class=no> · <!-- File Upload -->
+ <td class=no> · <!-- Submit Button -->
<td class=yes> Yes <!-- Image Button -->
- <td class=no> · <!-- Reset Button -->
+ <td class=no> · <!-- Reset Button -->
<!-- <td class="no"> · Button -->
- <tr><th> <code title=attr-input-list><a href=#attr-input-list>list</a></code>
- <td class=no> · <!-- Hidden -->
+ <tr>
+ <th> <code title=attr-input-list><a href=#attr-input-list>list</a></code>
+ <td class=no> · <!-- Hidden -->
<td class=yes> Yes <!-- Text -->
<!-- <td class="yes"> Yes Search -->
<!-- <td class="yes"> Yes URL -->
<td class=yes> Yes <!-- E-mail -->
- <td class=no> · <!-- Password -->
+ <td class=no> · <!-- Password -->
<td class=yes> Yes <!-- Date and Time -->
<!-- <td class="yes"> Yes Date -->
<!-- <td class="yes"> Yes Month -->
@@ -25070,21 +26817,22 @@
<!-- <td class="yes"> Yes Number -->
<td class=yes> Yes <!-- Range -->
<td class=yes> Yes <!-- Color -->
- <td class=no> · <!-- Checkbox -->
+ <td class=no> · <!-- Checkbox -->
<!-- <td class="no"> · Radio Button -->
- <td class=no> · <!-- File Upload -->
- <td class=no> · <!-- Submit Button -->
- <td class=no> · <!-- Image Button -->
- <td class=no> · <!-- Reset Button -->
+ <td class=no> · <!-- File Upload -->
+ <td class=no> · <!-- Submit Button -->
+ <td class=no> · <!-- Image Button -->
+ <td class=no> · <!-- Reset Button -->
<!-- <td class="no"> · Button -->
- <tr><th> <code title=attr-input-max><a href=#attr-input-max>max</a></code>
- <td class=no> · <!-- Hidden -->
- <td class=no> · <!-- Text -->
+ <tr>
+ <th> <code title=attr-input-max><a href=#attr-input-max>max</a></code>
+ <td class=no> · <!-- Hidden -->
+ <td class=no> · <!-- Text -->
<!-- <td class="no"> · Search -->
<!-- <td class="no"> · URL -->
- <td class=no> · <!-- E-mail -->
- <td class=no> · <!-- Password -->
+ <td class=no> · <!-- E-mail -->
+ <td class=no> · <!-- Password -->
<td class=yes> Yes <!-- Date and Time -->
<!-- <td class="yes"> Yes Date -->
<!-- <td class="yes"> Yes Month -->
@@ -25093,70 +26841,73 @@
<td class=yes> Yes <!-- Local Date and Time -->
<!-- <td class="yes"> Yes Number -->
<td class=yes> Yes <!-- Range -->
- <td class=no> · <!-- Color -->
- <td class=no> · <!-- Checkbox -->
+ <td class=no> · <!-- Color -->
+ <td class=no> · <!-- Checkbox -->
<!-- <td class="no"> · Radio Button -->
- <td class=no> · <!-- File Upload -->
- <td class=no> · <!-- Submit Button -->
- <td class=no> · <!-- Image Button -->
- <td class=no> · <!-- Reset Button -->
+ <td class=no> · <!-- File Upload -->
+ <td class=no> · <!-- Submit Button -->
+ <td class=no> · <!-- Image Button -->
+ <td class=no> · <!-- Reset Button -->
<!-- <td class="no"> · Button -->
- <tr><th> <code title=attr-input-maxlength><a href=#attr-input-maxlength>maxlength</a></code>
- <td class=no> · <!-- Hidden -->
+ <tr>
+ <th> <code title=attr-input-maxlength><a href=#attr-input-maxlength>maxlength</a></code>
+ <td class=no> · <!-- Hidden -->
<td class=yes> Yes <!-- Text -->
<!-- <td class="yes"> Yes Search -->
<!-- <td class="yes"> Yes URL -->
<td class=yes> Yes <!-- E-mail -->
<td class=yes> Yes <!-- Password -->
- <td class=no> · <!-- Date and Time -->
+ <td class=no> · <!-- Date and Time -->
<!-- <td class="no"> · Date -->
<!-- <td class="no"> · Month -->
<!-- <td class="no"> · Week -->
<!-- <td class="no"> · Time -->
- <td class=no> · <!-- Local Date and Time -->
+ <td class=no> · <!-- Local Date and Time -->
<!-- <td class="no"> · Number -->
- <td class=no> · <!-- Range -->
- <td class=no> · <!-- Color -->
- <td class=no> · <!-- Checkbox -->
+ <td class=no> · <!-- Range -->
+ <td class=no> · <!-- Color -->
+ <td class=no> · <!-- Checkbox -->
<!-- <td class="no"> · Radio Button -->
- <td class=no> · <!-- File Upload -->
- <td class=no> · <!-- Submit Button -->
- <td class=no> · <!-- Image Button -->
- <td class=no> · <!-- Reset Button -->
+ <td class=no> · <!-- File Upload -->
+ <td class=no> · <!-- Submit Button -->
+ <td class=no> · <!-- Image Button -->
+ <td class=no> · <!-- Reset Button -->
<!-- <td class="no"> · Button -->
- <tr><th> <code title=attr-fs-method><a href=#attr-fs-method>method</a></code>
- <td class=no> · <!-- Hidden -->
- <td class=no> · <!-- Text -->
+ <tr>
+ <th> <code title=attr-fs-method><a href=#attr-fs-method>method</a></code>
+ <td class=no> · <!-- Hidden -->
+ <td class=no> · <!-- Text -->
<!-- <td class="no"> · Search -->
<!-- <td class="no"> · URL -->
- <td class=no> · <!-- E-mail -->
- <td class=no> · <!-- Password -->
- <td class=no> · <!-- Date and Time -->
+ <td class=no> · <!-- E-mail -->
+ <td class=no> · <!-- Password -->
+ <td class=no> · <!-- Date and Time -->
<!-- <td class="no"> · Date -->
<!-- <td class="no"> · Month -->
<!-- <td class="no"> · Week -->
<!-- <td class="no"> · Time -->
- <td class=no> · <!-- Local Date and Time -->
+ <td class=no> · <!-- Local Date and Time -->
<!-- <td class="no"> · Number -->
- <td class=no> · <!-- Range -->
- <td class=no> · <!-- Color -->
- <td class=no> · <!-- Checkbox -->
+ <td class=no> · <!-- Range -->
+ <td class=no> · <!-- Color -->
+ <td class=no> · <!-- Checkbox -->
<!-- <td class="no"> · Radio Button -->
- <td class=no> · <!-- File Upload -->
+ <td class=no> · <!-- File Upload -->
<td class=yes> Yes <!-- Submit Button -->
<td class=yes> Yes <!-- Image Button -->
- <td class=no> · <!-- Reset Button -->
+ <td class=no> · <!-- Reset Button -->
<!-- <td class="no"> · Button -->
- <tr><th> <code title=attr-input-min><a href=#attr-input-min>min</a></code>
- <td class=no> · <!-- Hidden -->
- <td class=no> · <!-- Text -->
+ <tr>
+ <th> <code title=attr-input-min><a href=#attr-input-min>min</a></code>
+ <td class=no> · <!-- Hidden -->
+ <td class=no> · <!-- Text -->
<!-- <td class="no"> · Search -->
<!-- <td class="no"> · URL -->
- <td class=no> · <!-- E-mail -->
- <td class=no> · <!-- Password -->
+ <td class=no> · <!-- E-mail -->
+ <td class=no> · <!-- Password -->
<td class=yes> Yes <!-- Date and Time -->
<!-- <td class="yes"> Yes Date -->
<!-- <td class="yes"> Yes Month -->
@@ -25165,113 +26916,118 @@
<td class=yes> Yes <!-- Local Date and Time -->
<!-- <td class="yes"> Yes Number -->
<td class=yes> Yes <!-- Range -->
- <td class=no> · <!-- Color -->
- <td class=no> · <!-- Checkbox -->
+ <td class=no> · <!-- Color -->
+ <td class=no> · <!-- Checkbox -->
<!-- <td class="no"> · Radio Button -->
- <td class=no> · <!-- File Upload -->
- <td class=no> · <!-- Submit Button -->
- <td class=no> · <!-- Image Button -->
- <td class=no> · <!-- Reset Button -->
+ <td class=no> · <!-- File Upload -->
+ <td class=no> · <!-- Submit Button -->
+ <td class=no> · <!-- Image Button -->
+ <td class=no> · <!-- Reset Button -->
<!-- <td class="no"> · Button -->
- <tr><th> <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code>
- <td class=no> · <!-- Hidden -->
- <td class=no> · <!-- Text -->
+ <tr>
+ <th> <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code>
+ <td class=no> · <!-- Hidden -->
+ <td class=no> · <!-- Text -->
<!-- <td class="no"> · Search -->
<!-- <td class="no"> · URL -->
<td class=yes> Yes <!-- E-mail -->
- <td class=no> · <!-- Password -->
- <td class=no> · <!-- Date and Time -->
+ <td class=no> · <!-- Password -->
+ <td class=no> · <!-- Date and Time -->
<!-- <td class="no"> · Date -->
<!-- <td class="no"> · Month -->
<!-- <td class="no"> · Week -->
<!-- <td class="no"> · Time -->
- <td class=no> · <!-- Local Date and Time -->
+ <td class=no> · <!-- Local Date and Time -->
<!-- <td class="no"> · Number -->
- <td class=no> · <!-- Range -->
- <td class=no> · <!-- Color -->
- <td class=no> · <!-- Checkbox -->
+ <td class=no> · <!-- Range -->
+ <td class=no> · <!-- Color -->
+ <td class=no> · <!-- Checkbox -->
<!-- <td class="no"> · Radio Button -->
<td class=yes> Yes <!-- File Upload -->
- <td class=no> · <!-- Submit Button -->
- <td class=no> · <!-- Image Button -->
- <td class=no> · <!-- Reset Button -->
+ <td class=no> · <!-- Submit Button -->
+ <td class=no> · <!-- Image Button -->
+ <td class=no> · <!-- Reset Button -->
<!-- <td class="no"> · Button -->
- <tr><th> <code title=attr-fs-novalidate><a href=#attr-fs-novalidate>novalidate</a></code>
- <td class=no> · <!-- Hidden -->
- <td class=no> · <!-- Text -->
+ <tr>
+ <th> <code title=attr-fs-novalidate><a href=#attr-fs-novalidate>novalidate</a></code>
+ <td class=no> · <!-- Hidden -->
+ <td class=no> · <!-- Text -->
<!-- <td class="no"> · Search -->
<!-- <td class="no"> · URL -->
- <td class=no> · <!-- E-mail -->
- <td class=no> · <!-- Password -->
- <td class=no> · <!-- Date and Time -->
+ <td class=no> · <!-- E-mail -->
+ <td class=no> · <!-- Password -->
+ <td class=no> · <!-- Date and Time -->
<!-- <td class="no"> · Date -->
<!-- <td class="no"> · Month -->
<!-- <td class="no"> · Week -->
<!-- <td class="no"> · Time -->
- <td class=no> · <!-- Local Date and Time -->
+ <td class=no> · <!-- Local Date and Time -->
<!-- <td class="no"> · Number -->
- <td class=no> · <!-- Range -->
- <td class=no> · <!-- Color -->
- <td class=no> · <!-- Checkbox -->
+ <td class=no> · <!-- Range -->
+ <td class=no> · <!-- Color -->
+ <td class=no> · <!-- Checkbox -->
<!-- <td class="no"> · Radio Button -->
- <td class=no> · <!-- File Upload -->
+ <td class=no> · <!-- File Upload -->
<td class=yes> Yes <!-- Submit Button -->
<td class=yes> Yes <!-- Image Button -->
- <td class=no> · <!-- Reset Button -->
+ <td class=no> · <!-- Reset Button -->
<!-- <td class="no"> · Button -->
- <tr><th> <code title=attr-input-pattern><a href=#attr-input-pattern>pattern</a></code>
- <td class=no> · <!-- Hidden -->
+ <tr>
+ <th> <code title=attr-input-pattern><a href=#attr-input-pattern>pattern</a></code>
+ <td class=no> · <!-- Hidden -->
<td class=yes> Yes <!-- Text -->
<!-- <td class="yes"> Yes Search -->
<!-- <td class="yes"> Yes URL -->
<td class=yes> Yes <!-- E-mail -->
<td class=yes> Yes <!-- Password -->
- <td class=no> · <!-- Date and Time -->
+ <td class=no> · <!-- Date and Time -->
<!-- <td class="no"> · Date -->
<!-- <td class="no"> · Month -->
<!-- <td class="no"> · Week -->
<!-- <td class="no"> · Time -->
- <td class=no> · <!-- Local Date and Time -->
+ <td class=no> · <!-- Local Date and Time -->
<!-- <td class="no"> · Number -->
- <td class=no> · <!-- Range -->
- <td class=no> · <!-- Color -->
- <td class=no> · <!-- Checkbox -->
+ <td class=no> · <!-- Range -->
+ <td class=no> · <!-- Color -->
+ <td class=no> · <!-- Checkbox -->
<!-- <td class="no"> · Radio Button -->
- <td class=no> · <!-- File Upload -->
- <td class=no> · <!-- Submit Button -->
- <td class=no> · <!-- Image Button -->
- <td class=no> · <!-- Reset Button -->
+ <td class=no> · <!-- File Upload -->
+ <td class=no> · <!-- Submit Button -->
+ <td class=no> · <!-- Image Button -->
+ <td class=no> · <!-- Reset Button -->
<!-- <td class="no"> · Button -->
- <tr><th> <code title=attr-input-placeholder><a href=#attr-input-placeholder>placeholder</a></code>
- <td class=no> · <!-- Hidden -->
+ <tr>
+ <th> <code title=attr-input-placeholder><a href=#attr-input-placeholder>placeholder</a></code>
+ <td class=no> · <!-- Hidden -->
<td class=yes> Yes <!-- Text -->
<!-- <td class="yes"> Yes Search -->
<!-- <td class="yes"> Yes URL -->
<td class=yes> Yes <!-- E-mail -->
<td class=yes> Yes <!-- Password -->
- <td class=no> · <!-- Date and Time -->
+ <td class=no> · <!-- Date and Time -->
<!-- <td class="no"> · Date -->
<!-- <td class="no"> · Month -->
<!-- <td class="no"> · Week -->
<!-- <td class="no"> · Time -->
- <td class=no> · <!-- Local Date and Time -->
+ <td class=no> · <!-- Local Date and Time -->
<!-- <td class="no"> · Number -->
- <td class=no> · <!-- Range -->
- <td class=no> · <!-- Color -->
- <td class=no> · <!-- Checkbox -->
+ <td class=no> · <!-- Range -->
+ <td class=no> · <!-- Color -->
+ <td class=no> · <!-- Checkbox -->
<!-- <td class="no"> · Radio Button -->
- <td class=no> · <!-- File Upload -->
- <td class=no> · <!-- Submit Button -->
- <td class=no> · <!-- Image Button -->
- <td class=no> · <!-- Reset Button -->
+ <td class=no> · <!-- File Upload -->
+ <td class=no> · <!-- Submit Button -->
+ <td class=no> · <!-- Image Button -->
+ <td class=no> · <!-- Reset Button -->
<!-- <td class="no"> · Button -->
- <tr><th> <code title=attr-input-readonly><a href=#attr-input-readonly>readonly</a></code>
- <td class=no> · <!-- Hidden -->
+ <tr>
+ <th> <code title=attr-input-readonly><a href=#attr-input-readonly>readonly</a></code>
+ <td class=no> · <!-- Hidden -->
<td class=yes> Yes <!-- Text -->
<!-- <td class="yes"> Yes Search -->
<!-- <td class="yes"> Yes URL -->
@@ -25284,18 +27040,19 @@
<!-- <td class="yes"> Yes Time -->
<td class=yes> Yes <!-- Local Date and Time -->
<!-- <td class="yes"> Yes Number -->
- <td class=no> · <!-- Range -->
- <td class=no> · <!-- Color -->
- <td class=no> · <!-- Checkbox -->
+ <td class=no> · <!-- Range -->
+ <td class=no> · <!-- Color -->
+ <td class=no> · <!-- Checkbox -->
<!-- <td class="no"> · Radio Button -->
- <td class=no> · <!-- File Upload -->
- <td class=no> · <!-- Submit Button -->
- <td class=no> · <!-- Image Button -->
- <td class=no> · <!-- Reset Button -->
+ <td class=no> · <!-- File Upload -->
+ <td class=no> · <!-- Submit Button -->
+ <td class=no> · <!-- Image Button -->
+ <td class=no> · <!-- Reset Button -->
<!-- <td class="no"> · Button -->
- <tr><th> <code title=attr-input-required><a href=#attr-input-required>required</a></code>
- <td class=no> · <!-- Hidden -->
+ <tr>
+ <th> <code title=attr-input-required><a href=#attr-input-required>required</a></code>
+ <td class=no> · <!-- Hidden -->
<td class=yes> Yes <!-- Text -->
<!-- <td class="yes"> Yes Search -->
<!-- <td class="yes"> Yes URL -->
@@ -25308,71 +27065,74 @@
<!-- <td class="yes"> Yes Time -->
<td class=yes> Yes <!-- Local Date and Time -->
<!-- <td class="yes"> Yes Number -->
- <td class=no> · <!-- Range -->
- <td class=no> · <!-- Color -->
+ <td class=no> · <!-- Range -->
+ <td class=no> · <!-- Color -->
<td class=yes> Yes <!-- Checkbox -->
<!-- <td class="yes"> Yes Radio Button -->
<td class=yes> Yes <!-- File Upload -->
- <td class=no> · <!-- Submit Button -->
- <td class=no> · <!-- Image Button -->
- <td class=no> · <!-- Reset Button -->
+ <td class=no> · <!-- Submit Button -->
+ <td class=no> · <!-- Image Button -->
+ <td class=no> · <!-- Reset Button -->
<!-- <td class="no"> · Button -->
- <tr><th> <code title=attr-input-size><a href=#attr-input-size>size</a></code>
- <td class=no> · <!-- Hidden -->
+ <tr>
+ <th> <code title=attr-input-size><a href=#attr-input-size>size</a></code>
+ <td class=no> · <!-- Hidden -->
<td class=yes> Yes <!-- Text -->
<!-- <td class="yes"> Yes Search -->
<!-- <td class="yes"> Yes URL -->
<td class=yes> Yes <!-- E-mail -->
<td class=yes> Yes <!-- Password -->
- <td class=no> · <!-- Date and Time -->
+ <td class=no> · <!-- Date and Time -->
<!-- <td class="no"> · Date -->
<!-- <td class="no"> · Month -->
<!-- <td class="no"> · Week -->
<!-- <td class="no"> · Time -->
- <td class=no> · <!-- Local Date and Time -->
+ <td class=no> · <!-- Local Date and Time -->
<!-- <td class="no"> · Number -->
- <td class=no> · <!-- Range -->
- <td class=no> · <!-- Color -->
- <td class=no> · <!-- Checkbox -->
+ <td class=no> · <!-- Range -->
+ <td class=no> · <!-- Color -->
+ <td class=no> · <!-- Checkbox -->
<!-- <td class="no"> · Radio Button -->
- <td class=no> · <!-- File Upload -->
- <td class=no> · <!-- Submit Button -->
- <td class=no> · <!-- Image Button -->
- <td class=no> · <!-- Reset Button -->
+ <td class=no> · <!-- File Upload -->
+ <td class=no> · <!-- Submit Button -->
+ <td class=no> · <!-- Image Button -->
+ <td class=no> · <!-- Reset Button -->
<!-- <td class="no"> · Button -->
- <tr><th> <code title=attr-input-src><a href=#attr-input-src>src</a></code>
- <td class=no> · <!-- Hidden -->
- <td class=no> · <!-- Text -->
+ <tr>
+ <th> <code title=attr-input-src><a href=#attr-input-src>src</a></code>
+ <td class=no> · <!-- Hidden -->
+ <td class=no> · <!-- Text -->
<!-- <td class="no"> · Search -->
<!-- <td class="no"> · URL -->
- <td class=no> · <!-- E-mail -->
- <td class=no> · <!-- Password -->
- <td class=no> · <!-- Date and Time -->
+ <td class=no> · <!-- E-mail -->
+ <td class=no> · <!-- Password -->
+ <td class=no> · <!-- Date and Time -->
<!-- <td class="no"> · Date -->
<!-- <td class="no"> · Month -->
<!-- <td class="no"> · Week -->
<!-- <td class="no"> · Time -->
- <td class=no> · <!-- Local Date and Time -->
+ <td class=no> · <!-- Local Date and Time -->
<!-- <td class="no"> · Number -->
- <td class=no> · <!-- Range -->
- <td class=no> · <!-- Color -->
- <td class=no> · <!-- Checkbox -->
+ <td class=no> · <!-- Range -->
+ <td class=no> · <!-- Color -->
+ <td class=no> · <!-- Checkbox -->
<!-- <td class="no"> · Radio Button -->
- <td class=no> · <!-- File Upload -->
- <td class=no> · <!-- Submit Button -->
+ <td class=no> · <!-- File Upload -->
+ <td class=no> · <!-- Submit Button -->
<td class=yes> Yes <!-- Image Button -->
- <td class=no> · <!-- Reset Button -->
+ <td class=no> · <!-- Reset Button -->
<!-- <td class="no"> · Button -->
- <tr><th> <code title=attr-input-step><a href=#attr-input-step>step</a></code>
- <td class=no> · <!-- Hidden -->
- <td class=no> · <!-- Text -->
+ <tr>
+ <th> <code title=attr-input-step><a href=#attr-input-step>step</a></code>
+ <td class=no> · <!-- Hidden -->
+ <td class=no> · <!-- Text -->
<!-- <td class="no"> · Search -->
<!-- <td class="no"> · URL -->
- <td class=no> · <!-- E-mail -->
- <td class=no> · <!-- Password -->
+ <td class=no> · <!-- E-mail -->
+ <td class=no> · <!-- Password -->
<td class=yes> Yes <!-- Date and Time -->
<!-- <td class="yes"> Yes Date -->
<!-- <td class="yes"> Yes Month -->
@@ -25381,88 +27141,92 @@
<td class=yes> Yes <!-- Local Date and Time -->
<!-- <td class="yes"> Yes Number -->
<td class=yes> Yes <!-- Range -->
- <td class=no> · <!-- Color -->
- <td class=no> · <!-- Checkbox -->
+ <td class=no> · <!-- Color -->
+ <td class=no> · <!-- Checkbox -->
<!-- <td class="no"> · Radio Button -->
- <td class=no> · <!-- File Upload -->
- <td class=no> · <!-- Submit Button -->
- <td class=no> · <!-- Image Button -->
- <td class=no> · <!-- Reset Button -->
+ <td class=no> · <!-- File Upload -->
+ <td class=no> · <!-- Submit Button -->
+ <td class=no> · <!-- Image Button -->
+ <td class=no> · <!-- Reset Button -->
<!-- <td class="no"> · Button -->
- <tr><th> <code title=attr-fs-target><a href=#attr-fs-target>target</a></code>
- <td class=no> · <!-- Hidden -->
- <td class=no> · <!-- Text -->
+ <tr>
+ <th> <code title=attr-fs-target><a href=#attr-fs-target>target</a></code>
+ <td class=no> · <!-- Hidden -->
+ <td class=no> · <!-- Text -->
<!-- <td class="no"> · Search -->
<!-- <td class="no"> · URL -->
- <td class=no> · <!-- E-mail -->
- <td class=no> · <!-- Password -->
- <td class=no> · <!-- Date and Time -->
+ <td class=no> · <!-- E-mail -->
+ <td class=no> · <!-- Password -->
+ <td class=no> · <!-- Date and Time -->
<!-- <td class="no"> · Date -->
<!-- <td class="no"> · Month -->
<!-- <td class="no"> · Week -->
<!-- <td class="no"> · Time -->
- <td class=no> · <!-- Local Date and Time -->
+ <td class=no> · <!-- Local Date and Time -->
<!-- <td class="no"> · Number -->
- <td class=no> · <!-- Range -->
- <td class=no> · <!-- Color -->
- <td class=no> · <!-- Checkbox -->
+ <td class=no> · <!-- Range -->
+ <td class=no> · <!-- Color -->
+ <td class=no> · <!-- Checkbox -->
<!-- <td class="no"> · Radio Button -->
- <td class=no> · <!-- File Upload -->
+ <td class=no> · <!-- File Upload -->
<td class=yes> Yes <!-- Submit Button -->
<td class=yes> Yes <!-- Image Button -->
- <td class=no> · <!-- Reset Button -->
+ <td class=no> · <!-- Reset Button -->
<!-- <td class="no"> · Button -->
- <tr><th> <code title=attr-dim-width><a href=#attr-dim-width>width</a></code>
- <td class=no> · <!-- Hidden -->
- <td class=no> · <!-- Text -->
+ <tr>
+ <th> <code title=attr-dim-width><a href=#attr-dim-width>width</a></code>
+ <td class=no> · <!-- Hidden -->
+ <td class=no> · <!-- Text -->
<!-- <td class="no"> · Search -->
<!-- <td class="no"> · URL -->
- <td class=no> · <!-- E-mail -->
- <td class=no> · <!-- Password -->
- <td class=no> · <!-- Date and Time -->
+ <td class=no> · <!-- E-mail -->
+ <td class=no> · <!-- Password -->
+ <td class=no> · <!-- Date and Time -->
<!-- <td class="no"> · Date -->
<!-- <td class="no"> · Month -->
<!-- <td class="no"> · Week -->
<!-- <td class="no"> · Time -->
- <td class=no> · <!-- Local Date and Time -->
+ <td class=no> · <!-- Local Date and Time -->
<!-- <td class="no"> · Number -->
- <td class=no> · <!-- Range -->
- <td class=no> · <!-- Color -->
- <td class=no> · <!-- Checkbox -->
+ <td class=no> · <!-- Range -->
+ <td class=no> · <!-- Color -->
+ <td class=no> · <!-- Checkbox -->
<!-- <td class="no"> · Radio Button -->
- <td class=no> · <!-- File Upload -->
- <td class=no> · <!-- Submit Button -->
+ <td class=no> · <!-- File Upload -->
+ <td class=no> · <!-- Submit Button -->
<td class=yes> Yes <!-- Image Button -->
- <td class=no> · <!-- Reset Button -->
+ <td class=no> · <!-- Reset Button -->
<!-- <td class="no"> · Button -->
- <tr><th> <code title=dom-input-checked><a href=#dom-input-checked>checked</a></code>
- <td class=no> · <!-- Hidden -->
- <td class=no> · <!-- Text -->
+ <tr>
+ <th> <code title=dom-input-checked><a href=#dom-input-checked>checked</a></code>
+ <td class=no> · <!-- Hidden -->
+ <td class=no> · <!-- Text -->
<!-- <td class="no"> · Search -->
<!-- <td class="no"> · URL -->
- <td class=no> · <!-- E-mail -->
- <td class=no> · <!-- Password -->
- <td class=no> · <!-- Date and Time -->
+ <td class=no> · <!-- E-mail -->
+ <td class=no> · <!-- Password -->
+ <td class=no> · <!-- Date and Time -->
<!-- <td class="no"> · Date -->
<!-- <td class="no"> · Month -->
<!-- <td class="no"> · Week -->
<!-- <td class="no"> · Time -->
- <td class=no> · <!-- Local Date and Time -->
+ <td class=no> · <!-- Local Date and Time -->
<!-- <td class="no"> · Number -->
- <td class=no> · <!-- Range -->
- <td class=no> · <!-- Color -->
+ <td class=no> · <!-- Range -->
+ <td class=no> · <!-- Color -->
<td class=yes> Yes <!-- Checkbox -->
<!-- <td class="yes"> Yes Radio Button -->
- <td class=no> · <!-- File Upload -->
- <td class=no> · <!-- Submit Button -->
- <td class=no> · <!-- Image Button -->
- <td class=no> · <!-- Reset Button -->
+ <td class=no> · <!-- File Upload -->
+ <td class=no> · <!-- Submit Button -->
+ <td class=no> · <!-- Image Button -->
+ <td class=no> · <!-- Reset Button -->
<!-- <td class="no"> · Button -->
- <tr><th> <code title=dom-input-value><a href=#dom-input-value>value</a></code>
+ <tr>
+ <th> <code title=dom-input-value><a href=#dom-input-value>value</a></code>
<td class=yes> <a href=#dom-input-value-value title=dom-input-value-value>value</a> <!-- Hidden -->
<td class=yes> <a href=#dom-input-value-value title=dom-input-value-value>value</a> <!-- Text -->
<!-- <td class="yes"> <span title="dom-input-value-value">value</span> Search -->
@@ -25480,43 +27244,45 @@
<td class=yes> <a href=#dom-input-value-value title=dom-input-value-value>value</a> <!-- Color -->
<td class=yes> <a href=#dom-input-value-default-on title=dom-input-value-default-on>default/on</a> <!-- Checkbox -->
<!-- <td class="yes"> <span title="dom-input-value-default-on">default/on</span> Radio Button -->
- <td class=no> · <!-- File Upload -->
+ <td class=no> · <!-- File Upload -->
<td class=yes> <a href=#dom-input-value-default title=dom-input-value-default>default</a> <!-- Submit Button -->
<td class=yes> <a href=#dom-input-value-default title=dom-input-value-default>default</a> <!-- Image Button -->
<td class=yes> <a href=#dom-input-value-default title=dom-input-value-default>default</a> <!-- Reset Button -->
<!-- <td class="yes"> <span title="dom-input-value-default">default</span> Button -->
- <tr><th> <code title=dom-input-valueAsDate><a href=#dom-input-valueasdate>valueAsDate</a></code>
- <td class=no> · <!-- Hidden -->
- <td class=no> · <!-- Text -->
+ <tr>
+ <th> <code title=dom-input-valueAsDate><a href=#dom-input-valueasdate>valueAsDate</a></code>
+ <td class=no> · <!-- Hidden -->
+ <td class=no> · <!-- Text -->
<!-- <td class="no"> · Search -->
<!-- <td class="no"> · URL -->
- <td class=no> · <!-- E-mail -->
- <td class=no> · <!-- Password -->
+ <td class=no> · <!-- E-mail -->
+ <td class=no> · <!-- Password -->
<td class=yes> Yes <!-- Date and Time -->
<!-- <td class="yes"> Yes Date -->
<!-- <td class="yes"> Yes Month -->
<!-- <td class="yes"> Yes Week -->
<!-- <td class="yes"> Yes Time -->
- <td class=no> · <!-- Local Date and Time -->
+ <td class=no> · <!-- Local Date and Time -->
<!-- <td class="no"> · Number -->
- <td class=no> · <!-- Range -->
- <td class=no> · <!-- Color -->
- <td class=no> · <!-- Checkbox -->
+ <td class=no> · <!-- Range -->
+ <td class=no> · <!-- Color -->
+ <td class=no> · <!-- Checkbox -->
<!-- <td class="no"> · Radio Button -->
- <td class=no> · <!-- File Upload -->
- <td class=no> · <!-- Submit Button -->
- <td class=no> · <!-- Image Button -->
- <td class=no> · <!-- Reset Button -->
+ <td class=no> · <!-- File Upload -->
+ <td class=no> · <!-- Submit Button -->
+ <td class=no> · <!-- Image Button -->
+ <td class=no> · <!-- Reset Button -->
<!-- <td class="no"> · Button -->
- <tr><th> <code title=dom-input-valueAsNumber><a href=#dom-input-valueasnumber>valueAsNumber</a></code>
- <td class=no> · <!-- Hidden -->
- <td class=no> · <!-- Text -->
+ <tr>
+ <th> <code title=dom-input-valueAsNumber><a href=#dom-input-valueasnumber>valueAsNumber</a></code>
+ <td class=no> · <!-- Hidden -->
+ <td class=no> · <!-- Text -->
<!-- <td class="no"> · Search -->
<!-- <td class="no"> · URL -->
- <td class=no> · <!-- E-mail -->
- <td class=no> · <!-- Password -->
+ <td class=no> · <!-- E-mail -->
+ <td class=no> · <!-- Password -->
<td class=yes> Yes <!-- Date and Time -->
<!-- <td class="yes"> Yes Date -->
<!-- <td class="yes"> Yes Month -->
@@ -25525,22 +27291,23 @@
<td class=yes> Yes <!-- Local Date and Time -->
<!-- <td class="yes"> Yes Number -->
<td class=yes> Yes <!-- Range -->
- <td class=no> · <!-- Color -->
- <td class=no> · <!-- Checkbox -->
+ <td class=no> · <!-- Color -->
+ <td class=no> · <!-- Checkbox -->
<!-- <td class="no"> · Radio Button -->
- <td class=no> · <!-- File Upload -->
- <td class=no> · <!-- Submit Button -->
- <td class=no> · <!-- Image Button -->
- <td class=no> · <!-- Reset Button -->
+ <td class=no> · <!-- File Upload -->
+ <td class=no> · <!-- Submit Button -->
+ <td class=no> · <!-- Image Button -->
+ <td class=no> · <!-- Reset Button -->
<!-- <td class="no"> · Button -->
- <tr><th> <code title=dom-input-list><a href=#dom-input-list>list</a></code>
- <td class=no> · <!-- Hidden -->
+ <tr>
+ <th> <code title=dom-input-list><a href=#dom-input-list>list</a></code>
+ <td class=no> · <!-- Hidden -->
<td class=yes> Yes <!-- Text -->
<!-- <td class="yes"> Yes Search -->
<!-- <td class="yes"> Yes URL -->
<td class=yes> Yes <!-- E-mail -->
- <td class=no> · <!-- Password -->
+ <td class=no> · <!-- Password -->
<td class=yes> Yes <!-- Date and Time -->
<!-- <td class="yes"> Yes Date -->
<!-- <td class="yes"> Yes Month -->
@@ -25550,21 +27317,22 @@
<!-- <td class="yes"> Yes Number -->
<td class=yes> Yes <!-- Range -->
<td class=yes> Yes <!-- Color -->
- <td class=no> · <!-- Checkbox -->
+ <td class=no> · <!-- Checkbox -->
<!-- <td class="no"> · Radio Button -->
- <td class=no> · <!-- File Upload -->
- <td class=no> · <!-- Submit Button -->
- <td class=no> · <!-- Image Button -->
- <td class=no> · <!-- Reset Button -->
+ <td class=no> · <!-- File Upload -->
+ <td class=no> · <!-- Submit Button -->
+ <td class=no> · <!-- Image Button -->
+ <td class=no> · <!-- Reset Button -->
<!-- <td class="no"> · Button -->
- <tr><th> <code title=dom-input-selectedOption><a href=#dom-input-selectedoption>selectedOption</a></code>
- <td class=no> · <!-- Hidden -->
+ <tr>
+ <th> <code title=dom-input-selectedOption><a href=#dom-input-selectedoption>selectedOption</a></code>
+ <td class=no> · <!-- Hidden -->
<td class=yes> Yes <!-- Text -->
<!-- <td class="yes"> Yes Search -->
<!-- <td class="yes"> Yes URL -->
<td class=yes> Yes <!-- E-mail -->
- <td class=no> · <!-- Password -->
+ <td class=no> · <!-- Password -->
<td class=yes> Yes <!-- Date and Time -->
<!-- <td class="yes"> Yes Date -->
<!-- <td class="yes"> Yes Month -->
@@ -25574,21 +27342,22 @@
<!-- <td class="yes"> Yes Number -->
<td class=yes> Yes <!-- Range -->
<td class=yes> Yes <!-- Color -->
- <td class=no> · <!-- Checkbox -->
+ <td class=no> · <!-- Checkbox -->
<!-- <td class="no"> · Radio Button -->
- <td class=no> · <!-- File Upload -->
- <td class=no> · <!-- Submit Button -->
- <td class=no> · <!-- Image Button -->
- <td class=no> · <!-- Reset Button -->
+ <td class=no> · <!-- File Upload -->
+ <td class=no> · <!-- Submit Button -->
+ <td class=no> · <!-- Image Button -->
+ <td class=no> · <!-- Reset Button -->
<!-- <td class="no"> · Button -->
- <tr><th> <code title=dom-input-stepDown><a href=#dom-input-stepdown>stepDown()</a></code>
- <td class=no> · <!-- Hidden -->
- <td class=no> · <!-- Text -->
+ <tr>
+ <th> <code title=dom-input-stepDown><a href=#dom-input-stepdown>stepDown()</a></code>
+ <td class=no> · <!-- Hidden -->
+ <td class=no> · <!-- Text -->
<!-- <td class="no"> · Search -->
<!-- <td class="no"> · URL -->
- <td class=no> · <!-- E-mail -->
- <td class=no> · <!-- Password -->
+ <td class=no> · <!-- E-mail -->
+ <td class=no> · <!-- Password -->
<td class=yes> Yes <!-- Date and Time -->
<!-- <td class="yes"> Yes Date -->
<!-- <td class="yes"> Yes Month -->
@@ -25597,22 +27366,23 @@
<td class=yes> Yes <!-- Local Date and Time -->
<!-- <td class="yes"> Yes Number -->
<td class=yes> Yes <!-- Range -->
- <td class=no> · <!-- Color -->
- <td class=no> · <!-- Checkbox -->
+ <td class=no> · <!-- Color -->
+ <td class=no> · <!-- Checkbox -->
<!-- <td class="no"> · Radio Button -->
- <td class=no> · <!-- File Upload -->
- <td class=no> · <!-- Submit Button -->
- <td class=no> · <!-- Image Button -->
- <td class=no> · <!-- Reset Button -->
+ <td class=no> · <!-- File Upload -->
+ <td class=no> · <!-- Submit Button -->
+ <td class=no> · <!-- Image Button -->
+ <td class=no> · <!-- Reset Button -->
<!-- <td class="no"> · Button -->
- <tr><th> <code title=dom-input-stepUp><a href=#dom-input-stepup>stepUp()</a></code>
- <td class=no> · <!-- Hidden -->
- <td class=no> · <!-- Text -->
+ <tr>
+ <th> <code title=dom-input-stepUp><a href=#dom-input-stepup>stepUp()</a></code>
+ <td class=no> · <!-- Hidden -->
+ <td class=no> · <!-- Text -->
<!-- <td class="no"> · Search -->
<!-- <td class="no"> · URL -->
- <td class=no> · <!-- E-mail -->
- <td class=no> · <!-- Password -->
+ <td class=no> · <!-- E-mail -->
+ <td class=no> · <!-- Password -->
<td class=yes> Yes <!-- Date and Time -->
<!-- <td class="yes"> Yes Date -->
<!-- <td class="yes"> Yes Month -->
@@ -25621,17 +27391,18 @@
<td class=yes> Yes <!-- Local Date and Time -->
<!-- <td class="yes"> Yes Number -->
<td class=yes> Yes <!-- Range -->
- <td class=no> · <!-- Color -->
- <td class=no> · <!-- Checkbox -->
+ <td class=no> · <!-- Color -->
+ <td class=no> · <!-- Checkbox -->
<!-- <td class="no"> · Radio Button -->
- <td class=no> · <!-- File Upload -->
- <td class=no> · <!-- Submit Button -->
- <td class=no> · <!-- Image Button -->
- <td class=no> · <!-- Reset Button -->
+ <td class=no> · <!-- File Upload -->
+ <td class=no> · <!-- Submit Button -->
+ <td class=no> · <!-- Image Button -->
+ <td class=no> · <!-- Reset Button -->
<!-- <td class="no"> · Button -->
- <tr><th> <span title=""><code title=event-input-input><a href=#event-input-input>input</a></code> event</span>
- <td class=no> · <!-- Hidden -->
+ <tr>
+ <th> <span title=""><code title=event-input-input><a href=#event-input-input>input</a></code> event</span>
+ <td class=no> · <!-- Hidden -->
<td class=yes> Yes <!-- Text -->
<!-- <td class="yes"> Yes Search -->
<!-- <td class="yes"> Yes URL -->
@@ -25648,14 +27419,15 @@
<td class=yes> Yes <!-- Color -->
<td class=yes> Yes <!-- Checkbox -->
<!-- <td class="yes"> Yes Radio Button -->
- <td class=no> · <!-- File Upload -->
- <td class=no> · <!-- Submit Button -->
- <td class=no> · <!-- Image Button -->
- <td class=no> · <!-- Reset Button -->
+ <td class=no> · <!-- File Upload -->
+ <td class=no> · <!-- Submit Button -->
+ <td class=no> · <!-- Image Button -->
+ <td class=no> · <!-- Reset Button -->
<!-- <td class="no"> · Button -->
- <tr><th> <span title=""><code title=event-input-change><a href=#event-input-change>change</a></code> event</span>
- <td class=no> · <!-- Hidden -->
+ <tr>
+ <th> <span title=""><code title=event-input-change><a href=#event-input-change>change</a></code> event</span>
+ <td class=no> · <!-- Hidden -->
<td class=yes> Yes <!-- Text -->
<!-- <td class="yes"> Yes Search -->
<!-- <td class="yes"> Yes URL -->
@@ -25673,12 +27445,14 @@
<td class=yes> Yes <!-- Checkbox -->
<!-- <td class="yes"> Yes Radio Button -->
<td class=yes> Yes <!-- File Upload -->
- <td class=no> · <!-- Submit Button -->
- <td class=no> · <!-- Image Button -->
- <td class=no> · <!-- Reset Button -->
+ <td class=no> · <!-- Submit Button -->
+ <td class=no> · <!-- Image Button -->
+ <td class=no> · <!-- Reset Button -->
<!-- <td class="no"> · Button -->
- </table><p>When an <code><a href=#the-input-element>input</a></code> element's <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute changes state, and
+ </table>
+
+ <p>When an <code><a href=#the-input-element>input</a></code> element's <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute changes state, and
when the element is first created, the element's rendering and
behaviour must change to the new state's accordingly and the
<dfn id=value-sanitization-algorithm>value sanitization algorithm</dfn>, if one is defined for the
@@ -26076,7 +27850,7 @@
commas</a>.</p>
<p>A <dfn id=valid-e-mail-address>valid e-mail address</dfn> is a string that matches the
- production <code title="">dot-atom "@" dot-atom</code>
+ production <code title="">dot-atom "@" dot-atom</code>
where <code title="">dot-atom</code> is defined in RFC 2822 section
3.2.4, excluding the <code>CFWS</code> production everywhere. <a href=#refsRFC2822>[RFC2822]</a></p>
@@ -27379,8 +29153,10 @@
the other <code><a href=#the-input-element>input</a></code> elements <var title="">b</var> that
fulfill all of the following conditions:</p>
- <ul><li>The <code><a href=#the-input-element>input</a></code> element <var title="">b</var>'s <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#radio-button-state title=attr-input-type-radio>Radio Button</a> state.</li>
+ <ul>
+ <li>The <code><a href=#the-input-element>input</a></code> element <var title="">b</var>'s <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#radio-button-state title=attr-input-type-radio>Radio Button</a> state.</li>
+
<li>Either neither <var title="">a</var> nor <var title="">b</var>
have a <a href=#form-owner>form owner</a>, or they both have one and it is the
same for both.</li>
@@ -27390,7 +29166,9 @@
<a href=#compatibility-caseless>compatibility caseless</a> match for the value of <var title="">b</var>'s <code title=attr-fe-name><a href=#attr-fe-name>name</a></code>
attribute.</li>
- </ul><p>A document must not contain an <code><a href=#the-input-element>input</a></code> element whose
+ </ul>
+
+ <p>A document must not contain an <code><a href=#the-input-element>input</a></code> element whose
<i><a href=#radio-button-group>radio button group</a></i> contains only that element.</p>
<p>When any of the following events occur, if the element's <a href=#concept-fe-checked title=concept-fe-checked>checkedness</a> state is true after
@@ -27398,7 +29176,9 @@
other elements in the same <i><a href=#radio-button-group>radio button group</a></i> must be set to
false:</p>
- <ul><li>The element's <a href=#concept-fe-checked title=concept-fe-checked>checkedness</a> state is set to
+ <ul>
+
+ <li>The element's <a href=#concept-fe-checked title=concept-fe-checked>checkedness</a> state is set to
true (for whatever reason).</li>
<li>The element's <code title=attr-fe-name><a href=#attr-fe-name>name</a></code>
@@ -27407,7 +29187,9 @@
<li>The element's <a href=#form-owner>form owner</a> changes.</li>
- </ul><p>If the element is <i title=concept-input-mutable><a href=#concept-input-mutable>mutable</a></i>,
+ </ul>
+
+ <p>If the element is <i title=concept-input-mutable><a href=#concept-input-mutable>mutable</a></i>,
then: The <a href=#pre-click-activation-steps>pre-click activation steps</a> consist of setting
the element's <a href=#concept-fe-checked title=concept-fe-checked>checkedness</a> to
true. The <a href=#canceled-activation-steps>canceled activation steps</a> consist of setting
@@ -27506,7 +29288,9 @@
<a href=#concept-input-type-file-selected title=concept-input-type-file-selected>selected
files</a>.</p>
- <hr><p>The <dfn id=attr-input-accept title=attr-input-accept><code>accept</code></dfn>
+ <hr>
+
+ <p>The <dfn id=attr-input-accept title=attr-input-accept><code>accept</code></dfn>
attribute may be specified to provide user agents with a hint of
what file types the server will be able to accept.</p>
@@ -27514,8 +29298,12 @@
comma-separated tokens</a>, each of which must be an <a href=#ascii-case-insensitive>ASCII
case-insensitive</a> match for one of the following:</p>
- <dl><!-- XXX allow */* ? --><dt>The string <code title="">audio/*</code></dt>
+ <dl>
+ <!-- XXX allow */* ? -->
+
+ <dt>The string <code title="">audio/*</code></dt>
+
<dd>Indicates that sound files are accepted.</dd>
<dt>The string <code title="">video/*</code></dt>
@@ -27530,7 +29318,9 @@
<dd>Indicates that files of the specified type are accepted. <a href=#refsRFC2046>[RFC2046]</a></dd>
- </dl><p>The tokens must not be <a href=#ascii-case-insensitive>ASCII case-insensitive</a>
+ </dl>
+
+ <p>The tokens must not be <a href=#ascii-case-insensitive>ASCII case-insensitive</a>
matches for any of the other tokens (i.e. duplicates are not
allowed). To obtain the list of tokens from the attribute, the user
agent must <a href=#split-a-string-on-commas title="split a string on commas">split the
@@ -27539,8 +29329,10 @@
<p>User agents should prevent the user from selecting files that are
not accepted by one (or more) of these tokens.</p>
- <hr><div class=bookkeeping>
+ <hr>
+ <div class=bookkeeping>
+
<p>The following common <code><a href=#the-input-element>input</a></code> element content
attributes apply to the element:
<code title=attr-input-accept><a href=#attr-input-accept>accept</a></code>,
@@ -27677,7 +29469,9 @@
specifically a <a href=#concept-submit-button title=concept-submit-button>submit
button</a>.</p>
- <hr><p>The image is given by the <dfn id=attr-input-src title=attr-input-src><code>src</code></dfn> attribute. The <code title=attr-input-src><a href=#attr-input-src>src</a></code> attribute must be present, and
+ <hr>
+
+ <p>The image is given by the <dfn id=attr-input-src title=attr-input-src><code>src</code></dfn> attribute. The <code title=attr-input-src><a href=#attr-input-src>src</a></code> attribute must be present, and
must contain a <a href=#valid-url>valid URL</a> referencing a non-interactive,
optionally animated, image resource that is neither paged nor
scripted.</p>
@@ -27691,7 +29485,9 @@
resulting <a href=#absolute-url>absolute URL</a>:</p> <!-- Note how this does NOT
happen when the base URL changes. -->
- <ul><li>The <code><a href=#the-input-element>input</a></code> element's <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is first set to the
+ <ul>
+
+ <li>The <code><a href=#the-input-element>input</a></code> element's <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is first set to the
<a href=#image-button-state title=attr-input-type-image>Image Button</a> state
(possibly when the element is first created), and the <code title=attr-input-src><a href=#attr-input-src>src</a></code> attribute is present.</li>
@@ -27704,8 +29500,10 @@
<code title=attr-input-src><a href=#attr-input-src>src</a></code> attribute is set or
changed.</li> <!-- XXX define changed -->
- </ul><p>Fetching the image must <a href=#delay-the-load-event>delay the <code title=event-load>load</code> event</a>.</p>
+ </ul>
+ <p>Fetching the image must <a href=#delay-the-load-event>delay the <code title=event-load>load</code> event</a>.</p>
+
<p>If the image was successfully obtained, with no network errors,
and the image's type is a supported image type, and the image is a
valid image of that type, then the image is said to be
@@ -27739,7 +29537,9 @@
<a href=#queue-a-task>queue a task</a> to <a href=#fire-an-error-event>fire an <code title=event-error>error</code> event</a> on the
<code><a href=#the-input-element>input</a></code> element.</p>
- <hr><p>The <dfn id=attr-input-alt title=attr-input-alt><code>alt</code></dfn> attribute
+ <hr>
+
+ <p>The <dfn id=attr-input-alt title=attr-input-alt><code>alt</code></dfn> attribute
provides the textual label for the alternative button for users and
user agents who cannot use the image. The <code title=attr-input-alt><a href=#attr-input-alt>alt</a></code> attribute must also be present,
and must contain a non-empty string.</p>
@@ -27747,7 +29547,9 @@
<p>The <code><a href=#the-input-element>input</a></code> element supports <a href=#dimension-attributes>dimension
attributes</a>.</p>
- <hr><p>If the <code title=attr-input-src><a href=#attr-input-src>src</a></code> attribute is set,
+ <hr>
+
+ <p>If the <code title=attr-input-src><a href=#attr-input-src>src</a></code> attribute is set,
and the image is <i>available</i> and the user agent is configured
to display that image, then: The element <a href=#represents>represents</a> a control for
selecting a <a href=#concept-input-type-image-coordinate title=concept-input-type-image-coordinate>coordinate</a> from
@@ -27785,7 +29587,9 @@
any, and the edge of the image otherwise.</p> <!-- legacy browser
behavior sometimes does some sure wacky things. -->
- <hr><p>The <code title=attr-fs-action><a href=#attr-fs-action>action</a></code>, <code title=attr-fs-enctype><a href=#attr-fs-enctype>enctype</a></code>, <code title=attr-fs-method><a href=#attr-fs-method>method</a></code>, <code title=attr-fs-novalidate><a href=#attr-fs-novalidate>novalidate</a></code>, and <code title=attr-fs-target><a href=#attr-fs-target>target</a></code> attributes are <a href=#form-submission>attributes
+ <hr>
+
+ <p>The <code title=attr-fs-action><a href=#attr-fs-action>action</a></code>, <code title=attr-fs-enctype><a href=#attr-fs-enctype>enctype</a></code>, <code title=attr-fs-method><a href=#attr-fs-method>method</a></code>, <code title=attr-fs-novalidate><a href=#attr-fs-novalidate>novalidate</a></code>, and <code title=attr-fs-target><a href=#attr-fs-target>target</a></code> attributes are <a href=#form-submission>attributes
for form submission</a>.</p>
<div class=bookkeeping>
@@ -28100,7 +29904,9 @@
<p>User agents should filter the suggestions to hide suggestions
that would cause the element to not <a href=#concept-fv-valid title=concept-fv-valid>satisfy its constraints</a>.</p>
- <hr><p>If the <code title=attr-input-list><a href=#attr-input-list>list</a></code> attribute does
+ <hr>
+
+ <p>If the <code title=attr-input-list><a href=#attr-input-list>list</a></code> attribute does
not apply, there is no <a href=#concept-input-list title=concept-input-list>suggestions
source element</a>.</p>
@@ -28213,8 +30019,7 @@
<div class=example>
<p>For example, the following snippet:</p>
- <pre>
-<label> Part number:
+ <pre><label> Part number:
<input pattern="[0-9][A-Z]{3}" name="part"
title="A part number is a digit followed by three uppercase letters."/>
</label>
@@ -28315,7 +30120,9 @@
<p>The attribute provides the <dfn id=concept-input-step title=concept-input-step>allowed value step</dfn> for the element,
as follows:</p>
- <ol><li>If the attribute is absent, then the <a href=#concept-input-step title=concept-input-step>allowed value step</a> is the <a href=#concept-input-step-default title=concept-input-step-default>default step</a> multiplied
+ <ol>
+
+ <li>If the attribute is absent, then the <a href=#concept-input-step title=concept-input-step>allowed value step</a> is the <a href=#concept-input-step-default title=concept-input-step-default>default step</a> multiplied
by the <a href=#concept-input-step-scale title=concept-input-step-scale>step scale
factor</a>.</li>
@@ -28333,7 +30140,9 @@
floating point number values</a> when they are applied to the
attribute's value, multiplied by the <a href=#concept-input-step-scale title=concept-input-step-scale>step scale factor</a>.</li>
- </ol><p>The <dfn id=concept-input-min-zero title=concept-input-min-zero>step base</dfn> is the
+ </ol>
+
+ <p>The <dfn id=concept-input-min-zero title=concept-input-min-zero>step base</dfn> is the
result of applying the <a href=#concept-input-value-string-number title=concept-input-value-string-number>algorithm to convert a
string to a number</a> to the value of the <code title=attr-input-min><a href=#attr-input-min>min</a></code> attribute, unless the element does
not have a <code title=attr-input-min><a href=#attr-input-min>min</a></code> attribute
@@ -28397,8 +30206,10 @@
element. If the attribute applies, then it is in one of the
following modes, which define its behavior:</p>
- <dl><dt><dfn id=dom-input-value-value title=dom-input-value-value>value</dfn>
+ <dl>
+ <dt><dfn id=dom-input-value-value title=dom-input-value-value>value</dfn>
+
<dd>On getting, it must return the current <a href=#concept-fe-value title=concept-fe-value>value</a> of the element. On setting,
it must set the element's <a href=#concept-fe-value title=concept-fe-value>value</a> to the new value, set the
element's <a href=#concept-input-value-dirty-flag title=concept-input-value-dirty-flag>dirty value
@@ -28419,10 +30230,14 @@
that attribute's value; otherwise, it must return the string "<code title="">on</code>". On setting, it must set the element's <code title=attr-input-value><a href=#attr-input-value>value</a></code> attribute to the new
value.</dd>
- </dl><p>If the attribute does not apply, then on getting and setting it
+ </dl>
+
+ <p>If the attribute does not apply, then on getting and setting it
must throw an <code><a href=#invalid_access_err>INVALID_ACCESS_ERR</a></code> exception.</p>
- <hr><p>The <dfn id=dom-input-checked title=dom-input-checked><code>checked</code></dfn> DOM
+ <hr>
+
+ <p>The <dfn id=dom-input-checked title=dom-input-checked><code>checked</code></dfn> DOM
attribute allows scripts to manipulate the <a href=#concept-fe-checked title=concept-fe-checked>checkedness</a> of an
<code><a href=#the-input-element>input</a></code> element. On getting, it must return the current
<a href=#concept-fe-checked title=concept-fe-checked>checkedness</a> of the element;
@@ -28430,7 +30245,9 @@
set the element's <a href=#concept-input-checked-dirty-flag title=concept-input-checked-dirty-flag>dirty checkedness
flag</a> to true.</p>
- <hr><p>The <dfn id=dom-input-valueasdate title=dom-input-valueAsDate><code>valueAsDate</code></dfn> DOM
+ <hr>
+
+ <p>The <dfn id=dom-input-valueasdate title=dom-input-valueAsDate><code>valueAsDate</code></dfn> DOM
attribute represents the <a href=#concept-fe-value title=concept-fe-value>value</a> of the element, interpreted
as a date.</p>
@@ -28450,7 +30267,9 @@
state, on the new value, and set the <a href=#concept-fe-value title=concept-fe-value>value</a> of the element to resulting
string.</p>
- <hr><p>The <dfn id=dom-input-valueasnumber title=dom-input-valueAsNumber><code>valueAsNumber</code></dfn> DOM
+ <hr>
+
+ <p>The <dfn id=dom-input-valueasnumber title=dom-input-valueAsNumber><code>valueAsNumber</code></dfn> DOM
attribute represents the <a href=#concept-fe-value title=concept-fe-value>value</a>
of the element, interpreted as a number.</p>
@@ -28481,11 +30300,15 @@
value, and set the <a href=#concept-fe-value title=concept-fe-value>value</a> of
the element to resulting string.</p>
- <hr><p>The <dfn id=dom-input-stepdown title=dom-input-stepDown><code>stepDown()</code></dfn>
+ <hr>
+
+ <p>The <dfn id=dom-input-stepdown title=dom-input-stepDown><code>stepDown()</code></dfn>
and <dfn id=dom-input-stepup title=dom-input-stepUp><code>stepUp()</code></dfn>
methods, when invoked, must run the following algorithm:</p>
- <ol><li><p>If the <code title=dom-input-stepDown><a href=#dom-input-stepdown>stepDown()</a></code> and
+ <ol>
+
+ <li><p>If the <code title=dom-input-stepDown><a href=#dom-input-stepdown>stepDown()</a></code> and
<code title=dom-input-stepUp><a href=#dom-input-stepup>stepUp()</a></code> methods do not
apply, as defined for the <code><a href=#the-input-element>input</a></code> element's <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute's current state, then
throw an <code><a href=#invalid_access_err>INVALID_ACCESS_ERR</a></code> exception, and abort these
@@ -28522,7 +30345,11 @@
<li><p>Set the <a href=#concept-fe-value title=concept-fe-value>value</a> of the
element to <var title="">value as string</var>.</li>
- </ol><hr><p>The <dfn id=dom-input-list title=dom-input-list><code>list</code></dfn> DOM
+ </ol>
+
+ <hr>
+
+ <p>The <dfn id=dom-input-list title=dom-input-list><code>list</code></dfn> DOM
attribute must return the current <a href=#concept-input-list title=concept-input-list>suggestions source element</a>, if
any, or null otherwise.</p>
@@ -28586,7 +30413,9 @@
part of a form prefilling feature), the user agent must follow these
steps:</p>
- <ol><li>If the <code title=event-input-input><a href=#event-input-input>input</a></code> event
+ <ol>
+
+ <li>If the <code title=event-input-input><a href=#event-input-input>input</a></code> event
applies, <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple
event</a> called <code title=event-input>input</code> at the
<code><a href=#the-input-element>input</a></code> element.</li>
@@ -28604,7 +30433,9 @@
applies, <a href=#broadcast-formchange-events>broadcast <code title=event-formchange>formchange</code> events</a> at the
<code><a href=#the-input-element>input</a></code> element's <a href=#form-owner>form owner</a>.</li>
- </ol><p class=note>In addition, when the <code title=event-input-change><a href=#event-input-change>change</a></code> event applies, <code title=event-change>change</code> events can also be fired as part
+ </ol>
+
+ <p class=note>In addition, when the <code title=event-input-change><a href=#event-input-change>change</a></code> event applies, <code title=event-change>change</code> events can also be fired as part
of the element's <a href=#activation-behavior>activation behavior</a> and as part of the
<a href=#unfocusing-steps>unfocusing steps</a>.</p>
@@ -28615,7 +30446,8 @@
<h4 id=the-button-element><span class=secno>4.10.5 </span>The <dfn><code>button</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dd><a href=#interactive-content-0>Interactive content</a>.</dd>
@@ -28661,7 +30493,9 @@
readonly attribute <span>NodeList</span> <a href=#dom-lfe-labels title=dom-lfe-labels>labels</a>;
};</pre>
</dd>
- </dl><p>The <code><a href=#the-button-element>button</a></code> element <a href=#represents>represents</a> a button. If the
+ </dl>
+
+ <p>The <code><a href=#the-button-element>button</a></code> element <a href=#represents>represents</a> a button. If the
element is not <a href=#concept-fe-disabled title=concept-fe-disabled>disabled</a>,
then the user agent should allow the user to activate the
button.</p>
@@ -28671,23 +30505,32 @@
<p>The <dfn id=attr-button-type title=attr-button-type><code>type</code></dfn>
attribute controls the behavior of the button when it is activated.
It is an <a href=#enumerated-attribute>enumerated attribute</a>. The following table
- lists the keywords and states for the attribute — the keywords
+ lists the keywords and states for the attribute — the keywords
in the left column map to the states in the cell in the second
column on the same row as the keyword.</p>
- <table><thead><tr><th> Keyword
+ <table>
+ <thead>
+ <tr>
+ <th> Keyword
<th> State
<th> Brief description
- <tbody><tr><td><dfn id=attr-button-type-submit title=attr-button-type-submit><code>submit</code></dfn>
+ <tbody>
+ <tr>
+ <td><dfn id=attr-button-type-submit title=attr-button-type-submit><code>submit</code></dfn>
<td><a href=#attr-button-type-submit-state title=attr-button-type-submit-state>Submit Button</a>
<td>Submits the form.
- <tr><td><dfn id=attr-button-type-reset title=attr-button-type-reset><code>reset</code></dfn>
+ <tr>
+ <td><dfn id=attr-button-type-reset title=attr-button-type-reset><code>reset</code></dfn>
<td><a href=#attr-button-type-reset-state title=attr-button-type-reset-state>Reset Button</a>
<td>Resets the form.
- <tr><td><dfn id=attr-button-type-button title=attr-button-type-button><code>button</code></dfn>
+ <tr>
+ <td><dfn id=attr-button-type-button title=attr-button-type-button><code>button</code></dfn>
<td><a href=#attr-button-type-button-state title=attr-button-type-button-state>Button</a>
<td>Does nothing.
- </table><p>The <i>missing value default</i> is the <a href=#attr-button-type-submit-state title=attr-button-type-submit-state>Submit Button</a>
+ </table>
+
+ <p>The <i>missing value default</i> is the <a href=#attr-button-type-submit-state title=attr-button-type-submit-state>Submit Button</a>
state.</p>
<p>If the <code title=attr-button-type><a href=#attr-button-type>type</a></code> attribute is in
@@ -28699,8 +30542,10 @@
steps defined in the following list for the current state of the
element's <code title=attr-button-type><a href=#attr-button-type>type</a></code> attribute.</p>
- <dl><dt> <dfn id=attr-button-type-submit-state title=attr-button-type-submit-state>Submit Button</dfn> </dt>
+ <dl>
+ <dt> <dfn id=attr-button-type-submit-state title=attr-button-type-submit-state>Submit Button</dfn> </dt>
+
<dd><p>If the element has a <a href=#form-owner>form owner</a>, the element
must <a href=#concept-form-submit title=concept-form-submit>submit</a> the <a href=#form-owner>form
owner</a> from the <code><a href=#the-button-element>button</a></code> element.</dd>
@@ -28715,7 +30560,9 @@
<dd><p>Do nothing.</dd>
- </dl><p>The <code title=attr-fae-form><a href=#attr-fae-form>form</a></code> attribute is used to
+ </dl>
+
+ <p>The <code title=attr-fae-form><a href=#attr-fae-form>form</a></code> attribute is used to
explicitly associate the <code><a href=#the-button-element>button</a></code> element with its
<a href=#form-owner>form owner</a>. The <code title=attr-fe-name><a href=#attr-fe-name>name</a></code>
attribute represents the element's name. The <code title=attr-fe-disabled><a href=#attr-fe-disabled>disabled</a></code> attribute is used to make
@@ -28751,7 +30598,8 @@
<h4 id=the-select-element><span class=secno>4.10.6 </span>The <dfn><code>select</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dd><a href=#interactive-content-0>Interactive content</a>.</dd>
@@ -28802,7 +30650,9 @@
readonly attribute <span>NodeList</span> <a href=#dom-lfe-labels title=dom-lfe-labels>labels</a>;
};</pre>
</dd>
- </dl><!-- Proposals for v2:
+ </dl>
+
+ <!-- Proposals for v2:
* <select value=""> as an alternative to <option selected>
http://developers.slashdot.org/comments.pl?sid=426306&cid=22142072
<Philip`> http://www.ipiao.com.cn/ does <select size="1" name="to"><script>City_Default="PEK"</script><SCRIPT language=javascript
@@ -28812,7 +30662,9 @@
* once we can have no default, a way to require="" a value.
ack Weston Ruter: http://weston.ruter.net/projects/test-cases/html-select-element/
q.v. http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-November/017583.html
- --><p>The <code><a href=#the-select-element>select</a></code> element represents a control for
+ -->
+
+ <p>The <code><a href=#the-select-element>select</a></code> element represents a control for
selecting amongst a set of options.</p>
<p>The <dfn id=attr-select-multiple title=attr-select-multiple><code>multiple</code></dfn>
@@ -29001,7 +30853,8 @@
<h4 id=the-datalist-element><span class=secno>4.10.7 </span>The <dfn><code>datalist</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
@@ -29017,7 +30870,9 @@
readonly attribute <a href=#htmlcollection-0>HTMLCollection</a> <a href=#dom-datalist-options title=dom-datalist-options>options</a>;
};</pre>
</dd>
- </dl><p>The <code><a href=#the-datalist-element>datalist</a></code> element represents a set of
+ </dl>
+
+ <p>The <code><a href=#the-datalist-element>datalist</a></code> element represents a set of
<code><a href=#the-option-element>option</a></code> elements that represent predefined options for
other controls. The contents of the element represents fallback
content for legacy user agents, intermixed with <code><a href=#the-option-element>option</a></code>
@@ -29041,7 +30896,8 @@
<h4 id=the-optgroup-element><span class=secno>4.10.8 </span>The <dfn><code>optgroup</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd>None.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>As a child of a <code><a href=#the-select-element>select</a></code> element.</dd>
@@ -29058,7 +30914,9 @@
attribute DOMString <a href=#dom-optgroup-label title=dom-optgroup-label>label</a>;
};</pre>
</dd>
- </dl><p>The <code><a href=#the-optgroup-element>optgroup</a></code> element <a href=#represents>represents</a> a group of
+ </dl>
+
+ <p>The <code><a href=#the-optgroup-element>optgroup</a></code> element <a href=#represents>represents</a> a group of
<code><a href=#the-option-element>option</a></code> elements with a common label.</p>
<p>The element's group of <code><a href=#the-option-element>option</a></code> elements consists of
@@ -29087,7 +30945,8 @@
<h4 id=the-option-element><span class=secno>4.10.9 </span>The <dfn><code>option</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd>None.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>As a child of a <code><a href=#the-select-element>select</a></code> element.</dd>
@@ -29120,7 +30979,9 @@
readonly attribute long <a href=#dom-option-index title=dom-option-index>index</a>;
};</pre>
</dd>
- </dl><p>The <code><a href=#the-option-element>option</a></code> element <a href=#represents>represents</a> an option in a
+ </dl>
+
+ <p>The <code><a href=#the-option-element>option</a></code> element <a href=#represents>represents</a> an option in a
<code><a href=#the-select-element>select</a></code> element or as part of a list of suggestions in a
<code><a href=#the-datalist-element>datalist</a></code> element.</p>
@@ -29221,7 +31082,8 @@
<h4 id=the-textarea-element><span class=secno>4.10.10 </span>The <dfn><code>textarea</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dd><a href=#interactive-content-0>Interactive content</a>.</dd>
@@ -29269,7 +31131,11 @@
readonly attribute <span>NodeList</span> <a href=#dom-lfe-labels title=dom-lfe-labels>labels</a>;
};</pre>
</dd>
- </dl><!-- XXX add selectionStart and company --><p>The <code><a href=#the-textarea-element>textarea</a></code> element <a href=#represents>represents</a> a multiline plain
+ </dl>
+
+ <!-- XXX add selectionStart and company -->
+
+ <p>The <code><a href=#the-textarea-element>textarea</a></code> element <a href=#represents>represents</a> a multiline plain
text edit control for the element's <dfn id=concept-textarea-raw-value title=concept-textarea-raw-value>raw value</dfn>. The contents of
the control represent the control's default value.</p>
@@ -29360,7 +31226,9 @@
defined to be the element's <a href=#concept-textarea-raw-value title=concept-textarea-raw-value>raw value</a> with the
following transformation applied:</p>
- <ol><li><p>Replace every occurance of a U+000D CARRIAGE RETURN (CR)
+ <ol>
+
+ <li><p>Replace every occurance of a U+000D CARRIAGE RETURN (CR)
character not followed by a U+000A LINE FEED (LF) character, and
every occurance of a U+000A LINE FEED (LF) character not proceeded
by a U+000D CARRIAGE RETURN (CR) character, by a two-character
@@ -29376,7 +31244,9 @@
U+000D CARRIAGE RETURN - U+000A LINE FEED (CRLF) character
pairs.</li>
- </ol><p>The <dfn id=attr-textarea-maxlength title=attr-textarea-maxlength><code>maxlength</code></dfn>
+ </ol>
+
+ <p>The <dfn id=attr-textarea-maxlength title=attr-textarea-maxlength><code>maxlength</code></dfn>
attribute is a <a href=#attr-fe-maxlength title=attr-fe-maxlength>form control <code title="">maxlength</code> attribute</a> controlled by the
<code><a href=#the-textarea-element>textarea</a></code> element's <a href=#concept-textarea-dirty title=concept-textarea-dirty>dirty value flag</a>.</p>
@@ -29434,7 +31304,8 @@
<h4 id=the-output-element><span class=secno>4.10.11 </span>The <dfn><code>output</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dd><a href=#category-listed title=category-listed>Listed</a> and <a href=#category-reset title=category-reset>resettable</a> <a href=#form-associated-element>form-associated element</a>.</dd>
@@ -29465,7 +31336,9 @@
void <a href=#dom-cva-setcustomvalidity title=dom-cva-setCustomValidity>setCustomValidity</a>(in DOMString error);
};</pre>
</dd>
- </dl><p>The <code><a href=#the-output-element>output</a></code> element <a href=#represents>represents</a> the result of a
+ </dl>
+
+ <p>The <code><a href=#the-output-element>output</a></code> element <a href=#represents>represents</a> the result of a
calculation.</p>
<p>The <dfn id=attr-output-for title=attr-output-for><code>for</code></dfn> content
@@ -29587,7 +31460,9 @@
<a href=#form-associated-element>form-associated element</a>, it must run the following
steps:</p>
- <ol><li><p>If the element's <a href=#form-owner>form owner</a> is not null, and
+ <ol>
+
+ <li><p>If the element's <a href=#form-owner>form owner</a> is not null, and
the element's <code title=attr-fae-form><a href=#attr-fae-form>form</a></code> content
attribute is not present, and the element's <a href=#form-owner>form owner</a>
is one of the ancestors of the element after the change to the
@@ -29600,7 +31475,10 @@
<p>If the element has a <code title=attr-fae-form><a href=#attr-fae-form>form</a></code>
content attribute, then run these substeps:</p>
- <ol><!-- XXX how does ID matching get affected by quirks mode? --><li><p>If the first element in the <code>Document</code> to have
+ <ol>
+
+ <!-- XXX how does ID matching get affected by quirks mode? -->
+ <li><p>If the first element in the <code>Document</code> to have
an ID that is equal to the element's <code title=attr-fae-form><a href=#attr-fae-form>form</a></code> content attribute's value is a
<code><a href=#the-form-element>form</a></code> element, then <a href=#concept-form-association title=concept-form-association>associate</a> the
<a href=#form-associated-element>form-associated element</a> with that <code><a href=#the-form-element>form</a></code>
@@ -29608,8 +31486,10 @@
<li><p>Abort the "reset the form owner" steps.</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>Otherwise, if the <a href=#form-associated-element>form-associated element</a> in
question has an ancestor <code><a href=#the-form-element>form</a></code> element, then <a href=#concept-form-association title=concept-form-association>associate</a> the
<a href=#form-associated-element>form-associated element</a> with the nearest such ancestor
@@ -29617,7 +31497,9 @@
<li><p>Otherwise, the element is left unassociated.</li>
- </ol><p><a href=#form-associated-element title="form-associated element">Form-associated
+ </ol>
+
+ <p><a href=#form-associated-element title="form-associated element">Form-associated
elements</a> have a <dfn id=dom-fae-form title=dom-fae-form><code>form</code></dfn> DOM attribute, which,
on getting, must return the element's <a href=#form-owner>form owner</a>, or
null if there isn't one.</p>
@@ -29771,7 +31653,9 @@
attribute is an <a href=#enumerated-attribute>enumerated attribute</a> with the following
keywords and states:</p>
- <ul><li>The keyword <dfn id=attr-fs-method-get-keyword title=attr-fs-method-GET-keyword><code>GET</code></dfn>, mapping
+ <ul>
+
+ <li>The keyword <dfn id=attr-fs-method-get-keyword title=attr-fs-method-GET-keyword><code>GET</code></dfn>, mapping
to the state <dfn id=attr-fs-method-get title=attr-fs-method-GET>GET</dfn>, indicating
the HTTP GET method.</li>
@@ -29787,8 +31671,10 @@
to the state <dfn id=attr-fs-method-delete title=attr-fs-method-DELETE>DELETE</dfn>, indicating
the HTTP DELETE method.</li>
- </ul><p>The <i>missing value default</i> is the <a href=#attr-fs-method-get title=attr-fs-method-GET>GET</a> state.</p>
+ </ul>
+ <p>The <i>missing value default</i> is the <a href=#attr-fs-method-get title=attr-fs-method-GET>GET</a> state.</p>
+
<p>The <dfn id=concept-fs-method title=concept-fs-method>method</dfn> of an element is
one of those four states. If the element has a <code title=attr-fs-method><a href=#attr-fs-method>method</a></code> attribute, then the element's
<a href=#concept-fs-method title=concept-fs-method>method</a> is that attribute's
@@ -29798,10 +31684,13 @@
content attribute is an <a href=#enumerated-attribute>enumerated attribute</a> with the
following keywords and states:</p>
- <ul><li>The "<dfn id=attr-fs-enctype-urlencoded title=attr-fs-enctype-urlencoded><code>application/x-www-form-urlencoded</code></dfn>" keyword and corresponding state.</li>
+ <ul>
+ <li>The "<dfn id=attr-fs-enctype-urlencoded title=attr-fs-enctype-urlencoded><code>application/x-www-form-urlencoded</code></dfn>" keyword and corresponding state.</li>
<li>The "<dfn id=attr-fs-enctype-formdata title=attr-fs-enctype-formdata><code>multipart/form-data</code></dfn>" keyword and corresponding state.</li>
<li>The "<dfn id=attr-fs-enctype-text title=attr-fs-enctype-text><code>text/plain</code></dfn>" keyword and corresponding state.</li>
- </ul><p>The <i>missing value default</i> is the <code title=attr-fs-enctype-urlencoded><a href=#attr-fs-enctype-urlencoded>application/x-www-form-urlencoded</a></code>
+ </ul>
+
+ <p>The <i>missing value default</i> is the <code title=attr-fs-enctype-urlencoded><a href=#attr-fs-enctype-urlencoded>application/x-www-form-urlencoded</a></code>
state.</p>
<p>The <dfn id=concept-fs-enctype title=concept-fs-enctype>enctype</dfn> of an element is
@@ -29867,8 +31756,10 @@
this specification define more precisely when each state applies or
does not.)</p>
- <dl><dt> <dfn id=suffering-from-being-missing>Suffering from being missing</dfn> </dt>
+ <dl>
+ <dt> <dfn id=suffering-from-being-missing>Suffering from being missing</dfn> </dt>
+
<dd> <p class=note>When a control has no <a href=#concept-fe-value title=concept-fe-value>value</a> but has a <code title="">required</code> attribute (<code><a href=#the-input-element>input</a></code> <code title=attr-input-required><a href=#attr-input-required>required</a></code>, <code><a href=#the-textarea-element>textarea</a></code>
<code title=attr-textarea-required><a href=#attr-textarea-required>required</a></code>). </dd>
@@ -29910,7 +31801,9 @@
(as set by the element's <code title=dom-cva-setCustomValidity><a href=#dom-cva-setcustomvalidity>setCustomValidity()</a></code>
method) is not the empty string.</p> </dd>
- </dl><p class=note>An element can still suffer from these states even
+ </dl>
+
+ <p class=note>An element can still suffer from these states even
when the element is <a href=#concept-fe-disabled title=concept-fe-disabled>disabled</a>; thus these states can
be represented in the DOM even if validating the form during
submission wouldn't indicate a problem to the user.</p>
@@ -29930,7 +31823,9 @@
along with a (possibly empty) list of elements that are invalid and
for which no script has claimed responsibility:</p>
- <ol><li><p>Let <var title="">controls</var> be a list of all the <a href=#category-submit title=category-submit>submittable</a> elements whose
+ <ol>
+
+ <li><p>Let <var title="">controls</var> be a list of all the <a href=#category-submit title=category-submit>submittable</a> elements whose
<a href=#form-owner>form owner</a> is <var title="">form</var>, in <a href=#tree-order>tree
order</a>.</li>
@@ -29942,7 +31837,9 @@
<p>For each element <var title="">field</var> in <var title="">controls</var>, in <a href=#tree-order>tree order</a>, run the
following substeps:</p>
- <ol><li><p>If <var title="">field</var> is not a <a href=#candidate-for-constraint-validation>candidate for
+ <ol>
+
+ <li><p>If <var title="">field</var> is not a <a href=#candidate-for-constraint-validation>candidate for
constraint validation</a>, then move on to the next
element.</li>
@@ -29951,8 +31848,10 @@
<li><p>Otherwise, add <var title="">field</var> to <var title="">invalid controls</var>.</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>If <var title="">invalid controls</var> is empty, then
return a <i>positive</i> result and abort these steps.</li>
@@ -29964,21 +31863,29 @@
<p>For each element <var title="">field</var> in <var title="">invalid controls</var>, if any, in <a href=#tree-order>tree
order</a>, run the following substeps:</p>
- <ol><li><p><a href=#fire-a-simple-event>Fire a simple event</a> named <code title=event-invalid>invalid</code> at <var title="">field</var>.</li>
+ <ol>
+ <li><p><a href=#fire-a-simple-event>Fire a simple event</a> named <code title=event-invalid>invalid</code> at <var title="">field</var>.</li>
+
<li><p>If the event was not canceled, then add <var title="">field</var> to <var title="">unhandled invalid
controls</var>.</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>Return a <i>negative</i> result with the list of elements in
the <var title="">unhandled invalid controls</var> list.</li>
- </ol><p>If a user agent is to <dfn id=interactively-validate-the-constraints>interactively validate the
+ </ol>
+
+ <p>If a user agent is to <dfn id=interactively-validate-the-constraints>interactively validate the
constraints</dfn> of <code><a href=#the-form-element>form</a></code> element <var title="">form</var>, then the user agent must run the following
steps:</p>
- <ol><li><p><a href=#statically-validate-the-constraints>Statically validate the constraints</a> of <var title="">form</var>, and let <var title="">unhandled invalid
+ <ol>
+
+ <li><p><a href=#statically-validate-the-constraints>Statically validate the constraints</a> of <var title="">form</var>, and let <var title="">unhandled invalid
controls</var> be the list of elements returned if the result was
<i>negative</i>.</li>
@@ -30001,8 +31908,12 @@
<li><p>Return a <i>negative</i> result.</li>
- </ol><h5 id=the-constraint-validation-api><span class=secno>4.10.14.3 </span>The <dfn>constraint validation API</dfn></h5>
+ </ol>
+
+
+ <h5 id=the-constraint-validation-api><span class=secno>4.10.14.3 </span>The <dfn>constraint validation API</dfn></h5>
+
<p>The <dfn id=dom-cva-willvalidate title=dom-cva-willValidate><code>willValidate</code></dfn>
attribute must return true if an element is a <a href=#candidate-for-constraint-validation>candidate for
constraint validation</a>, and false otherwise (i.e. false if any
@@ -30037,7 +31948,8 @@
condition given in the following list is true, and false
otherwise.</p>
- <dl><dt><dfn id=dom-validitystate-valuemissing title=dom-ValidityState-valueMissing><code>valueMissing</code></dfn></dt>
+ <dl>
+ <dt><dfn id=dom-validitystate-valuemissing title=dom-ValidityState-valueMissing><code>valueMissing</code></dfn></dt>
<dd> <p>The control is <a href=#suffering-from-being-missing>suffering from being missing</a>.</p> </dd>
<dt><dfn id=dom-validitystate-typemismatch title=dom-ValidityState-typeMismatch><code>typeMismatch</code></dfn></dt>
@@ -30064,7 +31976,9 @@
<dt><dfn id=dom-validitystate-valid title=dom-ValidityState-valid><code>valid</code></dfn></dt>
<dd> <p>None of the other conditions are true.</p> </dd>
- </dl><p>When the <dfn id=dom-cva-checkvalidatity title=dom-cva-checkValidatity><code>checkValidity()</code></dfn>
+ </dl>
+
+ <p>When the <dfn id=dom-cva-checkvalidatity title=dom-cva-checkValidatity><code>checkValidity()</code></dfn>
method is invoked, if the element is a <a href=#candidate-for-constraint-validation>candidate for
constraint validation</a> and does not <a href=#concept-fv-valid title=concept-fv-valid>satisfy its constaints</a>, the user
agent must <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-invalid>invalid</code> at the element and return
@@ -30128,7 +32042,9 @@
<p>When a form <var title="">form</var> is <dfn id=concept-form-submit title=concept-form-submit>submitted</dfn> from an element <var title="">submitter</var> (typically a button), the user agent must
run the following steps:</p>
- <ol><li id=sandboxSubmitBlocked><p>If <var title="">form</var> is in
+ <ol>
+
+ <li id=sandboxSubmitBlocked><p>If <var title="">form</var> is in
a <code>Document</code> that has no associated <a href=#browsing-context>browsing
context</a> or whose <a href=#browsing-context>browsing context</a> has its
<a href=#sandboxed-forms-browsing-context-flag>sandboxed forms browsing context flag</a> set, then abort
@@ -30176,12 +32092,16 @@
element <var title="">field</var> in <var title="">controls</var>,
in <a href=#tree-order>tree order</a>, run the following substeps:</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>If any of the following conditions are met, then skip these
substeps for this element:</p>
- <ul><li>The <var title="">field</var> element has a
+ <ul>
+
+ <li>The <var title="">field</var> element has a
<code><a href=#the-datalist-element>datalist</a></code> element ancestor.</li>
<li>The <var title="">field</var> element is <a href=#concept-fe-disabled title=concept-fe-disabled>disabled</a>.</li>
@@ -30206,8 +32126,10 @@
<code><a href=#the-object-element>object</a></code> element that is not using a
<a href=#plugin>plugin</a>.</li>
- </ul><p>Otherwise, process <var title="">field</var> as follows:</p>
+ </ul>
+ <p>Otherwise, process <var title="">field</var> as follows:</p>
+
</li>
<li><p>Let <var title="">type</var> be the value of the <code title="">type</code> DOM attribute of <var title="">field</var>.</li> <!-- if the field is an <object>
@@ -30219,7 +32141,9 @@
<code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#image-button-state title=attr-input-type-image>Image Button</a> state,
then run these further nested substeps:</p>
- <ol><li><p>If the <var title="">field</var> element has an <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attribute specified and value
+ <ol>
+
+ <li><p>If the <var title="">field</var> element has an <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attribute specified and value
is not the empty string, let <var title="">name</var> be that
value followed by a single U+002E FULL STOP (.)
character. Otherwise, let <var title="">name</var> be the empty
@@ -30253,8 +32177,10 @@
set</a> step, otherwise, jump to the next step in the overall
form submission algorithm.</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>If the <var title="">field</var> element does not have a
<code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attribute specified, or
its <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attribute's value is
@@ -30280,7 +32206,9 @@
<a href=#radio-button-state title=attr-input-type-radio>Radio Button</a> state,
then then run these further nested substeps:</p>
- <ol><li><p>If the <var title="">field</var> element has a <code title=attr-input-value><a href=#attr-input-value>value</a></code> attribute specified, then
+ <ol>
+
+ <li><p>If the <var title="">field</var> element has a <code title=attr-input-value><a href=#attr-input-value>value</a></code> attribute specified, then
let <var title="">value</var> be the value of that attribute;
otherwise, let <var title="">value</var> be the string
"<code title="">on</code>".</li>
@@ -30289,8 +32217,10 @@
with <var title="">name</var> as the name, <var title="">value</var> as the value, and <var title="">type</var>
as the type.</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>Otherwise, if the <var title="">field</var> element is an
<code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#file-upload-state title=attr-input-type-file>File Upload</a> state, then for
each file <a href=#concept-input-type-file-selected title=concept-input-type-file-selected>selected</a> in the
@@ -30310,8 +32240,10 @@
<li><p>Otherwise, append an entry in the <var title="">form data
set</var> with <var title="">name</var> as the name, the <a href=#concept-fe-value title=concept-fe-value>value</a> of the <var title="">field</var> element as the value, and <var title="">type</var> as the type.</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>Let <var title="">action</var> be the <var title="">submitter</var> element's <a href=#concept-fs-action title=concept-fs-action>action</a>.</li>
<li>
@@ -30353,42 +32285,52 @@
of each column. Then, jump to the steps named in that cell and
defined below the table.</p>
- <table><tr><td>
+ <table>
+ <tr>
+ <td>
<th> <a href=#attr-fs-method-get title=attr-fs-method-GET>GET</a>
<th> <a href=#attr-fs-method-post title=attr-fs-method-POST>POST</a>
<th> <a href=#attr-fs-method-put title=attr-fs-method-PUT>PUT</a>
<th> <a href=#attr-fs-method-delete title=attr-fs-method-DELETE>DELETE</a>
- <tr><th> <code title="">http</code>
+ <tr>
+ <th> <code title="">http</code>
<td> <a href=#submit-mutate-action title=submit-mutate-action>Mutate action</a>
<td> <a href=#submit-body title=submit-body>Submit as entity body</a>
<td> <a href=#submit-body title=submit-body>Submit as entity body</a>
<td> <a href=#submit-delete-action title=submit-delete-action>Delete action</a>
- <tr><th> <code title="">https</code>
+ <tr>
+ <th> <code title="">https</code>
<td> <a href=#submit-mutate-action title=submit-mutate-action>Mutate action</a>
<td> <a href=#submit-body title=submit-body>Submit as entity body</a>
<td> <a href=#submit-body title=submit-body>Submit as entity body</a>
<td> <a href=#submit-delete-action title=submit-delete-action>Delete action</a>
- <tr><th> <code title="">ftp</code>
+ <tr>
+ <th> <code title="">ftp</code>
<td> <a href=#submit-get-action title=submit-get-action>Get action</a>
<td> <a href=#submit-get-action title=submit-get-action>Get action</a>
<td> <a href=#submit-get-action title=submit-get-action>Get action</a>
<td> <a href=#submit-get-action title=submit-get-action>Get action</a>
- <tr><th> <code title="">javascript</code>
+ <tr>
+ <th> <code title="">javascript</code>
<td> <a href=#submit-get-action title=submit-get-action>Get action</a>
<td> <a href=#submit-get-action title=submit-get-action>Get action</a>
<td> <a href=#submit-get-action title=submit-get-action>Get action</a>
<td> <a href=#submit-get-action title=submit-get-action>Get action</a>
- <tr><th> <code title="">data</code>
+ <tr>
+ <th> <code title="">data</code>
<td> <a href=#submit-get-action title=submit-get-action>Get action</a>
<td> <a href=#submit-data-post title=submit-data-post>Post to data:</a>
<td> <a href=#submit-data-put title=submit-data-put>Put to data:</a>
<td> <a href=#submit-get-action title=submit-get-action>Get action</a>
- <tr><th> <code title="">mailto</code>
+ <tr>
+ <th> <code title="">mailto</code>
<td> <a href=#submit-mailto-headers title=submit-mailto-headers>Mail with headers</a>
<td> <a href=#submit-mailto-body title=submit-mailto-body>Mail as body</a>
<td> <a href=#submit-mailto-headers title=submit-mailto-headers>Mail with headers</a>
<td> <a href=#submit-mailto-headers title=submit-mailto-headers>Mail with headers</a>
- </table><p>If <var title="">scheme</var> is not one of those listed in
+ </table>
+
+ <p>If <var title="">scheme</var> is not one of those listed in
this table, then the behavior is not defined by this
specification. User agents should, in the absence of another
specification defining this, act in a manner analogous to that
@@ -30396,7 +32338,9 @@
<p>The behaviors are as follows:</p>
- <dl><dt><dfn id=submit-mutate-action title=submit-mutate-action>Mutate action</dfn>
+ <dl>
+
+ <dt><dfn id=submit-mutate-action title=submit-mutate-action>Mutate action</dfn>
<dd>
<p>Let <var title="">query</var> be the result of encoding the
@@ -30432,8 +32376,10 @@
<p>Let <var title="">MIME type</var> be determined as
follows:</p>
- <dl><dt>If <var title="">enctype</var> is <code title=attr-fs-enctype-urlencoded><a href=#attr-fs-enctype-urlencoded>application/x-www-form-urlencoded</a></code></dt>
+ <dl>
+ <dt>If <var title="">enctype</var> is <code title=attr-fs-enctype-urlencoded><a href=#attr-fs-enctype-urlencoded>application/x-www-form-urlencoded</a></code></dt>
+
<dd>Let <var title="">MIME type</var> be "<code title="">application/x-www-form-urlencoded</code>".</dd>
<dt>If <var title="">enctype</var> is <code title=attr-fs-enctype-formdata><a href=#attr-fs-enctype-formdata>multipart/form-data</a></code></dt>
@@ -30444,7 +32390,9 @@
<dd>Let <var title="">MIME type</var> be "<code title="">text/plain</code>".</dd>
- </dl><p><a href=#navigate>Navigate</a> <var title="">target browsing
+ </dl>
+
+ <p><a href=#navigate>Navigate</a> <var title="">target browsing
context</var> to <var title="">action</var> using the HTTP
method given by <var title="">method</var> and with <var title="">entity body</var> as the entity body, of type <var title="">MIME type</var>. If <var title="">target browsing
context</var> was newly created for this purpose by the steps
@@ -30524,8 +32472,10 @@
<p>Let <var title="">MIME type</var> be determined as
follows:</p>
- <dl><dt>If <var title="">enctype</var> is <code title=attr-fs-enctype-urlencoded><a href=#attr-fs-enctype-urlencoded>application/x-www-form-urlencoded</a></code></dt>
+ <dl>
+ <dt>If <var title="">enctype</var> is <code title=attr-fs-enctype-urlencoded><a href=#attr-fs-enctype-urlencoded>application/x-www-form-urlencoded</a></code></dt>
+
<dd>Let <var title="">MIME type</var> be "<code title="">application/x-www-form-urlencoded</code>".</dd>
<dt>If <var title="">enctype</var> is <code title=attr-fs-enctype-formdata><a href=#attr-fs-enctype-formdata>multipart/form-data</a></code></dt>
@@ -30536,18 +32486,24 @@
<dd>Let <var title="">MIME type</var> be "<code title="">text/plain</code>".</dd>
- </dl><p>Let <var title="">destination</var> be the result of
+ </dl>
+
+ <p>Let <var title="">destination</var> be the result of
concatenating the following:</p>
- <ol class=brief><li>The string "<code title="">data:</code>".</li>
+ <ol class=brief>
+ <li>The string "<code title="">data:</code>".</li>
+
<li>The value of <var title="">MIME type</var>.</li>
<li>The string "<code title="">;base64,</code>".</li>
<li>A base-64 encoded representation of <var title="">data</var>. <a href=#refsRFC2045>[RFC2045]</a></li>
- </ol><p>Let <var title="">target browsing context</var> be <a href=#the-form-submission-target-browsing-context>the
+ </ol>
+
+ <p>Let <var title="">target browsing context</var> be <a href=#the-form-submission-target-browsing-context>the
form submission target browsing context</a>.</p>
<p><a href=#navigate>Navigate</a> <var title="">target browsing
@@ -30618,7 +32574,9 @@
</dd>
- </dl><p><dfn id=the-form-submission-target-browsing-context>The form submission target browsing context</dfn> is
+ </dl>
+
+ <p><dfn id=the-form-submission-target-browsing-context>The form submission target browsing context</dfn> is
obtained, when needed by the behaviors described above, as
follows: If the user indicated a specific <a href=#browsing-context>browsing
context</a> to use when submitting the form, then that is the
@@ -30632,8 +32590,10 @@
<p>The <dfn id=appropriate-form-encoding-algorithm>appropriate form encoding algorithm</dfn> is
determined as follows:</p>
- <dl><dt>If <var title="">enctype</var> is <code title=attr-fs-enctype-urlencoded><a href=#attr-fs-enctype-urlencoded>application/x-www-form-urlencoded</a></code></dt>
+ <dl>
+ <dt>If <var title="">enctype</var> is <code title=attr-fs-enctype-urlencoded><a href=#attr-fs-enctype-urlencoded>application/x-www-form-urlencoded</a></code></dt>
+
<dd>Use the <a href=#application/x-www-form-urlencoded-encoding-algorithm><code title="">application/x-www-form-urlencoded</code> encoding
algorithm</a>.</dd>
@@ -30647,15 +32607,22 @@
<dd>Use the <a href=#text/plain-encoding-algorithm><code title="">text/plain</code> encoding
algorithm</a>.</dd>
- </dl></li>
+ </dl>
- </ol><h5 id=url-encoded-form-data><span class=secno>4.10.15.3 </span>URL-encoded form data</h5>
+ </li>
+ </ol>
+
+
+ <h5 id=url-encoded-form-data><span class=secno>4.10.15.3 </span>URL-encoded form data</h5>
+
<p>The <dfn id=application/x-www-form-urlencoded-encoding-algorithm><code title="">application/x-www-form-urlencoded</code> encoding
algorithm</dfn> is as follows:</p>
- <ol><li><p>Let <var title="">result</var> be the empty string.</li>
+ <ol>
+ <li><p>Let <var title="">result</var> be the empty string.</li>
+
<li>
<p>If the <code><a href=#the-form-element>form</a></code> element has an <code title=attr-form-accept-charset><a href=#attr-form-accept-charset>accept-charset</a></code> attribute,
@@ -30689,7 +32656,9 @@
<p>For each entry in the <var title="">form data set</var>,
perform these substeps:</p>
- <ol><li><p>For each character in the entry's name and value that
+ <ol>
+
+ <li><p>For each character in the entry's name and value that
cannot be expressed using the selected character encoding,
replace the character by a string consisting of a U+0026
AMPERSAND character (&), one of more characters in the range
@@ -30702,7 +32671,11 @@
<p>For each character in the entry's name and value, apply the
following subsubsteps:</p>
- <ol><!-- * - . _ 0-9 a-z A-Z --><li><p>If the character isn't in the range U+0020, U+002A,
+ <ol>
+
+ <!-- * - . _ 0-9 a-z A-Z -->
+
+ <li><p>If the character isn't in the range U+0020, U+002A,
U+002D, U+002E, U+0030 .. U+0039, U+0041 .. U+005A, U+005F,
U+0061 .. U+007A then replace the character with a string
formed as follows: Start with the empty string, and then,
@@ -30717,8 +32690,10 @@
<li><p>If the character is a U+0020 SPACE character, replace it
with a single U+002B PLUS SIGN character (+).</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>If the entry's name is "<code title="">isindex</code>",
its type is "<code title="">text</code>", and this is the first
entry in the <var title="">form data set</var>, then append the
@@ -30735,13 +32710,18 @@
<li><p>Append the entry's value to <var title="">result</var>.</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>Encode <var title="">result</var> as US-ASCII and return the
resulting byte stream.</li>
- </ol><h5 id=multipart-form-data><span class=secno>4.10.15.4 </span>Multipart form data</h5>
+ </ol>
+
+ <h5 id=multipart-form-data><span class=secno>4.10.15.4 </span>Multipart form data</h5>
+
<p>The <dfn id=multipart/form-data-encoding-algorithm><code title="">multipart/form-data</code> encoding
algorithm</dfn> is to encode the <var title="">form data set</var>
using the rules described by RFC2388, <cite>Returning Values from
@@ -30764,8 +32744,10 @@
<p>The <dfn id=text/plain-encoding-algorithm><code title="">text/plain</code> encoding
algorithm</dfn> is as follows:</p>
- <ol><li><p>Let <var title="">result</var> be the empty string.</li>
+ <ol>
+ <li><p>Let <var title="">result</var> be the empty string.</li>
+
<li>
<!-- this is different from application/x-www-form-urlencoded in
@@ -30798,8 +32780,10 @@
<p>For each entry in the <var title="">form data set</var>,
perform these substeps:</p>
- <ol><li><p>Append the entry's name to <var title="">result</var>.</li>
+ <ol>
+ <li><p>Append the entry's name to <var title="">result</var>.</li>
+
<li><p>Append a single U+003D EQUALS SIGN character (=) to <var title="">result</var>.</li>
<li><p>Append the entry's value to <var title="">result</var>.</li>
@@ -30807,13 +32791,19 @@
<li><p>Append a U+000D CARRIAGE RETURN (CR) U+000A LINE FEED (LF)
character pair to <var title="">result</var>.</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>Encode <var title="">result</var> using the selected
character encoding and return the resulting byte stream.</li>
- </ol><h4 id=resetting-a-form><span class=secno>4.10.16 </span>Resetting a form</h4>
+ </ol>
+
+
+ <h4 id=resetting-a-form><span class=secno>4.10.16 </span>Resetting a form</h4>
+
<p>When a form <var title="">form</var> is <dfn id=concept-form-reset title=concept-form-reset>reset</dfn>, the user agent must invoke
the <a href=#concept-form-reset-control title=concept-form-reset-control>reset algorithm</a>
of each <a href=#category-reset title=category-reset>resettable</a> elements
@@ -30835,7 +32825,9 @@
<dfn id=broadcast-formchange-events>broadcast <code title=event-formchange>formchange</code>
events</dfn> from a <code><a href=#the-form-element>form</a></code> element <var title="">form</var>, it must run the following steps:</p>
- <ol><li><p>Let <var title="">controls</var> be a list of all the <a href=#category-reset title=category-reset>resettable</a> elements whose <a href=#form-owner>form
+ <ol>
+
+ <li><p>Let <var title="">controls</var> be a list of all the <a href=#category-reset title=category-reset>resettable</a> elements whose <a href=#form-owner>form
owner</a> is <var title="">form</var>.</li>
<li>If the user agent was to <a href=#broadcast-forminput-events>broadcast <code title=event-forminput>forminput</code> events</a>, let <var title="">event name</var> be <code title=event-forminput>forminput</code>. Otherwise the user agent
@@ -30845,11 +32837,16 @@
<a href=#tree-order>tree order</a>, <a href=#fire-a-simple-event>fire a simple event</a> named
<var title="">event name</var> at the element.</li>
- </ol><h3 id=interactive-elements><span class=secno>4.11 </span>Interactive elements</h3>
+ </ol>
+
+
+ <h3 id=interactive-elements><span class=secno>4.11 </span>Interactive elements</h3>
+
<h4 id=the-details-element><span class=secno>4.11.1 </span>The <dfn><code>details</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#interactive-content-0>Interactive content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
@@ -30865,7 +32862,9 @@
attribute boolean <a href=#dom-details-open title=dom-details-open>open</a>;
};</pre>
</dd>
- </dl><p>The <code><a href=#the-details-element>details</a></code> element <a href=#represents>represents</a> additional
+ </dl>
+
+ <p>The <code><a href=#the-details-element>details</a></code> element <a href=#represents>represents</a> additional
information or controls which the user can obtain on demand.</p>
<p class=note>The <code><a href=#the-details-element>details</a></code> element is not appropriate
@@ -30904,7 +32903,8 @@
<p class=XXX>The API here needs rewriting. Don't implement this right now.</p>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#interactive-content-0>Interactive content</a>.</dd>
<dd><a href=#sectioning-root>Sectioning root</a>.</dd>
@@ -30936,7 +32936,9 @@
void <a href=#dom-datagrid-updatecellchanged title=dom-datagrid-updateCellChanged>updateCellChanged</a>(in <a href=#rowspecification>RowSpecification</a> row, in unsigned long column);
};</pre>
</dd>
- </dl><p class=XXX>One possible thing to be added is a way to
+ </dl>
+
+ <p class=XXX>One possible thing to be added is a way to
detect when a row/selection has been deleted, activated, etc, by the
user (delete key, enter key, etc).</p> <!-- XXXPA -->
@@ -31077,8 +33079,10 @@
<p>The following methods may be usefully implemented:</p>
- <dl><dt><dfn id=dom-provider-initialize title=dom-provider-initialize><code>initialize(<var title="">datagrid</var>)</code></dfn></dt>
+ <dl>
+ <dt><dfn id=dom-provider-initialize title=dom-provider-initialize><code>initialize(<var title="">datagrid</var>)</code></dfn></dt>
+
<dd>Called by the <code><a href=#datagrid>datagrid</a></code> element (the one given by
the <var title="">datagrid</var> argument) after it has first
populated itself. This would typically be used to set the initial
@@ -31111,7 +33115,7 @@
always returns <var title="">position</var>.) For a given <var title="">parentRow</var>, this method must never return the same
value for different values of <var title="">position</var>. The
returned value <var title="">x</var> must be in the range
- 0 ≤ <var title="">x</var> < <var title="">n</var>, where <var title="">n</var> is the value returned
+ 0 ≤ <var title="">x</var> < <var title="">n</var>, where <var title="">n</var> is the value returned
by <code title=dom-provider-getRowCount><a href=#dom-provider-getrowcount>getRowCount(<var title="">parentRow</var>)</a></code>.</dd>
<dt><dfn id=dom-provider-getcolumncount title=dom-provider-getColumnCount><code>getColumnCount()</code></dfn></dt>
@@ -31206,7 +33210,7 @@
<var title="">column</var>. The checkbox should be toggled to the
state given by <var title="">state</var>, which is a positive
integer (1) if the checkbox is to be checked, zero (0) if it is to
- be unchecked, and a negative number (−1) if it is to be set to the
+ be unchecked, and a negative number (−1) if it is to be set to the
indeterminate state. There is no need to tell the
<code><a href=#datagrid>datagrid</a></code> that the cell has changed, as the
<code><a href=#datagrid>datagrid</a></code> automatically assumes that the given cell
@@ -31236,89 +33240,145 @@
void performActionOnCell(in <span>RowSpecification</span> row, in unsigned long column, in DOMString action); // required if .performActionOnCell() is ever invoked on the datagrid
-->
- </dl><p>The following classes (for rows, columns, and cells) may be
+ </dl>
+
+ <p>The following classes (for rows, columns, and cells) may be
usefully used in conjunction with this interface:</p>
- <table id=datagridClassSummary><tr><th>Class name</th>
+ <table id=datagridClassSummary>
+ <tr>
+ <th>Class name</th>
<th>Applies to</th>
<th>Description</th>
- <tr><td><!--checked--><dfn id=datagrid-cell-class-checked title=datagrid-cell-class-checked><code>checked</code></dfn></td>
+ </tr>
+
+ <tr>
+ <td><!--checked--><dfn id=datagrid-cell-class-checked title=datagrid-cell-class-checked><code>checked</code></dfn></td>
<td>Cells</td>
<td>The cell has a checkbox and it is checked. (The <code title=datagrid-cell-class-cyclable><a href=#datagrid-cell-class-cyclable>cyclable</a></code> and <code title=datagrid-cell-class-progress><a href=#datagrid-cell-class-progress>progress</a></code> classes
override this, though.)</td>
- <tr><td><!--cyclable--><dfn id=datagrid-cell-class-cyclable title=datagrid-cell-class-cyclable><code>cyclable</code></dfn></td>
+ </tr>
+
+ <tr>
+ <td><!--cyclable--><dfn id=datagrid-cell-class-cyclable title=datagrid-cell-class-cyclable><code>cyclable</code></dfn></td>
<td>Cells</td>
<td>The cell can be cycled through multiple values. (The <code title=datagrid-cell-class-progress><a href=#datagrid-cell-class-progress>progress</a></code> class
overrides this, though.)</td>
- <tr><td><!--editable--><dfn id=datagrid-cell-class-editable title=datagrid-cell-class-editable><code>editable</code></dfn></td>
+ </tr>
+
+ <tr>
+ <td><!--editable--><dfn id=datagrid-cell-class-editable title=datagrid-cell-class-editable><code>editable</code></dfn></td>
<td>Cells</td>
<td>The cell can be edited. (The <code title=datagrid-cell-class-cyclable><a href=#datagrid-cell-class-cyclable>cyclable</a></code>, <code title=datagrid-cell-class-progress><a href=#datagrid-cell-class-progress>progress</a></code>, <code title=datagrid-cell-class-checked><a href=#datagrid-cell-class-checked>checked</a></code>, <code title=datagrid-cell-class-checked><a href=#datagrid-cell-class-checked>unchecked</a></code> and <code title=datagrid-cell-class-checked><a href=#datagrid-cell-class-checked>indeterminate</a></code> classes
override this, though.)</td>
- <tr><td><!--header--><dfn id=datagrid-row-class-header title=datagrid-row-class-header><code>header</code></dfn></td>
+ </tr>
+
+ <tr>
+ <td><!--header--><dfn id=datagrid-row-class-header title=datagrid-row-class-header><code>header</code></dfn></td>
<td>Rows</td>
<td>The row is a heading, not a data row.</td>
- <tr><td><!--indeterminate--><dfn id=datagrid-cell-class-indeterminate title=datagrid-cell-class-indeterminate><code>indeterminate</code></dfn></td>
+ </tr>
+
+ <tr>
+ <td><!--indeterminate--><dfn id=datagrid-cell-class-indeterminate title=datagrid-cell-class-indeterminate><code>indeterminate</code></dfn></td>
<td>Cells</td>
<td>The cell has a checkbox, and it can be set to an indeterminate
state. If neither the <code title=datagrid-cell-class-checked><a href=#datagrid-cell-class-checked>checked</a></code> nor <code title=datagrid-cell-class-checked><a href=#datagrid-cell-class-checked>unchecked</a></code> classes are
present, then the checkbox is in that state, too. (The <code title=datagrid-cell-class-cyclable><a href=#datagrid-cell-class-cyclable>cyclable</a></code> and <code title=datagrid-cell-class-progress><a href=#datagrid-cell-class-progress>progress</a></code> classes
override this, though.)</td>
- <tr><td><!--initially-hidden--><dfn id=datagrid-column-class-initially-hidden title=datagrid-column-class-initially-hidden><code>initially-hidden</code></dfn></td>
+ </tr>
+
+ <tr>
+ <td><!--initially-hidden--><dfn id=datagrid-column-class-initially-hidden title=datagrid-column-class-initially-hidden><code>initially-hidden</code></dfn></td>
<td>Columns</td>
<td>The column will not be shown when the <code><a href=#datagrid>datagrid</a></code> is
initially rendered. If this class is not present on the column
when the <code><a href=#datagrid>datagrid</a></code> is initially rendered, the column
will be visible if space allows.</td>
- <tr><td><!--initially-closed--><dfn id=datagrid-row-class-initially-closed title=datagrid-row-class-initially-closed><code>initially-closed</code></dfn></td>
+ </tr>
+
+ <tr>
+ <td><!--initially-closed--><dfn id=datagrid-row-class-initially-closed title=datagrid-row-class-initially-closed><code>initially-closed</code></dfn></td>
<td>Rows</td>
<td>The row will be closed when the <code><a href=#datagrid>datagrid</a></code> is
initially rendered. If neither this class nor the <code title=datagrid-row-class-initially-open><a href=#datagrid-row-class-initially-open>initially-open</a></code>
class is present on the row when the <code><a href=#datagrid>datagrid</a></code> is
initially rendered, the initial state will depend on platform
conventions.</td>
- <tr><td><!--initially-open--><dfn id=datagrid-row-class-initially-open title=datagrid-row-class-initially-open><code>initially-open</code></dfn></td>
+ </tr>
+
+ <tr>
+ <td><!--initially-open--><dfn id=datagrid-row-class-initially-open title=datagrid-row-class-initially-open><code>initially-open</code></dfn></td>
<td>Rows</td>
<td>The row will be opened when the <code><a href=#datagrid>datagrid</a></code> is
initially rendered. If neither this class nor the <code title=datagrid-row-class-initially-closed><a href=#datagrid-row-class-initially-closed>initially-closed</a></code>
class is present on the row when the <code><a href=#datagrid>datagrid</a></code> is
initially rendered, the initial state will depend on platform
conventions.</td>
- <tr><td><!--progress--><dfn id=datagrid-cell-class-progress title=datagrid-cell-class-progress><code>progress</code></dfn></td>
+ </tr>
+
+ <tr>
+ <td><!--progress--><dfn id=datagrid-cell-class-progress title=datagrid-cell-class-progress><code>progress</code></dfn></td>
<td>Cells</td>
<td>The cell is a progress bar.</td>
- <tr><td><!--reversed--><dfn id=datagrid-column-class-reversed title=datagrid-column-class-reversed><code>reversed</code></dfn></td>
+ </tr>
+
+ <tr>
+ <td><!--reversed--><dfn id=datagrid-column-class-reversed title=datagrid-column-class-reversed><code>reversed</code></dfn></td>
<td>Columns</td>
<td>If the cell is sorted, the sort direction is descending,
instead of ascending.</td>
- <tr><td><!--selectable-separator--><dfn id=datagrid-row-class-selectable-separator title=datagrid-row-class-selectable-separator><code>selectable-separator</code></dfn></td>
+ </tr>
+
+ <tr>
+ <td><!--selectable-separator--><dfn id=datagrid-row-class-selectable-separator title=datagrid-row-class-selectable-separator><code>selectable-separator</code></dfn></td>
<td>Rows</td>
<td>The row is a normal, selectable, data row, except that instead
of having data, it only has a separator. (The <code title=datagrid-row-class-header><a href=#datagrid-row-class-header>header</a></code> and <code title=datagrid-row-class-separator><a href=#datagrid-row-class-separator>separator</a></code> classes
override this, though.)</td>
- <tr><td><!--separator--><dfn id=datagrid-row-class-separator title=datagrid-row-class-separator><code>separator</code></dfn></td>
+ </tr>
+
+ <tr>
+ <td><!--separator--><dfn id=datagrid-row-class-separator title=datagrid-row-class-separator><code>separator</code></dfn></td>
<td>Rows</td>
<td>The row is a separator row, not a data row. (The <code title=datagrid-row-class-header><a href=#datagrid-row-class-header>header</a></code> class
overrides this, though.)</td>
- <tr><td><!--sortable--><dfn id=datagrid-column-class-sortable title=datagrid-column-class-sortable><code>sortable</code></dfn></td>
+ </tr>
+
+ <tr>
+ <td><!--sortable--><dfn id=datagrid-column-class-sortable title=datagrid-column-class-sortable><code>sortable</code></dfn></td>
<td>Columns</td>
<td>The data can be sorted by this column.</td>
- <tr><td><!--sorted--><dfn id=datagrid-column-class-sorted title=datagrid-column-class-sorted><code>sorted</code></dfn></td>
+ </tr>
+
+ <tr>
+ <td><!--sorted--><dfn id=datagrid-column-class-sorted title=datagrid-column-class-sorted><code>sorted</code></dfn></td>
<td>Columns</td>
<td>The data is sorted by this column. Unless the <code title=datagrid-column-class-reversed><a href=#datagrid-column-class-reversed>reversed</a></code> class is
also present, the sort direction is ascending.</td>
- <tr><td><!--unchecked--><dfn id=datagrid-cell-class-unchecked title=datagrid-cell-class-unchecked><code>unchecked</code></dfn></td>
+ </tr>
+
+ <tr>
+ <td><!--unchecked--><dfn id=datagrid-cell-class-unchecked title=datagrid-cell-class-unchecked><code>unchecked</code></dfn></td>
<td>Cells</td>
<td>The cell has a checkbox and, unless the <code title=datagrid-cell-class-checked><a href=#datagrid-cell-class-checked>checked</a></code> class is
present as well, it is unchecked. (The <code title=datagrid-cell-class-cyclable><a href=#datagrid-cell-class-cyclable>cyclable</a></code> and <code title=datagrid-cell-class-progress><a href=#datagrid-cell-class-progress>progress</a></code> classes
override this, though.)</td>
- </tr><!--XXXPA
+ </tr>
+
+<!--XXXPA
<tr>
<td><!- -deletable- -><dfn title="datagrid-row-class-deletable"><code>deletable</code></dfn></td>
<td>Rows</td>
<td></td>
</tr>
---></table><h5 id=the-default-data-provider><span class=secno>4.11.2.4 </span>The default data provider</h5>
+-->
+ </table>
+
+
+ <h5 id=the-default-data-provider><span class=secno>4.11.2.4 </span>The default data provider</h5>
+
<p>The user agent must supply a default data provider for the case
where the <code><a href=#datagrid>datagrid</a></code>'s <code title=dom-datagrid-data><a href=#dom-datagrid-data>data</a></code> attribute is null. It must act
as described in this section.</p>
@@ -31326,10 +33386,14 @@
<p>The behavior of the default data provider depends on the nature
of the first element child of the <code><a href=#datagrid>datagrid</a></code>.</p>
- <dl class=switch><!-- XXX some of these entries say "the method must return" and
+ <dl class=switch>
+
+ <!-- XXX some of these entries say "the method must return" and
other say "the characteristic must be"; this should be rationalized
- --><dt>While the first element child is a <code><a href=#the-table-element>table</a></code> element</dt>
+ -->
+ <dt>While the first element child is a <code><a href=#the-table-element>table</a></code> element</dt>
+
<dd>
<p><strong><code title=dom-provider-getRowCount><a href=#dom-provider-getrowcount>getRowCount(<var title="">row</var>)</a></code></strong>:
@@ -31393,7 +33457,9 @@
<code><a href=#the-th-element>th</a></code> element, no classes must be added. The user agent
must then:</p>
- <ol><li>Remove the <code title=datagrid-column-class-sorted><a href=#datagrid-column-class-sorted>sorted</a></code> and <code title=datagrid-column-class-reversed><a href=#datagrid-column-class-reversed>reversed</a></code>
+ <ol>
+
+ <li>Remove the <code title=datagrid-column-class-sorted><a href=#datagrid-column-class-sorted>sorted</a></code> and <code title=datagrid-column-class-reversed><a href=#datagrid-column-class-reversed>reversed</a></code>
classes.</li>
<li>If the <code><a href=#the-table-element>table</a></code> element has a <code title=attr-class><a href=#classes>class</a></code> attribute that includes the <code title="">sortable</code> class, add the <code title=datagrid-column-class-sortable><a href=#datagrid-column-class-sortable>sortable</a></code>
@@ -31406,7 +33472,9 @@
data, and it is sorted in descending order, add the <code title=datagrid-column-class-reversed><a href=#datagrid-column-class-reversed>reversed</a></code> class as
well.</li>
- </ol><p>The various row- and cell- related methods operate relative to
+ </ol>
+
+ <p>The various row- and cell- related methods operate relative to
a particular element, the element of the row or cell specified by
their arguments.</p>
@@ -31561,7 +33629,9 @@
classes from the following list to <var title="">classes</var>
when their condition is met:</p>
- <ul><li>If the <var title="">row</var>'s corresponding element is an
+ <ul>
+
+ <li>If the <var title="">row</var>'s corresponding element is an
<code><a href=#the-optgroup-element>optgroup</a></code> element: <code title=datagrid-row-class-header><a href=#datagrid-row-class-header>header</a></code></li>
<li>If the <var title="">row</var>'s corresponding element
@@ -31574,7 +33644,9 @@
element's <code title=attr-class><a href=#classes>class</a></code> attribute
contains the <code title="">open</code> class: <code title=datagrid-row-class-initially-open><a href=#datagrid-row-class-initially-open>initially-open</a></code></li>
- </ul><p>The <code title=dom-provider-getCellData><a href=#dom-provider-getcelldata>getCellData(<var title="">row</var>, <var title="">cell</var>)</a></code> method must
+ </ul>
+
+ <p>The <code title=dom-provider-getCellData><a href=#dom-provider-getcelldata>getCellData(<var title="">row</var>, <var title="">cell</var>)</a></code> method must
return the value of the <code title=attr-optgroup-label><a href=#attr-optgroup-label>label</a></code> attribute if the <var title="">row</var>'s corresponding element is an
<code><a href=#the-optgroup-element>optgroup</a></code> element, otherwise, if the <var title="">row</var>'s corresponding element is an
<code><a href=#the-option-element>option</a></code>element, its <code title=attr-option-label><a href=#attr-option-label>label</a></code> attribute if it has one,
@@ -31604,7 +33676,7 @@
<p>For the rows, assume the existence of a node filter view of the
descendants of the <code><a href=#datagrid>datagrid</a></code> that skips all nodes
- other than <code><a href=#the-li-element>li</a></code>, <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h1</a></code>–<code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h6</a></code>, and
+ other than <code><a href=#the-li-element>li</a></code>, <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h1</a></code>–<code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h6</a></code>, and
<code><a href=#the-hr-element>hr</a></code> elements, and skips any descendants of
<code><a href=#menus>menu</a></code> elements.</p>
@@ -31688,7 +33760,9 @@
classes from the following list to <var title="">classes</var>
when their condition is met:</p>
- <ul><li>If the row's element contains other elements that are also in
+ <ul>
+
+ <li>If the row's element contains other elements that are also in
the view, and the element's <code title=attr-class><a href=#classes>class</a></code>
attribute contains the <code title="">closed</code> class: <code title=datagrid-row-class-initially-closed><a href=#datagrid-row-class-initially-closed>initially-closed</a></code></li>
@@ -31696,13 +33770,15 @@
the view, and the element's <code title=attr-class><a href=#classes>class</a></code>
attribute contains the <code title="">open</code> class: <code title=datagrid-row-class-initially-open><a href=#datagrid-row-class-initially-open>initially-open</a></code></li>
- <li>If the row's element is an <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h1</a></code>–<code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h6</a></code>
+ <li>If the row's element is an <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h1</a></code>–<code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h6</a></code>
element: <code title=datagrid-row-class-header><a href=#datagrid-row-class-header>header</a></code></li>
<li>If the row's element is an <code><a href=#the-hr-element>hr</a></code> element: <code title=datagrid-row-class-separator><a href=#datagrid-row-class-separator>separator</a></code></li> <!--
XXX no way to get selectable-separator -->
- </ul><p>The <code title=dom-provider-getCellData><a href=#dom-provider-getcelldata>getCellData(<var title="">i</var>, <var title="">j</var>)</a></code>, <code title=dom-provider-getCellClasses><a href=#dom-provider-getcellclasses>getCellClasses(<var title="">i</var>, <var title="">j</var>, <var title="">classes</var>)</a></code>, <code title=dom-provider-setCellCheckedState><a href=#dom-provider-setcellcheckedstate>getCellCheckedState(<var title="">i</var>, <var title="">j</var>, <var title="">state</var>)</a></code>, <code title=dom-provider-cycleCell><a href=#dom-provider-cyclecell>cycleCell(<var title="">i</var>,
+ </ul>
+
+ <p>The <code title=dom-provider-getCellData><a href=#dom-provider-getcelldata>getCellData(<var title="">i</var>, <var title="">j</var>)</a></code>, <code title=dom-provider-getCellClasses><a href=#dom-provider-getcellclasses>getCellClasses(<var title="">i</var>, <var title="">j</var>, <var title="">classes</var>)</a></code>, <code title=dom-provider-setCellCheckedState><a href=#dom-provider-setcellcheckedstate>getCellCheckedState(<var title="">i</var>, <var title="">j</var>, <var title="">state</var>)</a></code>, <code title=dom-provider-cycleCell><a href=#dom-provider-cyclecell>cycleCell(<var title="">i</var>,
<var title="">j</var>)</a></code>, and <code title=dom-provider-editCell><a href=#dom-provider-editcell>editCell(<var title="">i</var>, <var title="">j</var>, <var title="">data</var>)</a></code> methods must
act as described in <a href=#commonDefaultDataGridMethodDefinitions>the common
definitions below</a>, treating the row's element as being the
@@ -31732,7 +33808,9 @@
</dd>
- </dl><h6 id=commonDefaultDataGridMethodDefinitions><span class=secno>4.11.2.4.1 </span>Common default data
+ </dl>
+
+ <h6 id=commonDefaultDataGridMethodDefinitions><span class=secno>4.11.2.4.1 </span>Common default data
provider method definitions for cells</h6>
<p>These definitions are used for the cell-specific methods of the
@@ -31742,8 +33820,10 @@
by their first two arguments. Which element that is is defined in
the previous section.</p>
- <dl><dt>Cyclable cells</dt>
+ <dl>
+ <dt>Cyclable cells</dt>
+
<dd>
<p>If the first element child of a cell's element is a
@@ -31856,8 +33936,13 @@
</dd>
- </dl><!-- XXX Calculated cells, like in spreadsheets? --><h5 id=populating-the-datagrid-element><span class=secno>4.11.2.5 </span>Populating the <code><a href=#datagrid>datagrid</a></code> element</h5>
+ </dl>
+ <!-- XXX Calculated cells, like in spreadsheets? -->
+
+
+ <h5 id=populating-the-datagrid-element><span class=secno>4.11.2.5 </span>Populating the <code><a href=#datagrid>datagrid</a></code> element</h5>
+
<p>A <code><a href=#datagrid>datagrid</a></code> must be disabled until its end tag has
been parsed<!-- XXX do we define that? what if the end tag is never
seen, but the element is popped off the stack?--> (in the case of a
@@ -31885,8 +33970,10 @@
<p>To obtain data from the data provider, the element must invoke
methods on the data provider object in the following ways:</p>
- <dl><dt>To determine the total number of columns</dt>
+ <dl>
+ <dt>To determine the total number of columns</dt>
+
<dd>Invoke the <code title=dom-provider-getColumnCount><a href=#dom-provider-getcolumncount>getColumnCount()</a></code> method
with no arguments. The return value is the number of columns. If
the return value is zero or negative, not an integer, or simply not
@@ -31896,7 +33983,7 @@
<dt>To get the captions to use for the columns</dt>
<dd>Invoke the <code title=dom-provider-getCaptionText><a href=#dom-provider-getcaptiontext>getCaptionText()</a></code> method
- with the index of the column in question. The index <var title="">i</var> must be in the range 0 ≤ <var title="">i</var>
+ with the index of the column in question. The index <var title="">i</var> must be in the range 0 ≤ <var title="">i</var>
< <var title="">N</var>, where <var title="">N</var> is the
total number of columns. The return value is the string to use when
referring to that column. If the method returns null or the empty
@@ -31909,7 +33996,7 @@
method with the index of the column in question, and an object
implementing the <code><a href=#domtokenlist-0>DOMTokenList</a></code> interface, associated
with an anonymous empty string. The index <var title="">i</var>
- must be in the range 0 ≤ <var title="">i</var> < <var title="">N</var>, where <var title="">N</var> is the total number
+ must be in the range 0 ≤ <var title="">i</var> < <var title="">N</var>, where <var title="">N</var> is the total number
of columns. The tokens contained in the string underlying
<code><a href=#domtokenlist-0>DOMTokenList</a></code> object when the method returns represent
the classes that apply to the given column. If the method is not
@@ -31992,15 +34079,22 @@
<p>If the rows are:</p>
- <ol><li> Row "0"
- <ol><li> Row "0,0"
+ <ol>
+ <li> Row "0"
+ <ol>
+ <li> Row "0,0"
<li> Row "0,1"
- </ol></li>
+ </ol>
+ </li>
<li> Row "1"
- <ol><li> Row "1,0"
+ <ol>
+ <li> Row "1,0"
<li> Row "1,1"
- </ol></li>
- </ol><p>...and the <code title=dom-provider-getChildAtPosition><a href=#dom-provider-getchildatposition>getChildAtPosition()</a></code>
+ </ol>
+ </li>
+ </ol>
+
+ <p>...and the <code title=dom-provider-getChildAtPosition><a href=#dom-provider-getchildatposition>getChildAtPosition()</a></code>
method is implemented as follows:</p>
<pre>function getChildAtPosition(parent, child) {
@@ -32010,16 +34104,23 @@
<p>...then the rendering would actually be:</p>
- <ol><li> Row "1"
- <ol><li> Row "1,1"
+ <ol>
+ <li> Row "1"
+ <ol>
+ <li> Row "1,1"
<li> Row "1,0"
- </ol></li>
+ </ol>
+ </li>
<li> Row "0"
- <ol><li> Row "0,1"
+ <ol>
+ <li> Row "0,1"
<li> Row "0,0"
- </ol></li>
- </ol></div>
+ </ol>
+ </li>
+ </ol>
+ </div>
+
<p>If the return value of the method is negative, larger than the
number of rows that the <code title=dom-provider-getRowCount><a href=#dom-provider-getrowcount>getRowCount()</a></code> method
reported for that parent, not an integer, or simply not a numeric
@@ -32162,7 +34263,7 @@
<dd>If the value <var title="">x</var> of the cell is a string that
can be <a href=#rules-for-parsing-floating-point-number-values title="rules for parsing floating point number
values">converted to a floating-point number</a> in the range
- 0.0 ≤ <var title="">x</var> ≤ 1.0, then
+ 0.0 ≤ <var title="">x</var> ≤ 1.0, then
the progress bar has that value (0.0 means no progress, 1.0 means
complete). Otherwise, the progress bar is an indeterminate progress
bar.</dd>
@@ -32193,21 +34294,23 @@
classes apply to the cell, and the cell can only be toggled between
those two states.</dd>
- </dl><p>If the data provider ever raises an exception while the
+ </dl>
+
+ <p>If the data provider ever raises an exception while the
<code><a href=#datagrid>datagrid</a></code> is invoking one of its methods, the
<code><a href=#datagrid>datagrid</a></code> must act, for the purposes of that particular
method call, as if the relevant method had not been defined.</p>
<p>A <code><a href=#rowspecification>RowSpecification</a></code> object <var title="">p</var> with
<var title="">n</var> path components passed to a method of the data
- provider must fulfill the constraint <span>0 ≤ <var title="">p<sub title=""><var title="">i</var></sub></var> < <var title="">m</var>-1</span> for all integer values of <var title="">i</var> in the range <span>0 ≤ <var title="">i</var> < <var title="">n</var>-1</span>,
+ provider must fulfill the constraint <span>0 ≤ <var title="">p<sub title=""><var title="">i</var></sub></var> < <var title="">m</var>-1</span> for all integer values of <var title="">i</var> in the range <span>0 ≤ <var title="">i</var> < <var title="">n</var>-1</span>,
where <var title="">m</var> is the value that was last returned by
the <code title=dom-provider-getRowCount><a href=#dom-provider-getrowcount>getRowCount()</a></code>
method when it was passed the <code><a href=#rowspecification>RowSpecification</a></code> object
<var title="">q</var> with <span><var title="">i</var>-1</span>
- items, where <span><var title="">p<sub title=""><var title="">i</var></sub></var> = <var title="">q<sub title=""><var title="">i</var></sub></var></span> for all integer
+ items, where <span><var title="">p<sub title=""><var title="">i</var></sub></var> = <var title="">q<sub title=""><var title="">i</var></sub></var></span> for all integer
values of <var title="">i</var> in the range
- <span>0 ≤ <var title="">i</var> < <var title="">n</var>-1</span>, with any changes implied by the update
+ <span>0 ≤ <var title="">i</var> < <var title="">n</var>-1</span>, with any changes implied by the update
methods taken into account.</p>
<p id=inconsistentDataProvider>The data model is considered
@@ -32333,7 +34436,7 @@
cell's row as the first argument, the cell's column index as the
second, and the checkbox's new state as the third. The state should
be represented by the number 1 if the new state is checked, 0 if the
- new state is unchecked, and −1 if the new state is
+ new state is unchecked, and −1 if the new state is
indeterminate (which must be possible only if the cell has the <code title=datagrid-cell-class-indeterminate><a href=#datagrid-cell-class-indeterminate>indeterminate</a></code> class
set). The <code><a href=#datagrid>datagrid</a></code> must then act as if the
<code><a href=#datagrid>datagrid</a></code>'s <code title=dom-datagrid-updateCellChanged><a href=#dom-datagrid-updatecellchanged>updateCellChanged()</a></code>
@@ -32514,7 +34617,8 @@
<h4 id=the-command><span class=secno>4.11.3 </span>The <dfn><code>command</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#metadata-content-0>Metadata content</a>.</dd>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
@@ -32548,7 +34652,9 @@
<p>The <code title=command-ro><a href=#command-ro>Command</a></code> interface must also be implemented by
this element.</p>
</dd>
- </dl><p>The <code><a href=#the-command>command</a></code> element represents a command that the user
+ </dl>
+
+ <p>The <code><a href=#the-command>command</a></code> element represents a command that the user
can invoke.</p>
<p>The <dfn id=attr-command-type title=attr-command-type><code>type</code></dfn>
@@ -32565,8 +34671,10 @@
keyword maps to the <a href=#attr-command-type-state-radio title=attr-command-type-state-radio>Radio</a> state. The
<i>missing value default</i> is the <a href=#attr-command-type-state-command title=attr-command-type-state-command>Command</a> state.</p>
- <dl><dt>The <dfn id=attr-command-type-state-command title=attr-command-type-state-command>Command</dfn> state</dt>
+ <dl>
+ <dt>The <dfn id=attr-command-type-state-command title=attr-command-type-state-command>Command</dfn> state</dt>
+
<dd><p>The element <a href=#represents>represents</a> a normal command with an associated action.</dd>
<dt>The <dfn id=attr-command-type-state-checkbox title=attr-command-type-state-checkbox>Checkbox</dfn> state</dt>
@@ -32577,7 +34685,9 @@
<dd><p>The element <a href=#represents>represents</a> a selection of one item from a list of items.</dd>
- </dl><p>The <dfn id=attr-command-label title=attr-command-label><code>label</code></dfn>
+ </dl>
+
+ <p>The <dfn id=attr-command-label title=attr-command-label><code>label</code></dfn>
attribute gives the name of the command, as shown to the user.</p>
<p>The <dfn id=attr-command-title title=attr-command-title><code>title</code></dfn>
@@ -32650,7 +34760,9 @@
<!-- XXX should integrate this better with the normal click() method -->
- <dl class=switch><dt>If the <code title=attr-command-type><a href=#attr-command-type>type</a></code> attribute is
+ <dl class=switch>
+
+ <dt>If the <code title=attr-command-type><a href=#attr-command-type>type</a></code> attribute is
in the <a href=#attr-command-type-state-checkbox title=attr-command-type-state-checkbox>Checkbox</a> state</dt>
<dd><p>If the element has a <code title=attr-command-checked><a href=#attr-command-checked>checked</a></code> attribute, the UA must
@@ -32682,7 +34794,9 @@
<dd><p>The UA must <a href=#fire-a-click-event>fire a <code title="">click</code>
event</a> at the element.</dd>
- </dl><p class=note>Firing a synthetic <code title=event-click>click</code> event at the element does not cause
+ </dl>
+
+ <p class=note>Firing a synthetic <code title=event-click>click</code> event at the element does not cause
any of the actions described above to happen.</p>
<p class=XXX>Need to define the command="" attribute</p>
@@ -32694,7 +34808,8 @@
<h4 id=the-bb-element><span class=secno>4.11.4 </span>The <dfn><code>bb</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
<dd><a href=#interactive-content-0>Interactive content</a>.</dd>
@@ -32715,21 +34830,28 @@
<p>The <code title=command-ro><a href=#command-ro>Command</a></code> interface must also
be implemented by this element.</p>
</dd>
- </dl><p>The <code><a href=#the-bb-element>bb</a></code> element represents a user agent command that
+ </dl>
+
+ <p>The <code><a href=#the-bb-element>bb</a></code> element represents a user agent command that
the user can invoke.</p>
<p>The <dfn id=attr-bb-type title=attr-bb-type><code>type</code></dfn> attribute
indicates the kind of command. The <code title=attr-bb-type><a href=#attr-bb-type>type</a></code> attribute is an <a href=#enumerated-attribute>enumerated
attribute</a>. The following table lists the keywords and states
- for the attribute — the keywords in the left column map to the
+ for the attribute — the keywords in the left column map to the
states listed in the cell in the second column on the same row as
the keyword.</p>
- <table><thead><tr><th> Keyword <th> State
- <tbody><tr><td> <dfn id=attr-bb-type-makeapp title=attr-bb-type-makeapp><code>makeapp</code></dfn>
+ <table>
+ <thead> <tr> <th> Keyword <th> State
+ <tbody>
+ <tr>
+ <td> <dfn id=attr-bb-type-makeapp title=attr-bb-type-makeapp><code>makeapp</code></dfn>
<td> <i title=attr-bb-type-makeapp-state><a href=#the-make-application-state>make application</a></i>
- </table><p>The <i>missing value default</i> state is the <i title=attr-bb-type-null-state><a href=#attr-bb-type-null-state>null</a></i> state.</p>
+ </table>
+ <p>The <i>missing value default</i> state is the <i title=attr-bb-type-null-state><a href=#attr-bb-type-null-state>null</a></i> state.</p>
+
<p>Each state has an <i>action</i> and a <i>relevance</i>, defined
in the following sections.</p>
@@ -32827,7 +34949,7 @@
<p>This could look like this:</p>
- <p><img alt='"Settings | Download standalone application | Help | Sign out"' src=images/sample-makeapp.png></p>
+ <p><img alt='"Settings | Download standalone application | Help | Sign out"' src=images/sample-makeapp.png></p>
</div>
@@ -32860,7 +34982,8 @@
<h4 id=menus><span class=secno>4.11.5 </span>The <dfn><code>menu</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dd>If the element's <code title=attr-menu-type><a href=#attr-menu-type>type</a></code> attribute is in the <a href=#tool-bar-state title="tool bar state">tool bar</a> state: <a href=#interactive-content-0>Interactive content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
@@ -32878,8 +35001,10 @@
attribute DOMString <a href=#dom-menu-type title=dom-menu-type>type</a>;
attribute DOMString <a href=#dom-menu-label title=dom-menu-label>label</a>;
};</pre>
- </dl><p>The <code><a href=#menus>menu</a></code> element represents a list of commands.</p>
+ </dl>
+ <p>The <code><a href=#menus>menu</a></code> element represents a list of commands.</p>
+
<p>The <dfn id=attr-menu-type title=attr-menu-type><code>type</code></dfn> attribute
is an <a href=#enumerated-attribute>enumerated attribute</a> indicating the kind of menu
being declared. The attribute has three states. The <code title=attr-menu-type-context>context</code> keyword maps to the
@@ -33028,16 +35153,21 @@
<p>A menu (or tool bar) consists of a list of zero or more of the
following components:</p>
- <ul class=brief><li><a href=#concept-command title=concept-command>Commands</a>, which can be marked as default commands</li>
+ <ul class=brief>
+ <li><a href=#concept-command title=concept-command>Commands</a>, which can be marked as default commands</li>
<li>Separators</li>
<li>Other menus (which allows the list to be nested)</li>
- </ul><p>The list corresponding to a particular <code><a href=#menus>menu</a></code> element
+ </ul>
+
+ <p>The list corresponding to a particular <code><a href=#menus>menu</a></code> element
is built by iterating over its child nodes. For each child node in
<a href=#tree-order>tree order</a>, the required behavior depends on what the
node is, as follows:</p>
- <dl class=switch><dt>An element that <a href=#concept-command title=concept-command>defines a command</a></dt>
+ <dl class=switch>
+ <dt>An element that <a href=#concept-command title=concept-command>defines a command</a></dt>
+
<dd>Append the command to the menu, respecting its <a href=#concept-facet title=concept-facet>facets</a><!-- XXX be explicit about what
this means for each facet -->. If the element is a
<code><a href=#the-command>command</a></code> element with a <code title=attr-command-default><a href=#attr-command-default>default</a></code> attribute, mark the
@@ -33086,7 +35216,9 @@
<dd><a href=#ignore>Ignore</a> the node.</dd>
- </dl><p class=XXX>We should support <code><a href=#the-label-element>label</a></code> in the
+ </dl>
+
+ <p class=XXX>We should support <code><a href=#the-label-element>label</a></code> in the
algorithm above -- just iterate through the contents like with
<code><a href=#the-li-element>li</a></code>, to support <code><a href=#the-input-element>input</a></code> elements in
<code><a href=#the-label-element>label</a></code> elements. Also, <code><a href=#the-optgroup-element>optgroup</a></code> elements
@@ -33098,14 +35230,19 @@
<p>Once all the nodes have been processed as described above, the
user agent must the post-process the menu as follows:</p>
- <ol><li>Any menu item with no label, or whose label is the empty string, must be removed.</li>
+ <ol>
+ <li>Any menu item with no label, or whose label is the empty string, must be removed.</li>
+
<li>Any sequence of two or more separators in a row must be collapsed to a single separator.</li>
<li>Any separator at the start or end of the menu must be removed.</li>
- </ol><h5 id=context-menus><span class=secno>4.11.5.3 </span><dfn>Context menus</dfn></h5>
+ </ol>
+
+ <h5 id=context-menus><span class=secno>4.11.5.3 </span><dfn>Context menus</dfn></h5>
+
<p>The <dfn id=attr-contextmenu title=attr-contextmenu><code>contextmenu</code></dfn>
attribute gives the element's <a href=#context-menus title="context menus">context
menu</a>. The value must be the ID of a <code><a href=#menus>menu</a></code> element
@@ -33190,8 +35327,10 @@
<p id=facets>Commands are defined to have the following
<dfn id=concept-facet title=concept-facet>facets</dfn>:</p>
- <dl><dt><dfn id=command-facet-type title=command-facet-Type>Type</dfn></dt>
+ <dl>
+ <dt><dfn id=command-facet-type title=command-facet-Type>Type</dfn></dt>
+
<dd>The kind of command: "command", meaning it is a normal command;
"radio", meaning that triggering the command will, amongst other
things, set the <a href=#command-facet-checkedstate title=command-facet-CheckedState>Checked
@@ -33247,7 +35386,9 @@
defining the command is on the list, since other elements have no
way to refer to it.</dd>
- </dl><p>Commands are represented by elements in the DOM. Any element that
+ </dl>
+
+ <p>Commands are represented by elements in the DOM. Any element that
can define a command also implements the <code title=command-ro><a href=#command-ro>Command</a></code> interface:</p>
<p class=XXX>Actually even better would be to just mix it
@@ -33624,7 +35765,8 @@
<h4 id=the-legend-element><span class=secno>4.12.1 </span>The <dfn><code>legend</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd>None.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>As the first child of a <code><a href=#the-fieldset-element>fieldset</a></code> element.</dd>
@@ -33640,7 +35782,9 @@
readonly attribute <a href=#htmlformelement>HTMLFormElement</a> <a href=#dom-legend-form title=dom-legend-form>form</a>;
};</pre>
</dd>
- </dl><p>The <code><a href=#the-legend-element>legend</a></code> element <a href=#represents>represents</a> a title or explanatory
+ </dl>
+
+ <p>The <code><a href=#the-legend-element>legend</a></code> element <a href=#represents>represents</a> a title or explanatory
caption for the rest of the contents of the <code><a href=#the-legend-element>legend</a></code>
element's parent element.</p>
@@ -33655,7 +35799,8 @@
<h4 id=the-div-element><span class=secno>4.12.2 </span>The <dfn><code>div</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
+ <dl class=element>
+ <dt>Categories</dt>
<dd><a href=#flow-content-0>Flow content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>Where <a href=#flow-content-0>flow content</a> is expected.</dd>
@@ -33665,7 +35810,9 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><p>The <code><a href=#the-div-element>div</a></code> element has no special meaning at all. It
+ </dl>
+
+ <p>The <code><a href=#the-div-element>div</a></code> element has no special meaning at all. It
<a href=#represents>represents</a> its children. It can be used with the <code title=attr-class><a href=#classes>class</a></code>, <code title=attr-lang><a href=#the-lang-and-xml:lang-attributes>lang</a></code>/<code title=attr-xml-lang><a href=#the-lang-and-xml:lang-attributes>xml:lang</a></code>, and <code title=attr-title><a href=#the-title-attribute>title</a></code> attributes to mark up semantics
common to a group of consecutive elements.</p>
@@ -33687,7 +35834,9 @@
HTML. This section defines when these selectors match HTML
elements.</p>
- <dl><dt><dfn id=selector-link title=selector-link><code>:link</code></dfn></dt>
+ <dl>
+
+ <dt><dfn id=selector-link title=selector-link><code>:link</code></dfn></dt>
<dt><dfn id=selector-visited title=selector-visited><code>:visited</code></dfn></dt>
<dd>
@@ -33709,8 +35858,10 @@
to activate the element and the time the users stops activating
the element:</p>
- <ul><li><code><a href=#the-a-element>a</a></code> elements that have an <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute</li>
+ <ul>
+ <li><code><a href=#the-a-element>a</a></code> elements that have an <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute</li>
+
<li><code><a href=#the-area-element>area</a></code> elements that have an <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute</li>
<li><code><a href=#the-link-element>link</a></code> elements that have an <code title=attr-link-href><a href=#attr-link-href>href</a></code> attribute</li>
@@ -33726,7 +35877,9 @@
<li>any other element, if it is <a href=#focusable>focusable</a></li>
- </ul><p class=example>For example, if the user is using a keyboard to
+ </ul>
+
+ <p class=example>For example, if the user is using a keyboard to
push a <code><a href=#the-button-element>button</a></code> element by pressing the space bar, the
element would match this pseudo-class in between the time that the
element received the <code title=event-keydown>keydown</code>
@@ -33742,8 +35895,10 @@
<p>The <code title=selector-enabled><a href=#selector-enabled>:enabled</a></code> pseudo-class
must match the following elements:</p>
- <ul><li><code><a href=#the-a-element>a</a></code> elements that have an <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute</li>
+ <ul>
+ <li><code><a href=#the-a-element>a</a></code> elements that have an <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute</li>
+
<li><code><a href=#the-area-element>area</a></code> elements that have an <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute</li>
<li><code><a href=#the-link-element>link</a></code> elements that have an <code title=attr-link-href><a href=#attr-link-href>href</a></code> attribute</li>
@@ -33773,9 +35928,11 @@
<li>any other element, if it is <a href=#focusable>focusable</a></li>
- </ul></dd>
+ </ul>
+ </dd>
+
<dt><dfn id=selector-disabled title=selector-disabled><code>:disabled</code></dfn></dt>
<dd>
@@ -33783,7 +35940,9 @@
<p>The <code title=selector-disabled><a href=#selector-disabled>:disabled</a></code>
pseudo-class must match the following elements:</p>
- <ul><li><code><a href=#the-bb-element>bb</a></code> elements whose <code title=attr-bb-type><a href=#attr-bb-type>type</a></code> attribute is in a state whose
+ <ul>
+
+ <li><code><a href=#the-bb-element>bb</a></code> elements whose <code title=attr-bb-type><a href=#attr-bb-type>type</a></code> attribute is in a state whose
<i>relevance</i> is false</li>
<li><code><a href=#the-button-element>button</a></code> elements that are <a href=#concept-fe-disabled title=concept-fe-disabled>disabled</a></li>
@@ -33806,9 +35965,11 @@
first such element's <a href=#command-facet-disabledstate title=command-facet-disabledstate>Disabled State</a> facet
is true (disabled)</li>
- </ul></dd>
+ </ul>
+ </dd>
+
<dt><dfn id=selector-checked title=selector-checked><code>:checked</code></dfn></dt>
<dd>
@@ -33816,7 +35977,9 @@
<p>The <code title=selector-checked><a href=#selector-checked>:checked</a></code> pseudo-class
must match the following elements:</p>
- <ul><li><code><a href=#the-input-element>input</a></code> elements whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#checkbox-state title=attr-input-type-checkbox>Checkbox</a> state and whose
+ <ul>
+
+ <li><code><a href=#the-input-element>input</a></code> elements whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#checkbox-state title=attr-input-type-checkbox>Checkbox</a> state and whose
<a href=#concept-fe-checked title=concept-fe-checked>checkedness</a> state is
true</li>
@@ -33832,9 +35995,11 @@
have a <code title=attr-command-checked><a href=#attr-command-checked>checked</a></code>
attribute</li>
- </ul></dd>
+ </ul>
+ </dd>
+
<dt><dfn id=selector-indeterminate title=selector-indeterminate><code>:indeterminate</code></dfn></dt>
<dd>
@@ -33854,7 +36019,9 @@
<p>The <code title=selector-default><a href=#selector-default>:default</a></code> pseudo-class
must match the following elements:</p>
- <ul><li><code><a href=#the-button-element>button</a></code> elements that are their form's
+ <ul>
+
+ <li><code><a href=#the-button-element>button</a></code> elements that are their form's
<a href=#default-button>default button</a></li>
<li><code><a href=#the-input-element>input</a></code> elements whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#submit-button-state title=attr-input-type-submit>Submit Button</a> or <a href=#image-button-state title=attr-input-type-image>Image Button</a> state, and that
@@ -33862,9 +36029,11 @@
<li><code><a href=#the-command>command</a></code> elements that have a <code title=attr-command-default><a href=#attr-command-default>default</a></code> attribute</li>
- </ul></dd>
+ </ul>
+ </dd>
+
<dt><dfn id=selector-valid title=selector-valid><code>:valid</code></dfn></dt>
<dd>
@@ -33923,14 +36092,18 @@
<p>The <code title=selector-required><a href=#selector-required>:required</a></code>
pseudo-class must match the following elements:</p>
- <ul><li><code><a href=#the-input-element>input</a></code> elements that are <i title=concept-input-required><a href=#concept-input-required>required</a></i></li>
+ <ul>
+ <li><code><a href=#the-input-element>input</a></code> elements that are <i title=concept-input-required><a href=#concept-input-required>required</a></i></li>
+
<li><code><a href=#the-textarea-element>textarea</a></code> elements that have a <code title=attr-textarea-required><a href=#attr-textarea-required>required</a></code>
attribute</li>
- </ul></dd>
+ </ul>
+ </dd>
+
<dt><dfn id=selector-optional title=selector-optional><code>:optional</code></dfn></dt>
<dd>
@@ -33938,8 +36111,10 @@
<p>The <code title=selector-optional><a href=#selector-optional>:optional</a></code>
pseudo-class must match the following elements:</p>
- <ul><li><code><a href=#the-button-element>button</a></code> elements</li>
+ <ul>
+ <li><code><a href=#the-button-element>button</a></code> elements</li>
+
<li><code><a href=#the-input-element>input</a></code> elements that are not <i title=concept-input-required><a href=#concept-input-required>required</a></i></li>
<li><code><a href=#the-select-element>select</a></code> elements</li>
@@ -33947,9 +36122,11 @@
<li><code><a href=#the-textarea-element>textarea</a></code> elements that do not have a <code title=attr-textarea-required><a href=#attr-textarea-required>required</a></code>
attribute</li>
- </ul></dd>
+ </ul>
+ </dd>
+
<dt><dfn id=selector-read-only title=selector-read-only><code>:read-only</code></dfn></dt>
<dt><dfn id=selector-read-write title=selector-read-write><code>:read-write</code></dfn></dt>
@@ -33958,7 +36135,9 @@
<p>The <code title=selector-read-write><a href=#selector-read-write>:read-write</a></code>
pseudo-class must match the following elements:</p>
- <ul><li><code><a href=#the-input-element>input</a></code> elements to which the <code title=attr-input-readonly><a href=#attr-input-readonly>readonly</a></code> attribute applies,
+ <ul>
+
+ <li><code><a href=#the-input-element>input</a></code> elements to which the <code title=attr-input-readonly><a href=#attr-input-readonly>readonly</a></code> attribute applies,
but that are not <i title=concept-input-immutable><a href=#concept-input-immutable>immutable</a></i>
(i.e. that do not have the <code title=attr-input-readonly><a href=#attr-input-readonly>readonly</a></code> attribute specified
and that are not <a href=#concept-fe-disabled title=concept-fe-disabled>disabled</a>)</li>
@@ -33968,12 +36147,16 @@
<li>any element that is <a href=#editable>editable</a></li>
- </ul><p>The <code title=selector-read-only><a href=#selector-read-only>:read-only</a></code>
+ </ul>
+
+ <p>The <code title=selector-read-only><a href=#selector-read-only>:read-only</a></code>
pseudo-class must match all other <a href=#html-elements>HTML elements</a>.</p>
</dd>
- </dl><p class=note>Another section of this specification defines the
+ </dl>
+
+ <p class=note>Another section of this specification defines the
<i><a href=#target-element>target element</a></i> used with the <code title=selector-target>:target</code> pseudo-class.</p>
<p class=note>This specification does not define when an element
@@ -34044,7 +36227,9 @@
data mining tools are likely to never instantiate browsing
contexts.</p>
- <hr><p>A <a href=#browsing-context>browsing context</a> can have a <dfn id=creator-browsing-context>creator browsing
+ <hr>
+
+ <p>A <a href=#browsing-context>browsing context</a> can have a <dfn id=creator-browsing-context>creator browsing
context</dfn>, the <a href=#browsing-context>browsing context</a> that was
responsible for its creation. Unless otherwise specified, a
<a href=#browsing-context>browsing context</a> has no <a href=#creator-browsing-context>creator browsing
@@ -34154,7 +36339,9 @@
<code>Document</code> <var title="">d</var>, on getting, must run
the following algorithm:</p>
- <ol><li><p>If <var title="">d</var> is not a <code>Document</code> in a
+ <ol>
+
+ <li><p>If <var title="">d</var> is not a <code>Document</code> in a
<a href=#child-browsing-context>child browsing context</a>, return null and abort these
steps.</li>
@@ -34166,8 +36353,12 @@
<li><p>Otherwise, return the <a href=#browsing-context-container>browsing context
container</a> for <var title="">b</var>.</li>
- </ol><h4 id=auxiliary-browsing-contexts><span class=secno>5.1.2 </span>Auxiliary browsing contexts</h4>
+ </ol>
+
+
+ <h4 id=auxiliary-browsing-contexts><span class=secno>5.1.2 </span>Auxiliary browsing contexts</h4>
+
<p>It is possible to create new browsing contexts that are related
to a <span>top level browsing context</span> without being nested
through an element. Such browsing contexts are called <dfn id=auxiliary-browsing-context title="auxiliary browsing context">auxiliary browsing
@@ -34209,7 +36400,9 @@
context</a> <var title="">B</var> if one of the following
conditions is true:</p>
- <ul><li>Either the <a href=#origin-0>origin</a> of the <a href=#active-document>active
+ <ul>
+
+ <li>Either the <a href=#origin-0>origin</a> of the <a href=#active-document>active
document</a> of <var title="">A</var> is the <a href=#same-origin title="same
origin">same</a> as the <a href=#origin-0>origin</a> of the <a href=#active-document>active
document</a> of <var title="">B</var>, or</li>
@@ -34231,13 +36424,18 @@
document</a> of <var title="">A</var> (possibly in fact being
<var title="">A</var> itself).</li>
- </ul><h4 id=groupings-of-browsing-contexts><span class=secno>5.1.5 </span>Groupings of browsing contexts</h4>
+ </ul>
+
+ <h4 id=groupings-of-browsing-contexts><span class=secno>5.1.5 </span>Groupings of browsing contexts</h4>
+
<p>Each <a href=#browsing-context>browsing context</a> is defined as having a list of
zero or more <dfn id=directly-reachable-browsing-contexts>directly reachable browsing contexts</dfn>. These
are:</p>
- <ul><li>All the <a href=#browsing-context>browsing context</a>'s <a href=#child-browsing-context title="child
+ <ul>
+
+ <li>All the <a href=#browsing-context>browsing context</a>'s <a href=#child-browsing-context title="child
browsing context">child browsing contexts</a>.</li>
<li>The <a href=#browsing-context>browsing context</a>'s <a href=#parent-browsing-context>parent browsing
@@ -34250,7 +36448,9 @@
<li>The <a href=#browsing-context>browsing context</a>'s <a href=#opener-browsing-context>opener browsing
context</a>.</li>
- </ul><p>The transitive closure of all the <a href=#browsing-context title="browsing
+ </ul>
+
+ <p>The transitive closure of all the <a href=#browsing-context title="browsing
context">browsing contexts</a> that are <a href=#directly-reachable-browsing-contexts>directly reachable
browsing contexts</a> forms a <dfn id=unit-of-related-browsing-contexts>unit of related browsing
contexts</dfn>.</p>
@@ -34290,7 +36490,9 @@
context name</dfn> are as follows. The rules assume that they are
being applied in the context of a <a href=#browsing-context>browsing context</a>.</p>
- <ol><li><p>If the given browsing context name is the empty string or
+ <ol>
+
+ <li><p>If the given browsing context name is the empty string or
<code title="">_self</code>, then the chosen browsing context must
be the current one.</li>
@@ -34324,7 +36526,9 @@
happens depends on the user agent's configuration and/or
abilities:</p>
- <dl><dt id=sandboxWindowOpen>If the current browsing context has
+ <dl>
+
+ <dt id=sandboxWindowOpen>If the current browsing context has
the <a href=#sandboxed-navigation-browsing-context-flag>sandboxed navigation browsing context flag</a>
set.</dt>
@@ -34372,14 +36576,20 @@
<dd>There must not be a chosen browsing context.</dd>
- </dl><p>User agent implementors are encouraged to provide a way for
+ </dl>
+
+ <p>User agent implementors are encouraged to provide a way for
users to configure the user agent to always reuse the current
browsing context.</p>
</li>
- </ol><h3 id=the-windowproxy-object><span class=secno>5.2 </span>The <code><a href=#windowproxy>WindowProxy</a></code> object</h3>
+ </ol>
+
+
+ <h3 id=the-windowproxy-object><span class=secno>5.2 </span>The <code><a href=#windowproxy>WindowProxy</a></code> object</h3>
+
<p>As mentioned earlier, each <a href=#browsing-context>browsing context</a> has a
<dfn id=windowproxy>WindowProxy</dfn> object. This object is unusual in that it
must proxy all operations to the <code><a href=#window>Window</a></code> object of the
@@ -34504,8 +36714,10 @@
<code>Document</code>'s <a href=#effective-script-origin>effective script origin</a>, with
the following exceptions:</p>
- <ul><li>The <code title=dom-location><a href=#dom-location>location</a></code> object
+ <ul>
+ <li>The <code title=dom-location><a href=#dom-location>location</a></code> object
+
<li>The <code title=dom-window-postMessage-2><a href=#dom-window-postmessage-2>postMessage()</a></code>
method with two arguments
@@ -34516,11 +36728,13 @@
<li>The <a href=#dynamic-nested-browsing-context-properties>dynamic nested browsing context properties</a>
- </ul><p>User agents must not allow scripts to override the <code title=dom-location><a href=#dom-location>location</a></code> object's setter.</p>
+ </ul>
+ <p>User agents must not allow scripts to override the <code title=dom-location><a href=#dom-location>location</a></code> object's setter.</p>
+
<h4 id=apis-for-creating-and-navigating-browsing-contexts-by-name><span class=secno>5.3.2 </span>APIs for creating and navigating browsing contexts by name</h4>
<p>The <dfn id=dom-open title=dom-open><code>open()</code></dfn> method on
@@ -34590,7 +36804,9 @@
<a href=#browsing-context>browsing context</a> that was navigated, or null if no
browsing context was navigated.</p>
- <hr><p>The <dfn id=dom-name title=dom-name><code>name</code></dfn> attribute of
+ <hr>
+
+ <p>The <dfn id=dom-name title=dom-name><code>name</code></dfn> attribute of
the <code><a href=#window>Window</a></code> object must, on getting, return the current
name of the <a href=#browsing-context>browsing context</a>, and, on setting, set the
name of the <a href=#browsing-context>browsing context</a> to the new value.</p>
@@ -34598,7 +36814,9 @@
<p class=note>The name <a href=#resetBCName>gets reset</a> when
the browsing context is navigated to another domain.</p>
- <hr><p>The <dfn id=dom-window-close title=dom-window-close><code>close()</code></dfn>
+ <hr>
+
+ <p>The <dfn id=dom-window-close title=dom-window-close><code>close()</code></dfn>
method on <code><a href=#window>Window</a></code> objects should, if the corresponding
<a href=#browsing-context>browsing context</a> <var title="">A</var> is an
<a href=#auxiliary-browsing-context>auxiliary browsing context</a> that was created by a script
@@ -34680,7 +36898,9 @@
properties">supports named properties</span>. The <span>names of the
supported named properties</span> at any moment consist of:</p>
- <ul><li>The value of the <code title="">name</code> content attribute
+ <ul>
+
+ <li>The value of the <code title="">name</code> content attribute
for all <code><a href=#the-a-element>a</a></code>, <code><a href=#the-applet-element>applet</a></code>, <code><a href=#the-area-element>area</a></code>,
<code><a href=#the-embed-element>embed</a></code>, <code>frame</code>, <code>frameset</code>,
<code><a href=#the-form-element>form</a></code>, <code><a href=#the-iframe-element>iframe</a></code>, <code><a href=#the-img-element>img</a></code>, and
@@ -34691,12 +36911,16 @@
attribute of any <a href=#html-elements title="HTML elements">HTML element</a> in
the <a href=#active-document>active document</a> with an <code title=attr-id><a href=#the-id-attribute>id</a></code> content attribute.</li>
- </ul><p>When <dfn id=dom-window-nameditem title=dom-window-namedItem>the <code>Window</code>
+ </ul>
+
+ <p>When <dfn id=dom-window-nameditem title=dom-window-namedItem>the <code>Window</code>
object is indexed for property retrieval</dfn> using a name <var title="">name</var>, then the user agent must return the value
obtained using the following steps:</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>Let <var title="">elements</var> be the list of <a href=#dom-window-nameditem-filter title=dom-window-namedItem-filter>named elements</a> with the
name <var title="">name</var> in the <a href=#active-document>active document</a>.
@@ -34732,19 +36956,27 @@
</li>
- </ol><p><dfn id=dom-window-nameditem-filter title=dom-window-nameditem-filter>Named elements</dfn>
+ </ol>
+
+ <p><dfn id=dom-window-nameditem-filter title=dom-window-nameditem-filter>Named elements</dfn>
with the name <var title="">name</var>, for the purposes of the
above algorithm, are those that are either:</p>
- <ul><li><code><a href=#the-a-element>a</a></code>, <code><a href=#the-applet-element>applet</a></code>, <code><a href=#the-area-element>area</a></code>,
+ <ul>
+
+ <li><code><a href=#the-a-element>a</a></code>, <code><a href=#the-applet-element>applet</a></code>, <code><a href=#the-area-element>area</a></code>,
<code><a href=#the-embed-element>embed</a></code>, <code><a href=#the-form-element>form</a></code>, <code>frame</code>,
<code>frameset</code>, <code><a href=#the-iframe-element>iframe</a></code>, <code><a href=#the-img-element>img</a></code>, or
<code><a href=#the-object-element>object</a></code> elements that have a <code title=attr-name>name</code> content attribute whose value is <var title="">name</var>, or</li>
<li><a href=#html-elements>HTML elements</a> elements that have an <code title=attr-id><a href=#the-id-attribute>id</a></code> content attribute whose value is <var title="">name</var>.</li>
- </ul><h4 id=browser-interface-elements><span class=secno>5.3.6 </span>Browser interface elements</h4>
+ </ul>
+
+
+ <h4 id=browser-interface-elements><span class=secno>5.3.6 </span>Browser interface elements</h4>
+
<p>To allow Web pages to integrate with Web browsers, certain Web
browser interface elements are exposed in a limited way to scripts
in Web pages.</p>
@@ -34770,8 +37002,10 @@
as if it was present and visible (i.e. its <code title=dom-BarProp-visible><a href=#dom-barprop-visible>visible</a></code> attribute must return
true).</p>
- <dl><dt><dfn id=the-location-bar-barprop-object>The location bar <code>BarProp</code> object</dfn></dt>
+ <dl>
+ <dt><dfn id=the-location-bar-barprop-object>The location bar <code>BarProp</code> object</dfn></dt>
+
<dd>Represents the user interface element that contains a control
that displays the <a href=#url>URL</a> of the <a href=#active-document>active
document</a>, or some similar interface concept.</dd>
@@ -34809,7 +37043,9 @@
interface element was absent (i.e. its <code title=dom-BarProp-visible><a href=#dom-barprop-visible>visible</a></code> attribute may return
false).</dd>
- </dl><p>The <dfn id=dom-window-locationbar title=dom-window-locationbar><code>locationbar</code></dfn>
+ </dl>
+
+ <p>The <dfn id=dom-window-locationbar title=dom-window-locationbar><code>locationbar</code></dfn>
attribute must return <a href=#the-location-bar-barprop-object>the location bar <code>BarProp</code>
object</a>.</p>
@@ -34856,15 +37092,19 @@
<p>These characteristics are defined as follows:</p>
- <dl><dt>For URLs</dt>
+ <dl>
+ <dt>For URLs</dt>
+
<dd>
<p>The <a href=#origin-0>origin</a> and <a href=#effective-script-origin>effective script
origin</a> of the <a href=#url>URL</a> is whatever is returned by
the following algorithm:</p>
- <ol><li><p>Let <var title="">url</var> be the <a href=#url>URL</a> for
+ <ol>
+
+ <li><p>Let <var title="">url</var> be the <a href=#url>URL</a> for
which the <a href=#origin-0>origin</a> is being determined.</li>
<li><p><a href=#parse-a-url title="parse a url">Parse</a> <var title="">url</var>.</li>
@@ -34910,7 +37150,9 @@
<li><p>Return the tuple (<var title="">scheme</var>, <var title="">host</var>, <var title="">port</var>).</li>
- </ol><p>In addition, if the <a href=#url>URL</a> is in fact associated with
+ </ol>
+
+ <p>In addition, if the <a href=#url>URL</a> is in fact associated with
a <code>Document</code> object that was created by parsing the
resource obtained from fetching <a href=#url>URL</a>, and this was
done over a secure connection, then the server's secure
@@ -34926,8 +37168,10 @@
origin</a> of a script are determined from another resource,
called the <i>owner</i>:</p>
- <dl class=switch><dt>If a script is in a <code><a href=#script>script</a></code> element</dt>
+ <dl class=switch>
+ <dt>If a script is in a <code><a href=#script>script</a></code> element</dt>
+
<dd>The owner is the <code>Document</code> to which the
<code><a href=#script>script</a></code> element belongs.</dd>
@@ -34988,7 +37232,9 @@
<dd>The owner is the script that provided the URL.</dd>
- </dl><p>The <a href=#origin-0>origin</a> of the script is then equal to the
+ </dl>
+
+ <p>The <a href=#origin-0>origin</a> of the script is then equal to the
<a href=#origin-0>origin</a> of the owner, and the <a href=#effective-script-origin>effective script
origin</a> of the script is equal to the <a href=#effective-script-origin>effective script
origin</a> of the owner.</p>
@@ -34999,7 +37245,9 @@
<dd>
- <dl class=switch><dt id=sandboxOrigin>If a <code>Document</code> is in a
+ <dl class=switch>
+
+ <dt id=sandboxOrigin>If a <code>Document</code> is in a
<a href=#browsing-context>browsing context</a> whose <a href=#sandboxed-origin-browsing-context-flag>sandboxed origin
browsing context flag</a> is set</dt>
@@ -35072,7 +37320,9 @@
<dd>The <a href=#origin-0>origin</a> is a globally unique identifier
assigned when the <code>Document</code> or image is created.</dd>
- </dl><p>When a <code>Document</code> is created, unless stated
+ </dl>
+
+ <p>When a <code>Document</code> is created, unless stated
otherwise above, its <a href=#effective-script-origin>effective script origin</a> is
initialized to the <a href=#origin-0>origin</a> of the
<code>Document</code>. However, the <code title=dom-document-domain><a href=#dom-document-domain>document.domain</a></code> attribute can
@@ -35080,11 +37330,15 @@
</dd>
- </dl><p>The <dfn id=unicode-serialization-of-an-origin>Unicode serialization of an origin</dfn> is the string
+ </dl>
+
+ <p>The <dfn id=unicode-serialization-of-an-origin>Unicode serialization of an origin</dfn> is the string
obtained by applying the following algorithm to the given
<a href=#origin-0>origin</a>:</p>
- <ol><li><p>If the <a href=#origin-0>origin</a> in question is not a
+ <ol>
+
+ <li><p>If the <a href=#origin-0>origin</a> in question is not a
scheme/host/port tuple, then return the literal string "<code title="">null</code>" and abort these steps.</li>
<li><p>Otherwise, let <var title="">result</var> be the scheme part
@@ -35094,8 +37348,8 @@
<li><p>Apply the IDNA ToUnicode algorithm to each component of the
host part of the <a href=#origin-0>origin</a> tuple, and append the results
- — each component, in the same order, separated by U+002E FULL
- STOP characters (".") — to <var title="">result</var>.</li>
+ — each component, in the same order, separated by U+002E FULL
+ STOP characters (".") — to <var title="">result</var>.</li>
<li><p>If the port part of the <a href=#origin-0>origin</a> tuple gives a port
that is different from the default port for the protocol given by
@@ -35105,11 +37359,16 @@
<li><p>Return <var title="">result</var>.</li>
- </ol><p>The <dfn id=ascii-serialization-of-an-origin>ASCII serialization of an origin</dfn> is the string
+ </ol>
+
+
+ <p>The <dfn id=ascii-serialization-of-an-origin>ASCII serialization of an origin</dfn> is the string
obtained by applying the following algorithm to the given
<a href=#origin-0>origin</a>:</p>
- <ol><li><p>If the <a href=#origin-0>origin</a> in question is not a
+ <ol>
+
+ <li><p>If the <a href=#origin-0>origin</a> in question is not a
scheme/host/port tuple, then return the literal string "<code title="">null</code>" and abort these steps.</li>
<li><p>Otherwise, let <var title="">result</var> be the scheme part
@@ -35137,10 +37396,15 @@
<li><p>Return <var title="">result</var>.</li>
- </ol><p>Two <a href=#origin-0 title=origin>origins</a> are said to be the
+ </ol>
+
+
+ <p>Two <a href=#origin-0 title=origin>origins</a> are said to be the
<dfn id=same-origin>same origin</dfn> if the following algorithm returns true:</p>
- <ol><li><p>Let <var title="">A</var> be the first <a href=#origin-0>origin</a>
+ <ol>
+
+ <li><p>Let <var title="">A</var> be the first <a href=#origin-0>origin</a>
being compared, and <var title="">B</var> be the second
<a href=#origin-0>origin</a> being compared.</li>
@@ -35166,8 +37430,11 @@
<li><p>Return true.</li>
- </ol><h4 id=relaxing-the-same-origin-restriction><span class=secno>5.4.1 </span>Relaxing the same-origin restriction</h4>
+ </ol>
+
+ <h4 id=relaxing-the-same-origin-restriction><span class=secno>5.4.1 </span>Relaxing the same-origin restriction</h4>
+
<p>The <dfn id=dom-document-domain title=dom-document-domain><code>domain</code></dfn>
attribute on <code>Document</code> objects must be initialized to
<a href="#the-document's-domain">the document's domain</a>, if it has one, and the empty
@@ -35177,8 +37444,10 @@
<code><a href=#invalid_access_err>INVALID_ACCESS_ERR</a></code> exception. On setting, the user
agent must run the following algorithm:</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>If the document was created by <code>XMLHttpRequest</code>,
throw an <code><a href=#invalid_access_err>INVALID_ACCESS_ERR</a></code> exception and abort these
steps.</p>
@@ -35204,8 +37473,10 @@
current value of the <code title=dom-document-domain><a href=#dom-document-domain>document.domain</a></code> attribute, then
run these substeps:</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>If the current value is an IP address, throw a <code><a href=#security_err>SECURITY_ERR</a></code>
exception and abort these steps.</p>
@@ -35236,8 +37507,10 @@
</li>
- </ol></li>
+ </ol>
+ </li>
+
<li>
<p>Set the attribute's value to <var title="">new value</var>.</p>
@@ -35262,7 +37535,9 @@
</li>
- </ol><p>The <dfn id="the-document's-domain" title="the document's domain">domain</dfn> of a
+ </ol>
+
+ <p>The <dfn id="the-document's-domain" title="the document's domain">domain</dfn> of a
<code>Document</code> is the host part of the document's
<a href=#origin-0>origin</a>, if that is a scheme/host/port tuple. If it
isn't, then the document does not have a domain.</p>
@@ -35281,8 +37556,10 @@
run in the context of a document. These mechanisms include, but are
probably not limited to:</p>
- <ul><li>Processing of <code><a href=#script>script</a></code> elements.</li>
+ <ul>
+ <li>Processing of <code><a href=#script>script</a></code> elements.</li>
+
<li>Processing of inline <code title="javascript
protocol"><a href=#javascript-protocol>javascript:</a></code> URLs (e.g. the <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute of <code><a href=#the-img-element>img</a></code>
elements, or an <code title="">@import</code> rule in a CSS
@@ -35295,14 +37572,21 @@
<li>Processing of technologies like XBL or SVG that have their own
scripting features.</li>
- </ul><h4 id=enabling-and-disabling-scripting><span class=secno>5.5.2 </span>Enabling and disabling scripting</h4>
+ </ul>
+
+
+
+ <h4 id=enabling-and-disabling-scripting><span class=secno>5.5.2 </span>Enabling and disabling scripting</h4>
+
<p><dfn id=concept-bc-script title=concept-bc-script>Scripting is enabled</dfn> in a
<em><a href=#browsing-context>browsing context</a></em> when all of the
following conditions are true:</p>
- <ul><li>The user agent supports scripting.</li>
+ <ul>
+ <li>The user agent supports scripting.</li>
+
<li>The user has not disabled scripting for this <a href=#browsing-context>browsing
context</a> at this time. (User agents may provide users with
the option to disable scripting globally, or in a finer-grained
@@ -35312,11 +37596,15 @@
does not have the <a href=#sandboxed-scripts-browsing-context-flag>sandboxed scripts browsing context
flag</a> set.</li>
- </ul><p><dfn id=concept-bc-noscript title=concept-bc-noscript>Scripting is disabled</dfn> in a
+ </ul>
+
+ <p><dfn id=concept-bc-noscript title=concept-bc-noscript>Scripting is disabled</dfn> in a
<a href=#browsing-context>browsing context</a> when any of the above conditions are
false (i.e. when scripting is not <a href=#concept-bc-script title=concept-bc-script>enabled</a>).</p>
- <hr><p><dfn id=concept-n-script title=concept-n-script>Scripting is enabled</dfn> for a
+ <hr>
+
+ <p><dfn id=concept-n-script title=concept-n-script>Scripting is enabled</dfn> for a
<em>node</em> if the <code>Document</code> object of the node (the
node itself, if it is itself a <code>Document</code> object) has an
associated <a href=#browsing-context>browsing context</a>, and <a href=#concept-bc-script title=concept-bc-script>scripting is enabled</a> in that
@@ -35335,8 +37623,10 @@
<p>A <dfn id=concept-script title=concept-script>script</dfn> has:</p>
- <dl><dt>A <dfn id=script-execution-environment>script execution environment</dfn></dt>
+ <dl>
+ <dt>A <dfn id=script-execution-environment>script execution environment</dfn></dt>
+
<dd>
<p>The characteristics of the script execution environment depend
@@ -35427,14 +37717,20 @@
</dd>
- </dl><h5 id=calling-scripts><span class=secno>5.5.3.2 </span>Calling scripts</h5>
+ </dl>
+
+
+ <h5 id=calling-scripts><span class=secno>5.5.3.2 </span>Calling scripts</h5>
+
<p>When a user agent is to <dfn id=jump-to-a-code-entry-point>jump to a code entry-point</dfn> for
a <a href=#concept-script title=concept-script>script</a>, for example to invoke
an event listener defined in that <a href=#concept-script title=concept-script>script</a>, the user agent must run the
following steps:</p>
- <ol><li><p>If the <a href="#script's-global-object">script's global object</a> is a
+ <ol>
+
+ <li><p>If the <a href="#script's-global-object">script's global object</a> is a
<code><a href=#window>Window</a></code> object whose <code>Document</code> object is
not <a href=#fully-active>fully active</a>, then abort these steps without doing
anything. The callback is not fired.</p>
@@ -35448,9 +37744,11 @@
<li><p>Set the <a href=#first-script>first script</a> back to whatever it was
when this algorithm started.</li>
- </ol><p>This algorithm is not invoked by one script calling another.</p>
+ </ol>
+ <p>This algorithm is not invoked by one script calling another.</p>
+
<h5 id=creating-scripts><span class=secno>5.5.3.3 </span>Creating scripts</h5>
<p>When the specification says that a <a href=#concept-script title=concept-script>script</a> is to be <dfn id=create-a-script title="create a
@@ -35458,7 +37756,9 @@
language, a global object, a browsing context, a character encoding,
and a base URL, the user agent must run the following steps:</p>
- <ol><li><p>Set up a <a href=#script-execution-environment>script execution environment</a> as
+ <ol>
+
+ <li><p>Set up a <a href=#script-execution-environment>script execution environment</a> as
appropriate for the scripting language.</li>
<li><p>Parse/compile/initialize the source of the script using the
@@ -35478,7 +37778,11 @@
<a href=#concept-script title=concept-script>script</a>'s <i><a href=#initial-code-entry-point>initial code
entry-point</a></i>.</li>
- </ol><hr><p>When the user agent is to <dfn id=create-an-impotent-script>create an impotent script</dfn>,
+ </ol>
+
+ <hr>
+
+ <p>When the user agent is to <dfn id=create-an-impotent-script>create an impotent script</dfn>,
given some script source, its scripting language, and a browsing
context, the user agent must <a href=#create-a-script>create a script</a>, using the
given script source and scripting language, using a new empty object
@@ -35487,7 +37791,9 @@
resulting <a href=#concept-script title=concept-script>script</a> are not
important as no APIs are exposed to the script.</p>
- <hr><p>When the specification says that a <a href=#concept-script title=concept-script>script</a> is to be <dfn id=create-a-script-from-a-node title="create a
+ <hr>
+
+ <p>When the specification says that a <a href=#concept-script title=concept-script>script</a> is to be <dfn id=create-a-script-from-a-node title="create a
script from a node">created from a node</dfn> <var title="">node</var>, given some script source and its scripting
language, the user agent must <a href=#create-a-script>create a script</a>, using
the given script source and scripting language, and using <a href=#the-script-settings-determined-from-the-node>the
@@ -35495,7 +37801,9 @@
<p><dfn id=the-script-settings-determined-from-the-node>The script settings determined from the node</dfn> <var title="">node</var> are computed as follows:</p>
- <ol><li><p>Let <var title="">document</var> be the
+ <ol>
+
+ <li><p>Let <var title="">document</var> be the
<code>Document</code> of <var title="">node</var> (or <var title="">node</var> itself if it is a
<code>Document</code>).</li>
@@ -35512,8 +37820,11 @@
<li><p>The base URL is the <a href=#document-base-url title="document base URL">base
URL</a> of <var title="">document</var>. (<a href=#sbu-not-copy>This is a reference, not a copy</a>.)</li>
- </ol><h5 id=killing-scripts><span class=secno>5.5.3.4 </span>Killing scripts</h5>
+ </ol>
+
+ <h5 id=killing-scripts><span class=secno>5.5.3.4 </span>Killing scripts</h5>
+
<p>User agents may impose resource limitations on scripts, for
example CPU quotas, memory limits, total execution time limits, or
bandwidth limitations. When a script exceeds a limit, the user agent
@@ -35565,8 +37876,10 @@
queue">task queues</dfn>. A <a href=#task-queue>task queue</a> is an ordered
list of <dfn id=concept-task title=concept-task>tasks</dfn>, which can be:</p>
- <dl><dt>Events</dt>
+ <dl>
+ <dt>Events</dt>
+
<dd>
<p>Asynchronously dispatching an <code>Event</code> object at a
@@ -35604,7 +37917,9 @@
manipulation, e.g. when that element is <a href=#insert-an-element-into-a-document title="insert an
element into a document">inserted into the document</a>.</p>
- </dl><p>Each <a href=#concept-task title=concept-task>task</a> is associated with a
+ </dl>
+
+ <p>Each <a href=#concept-task title=concept-task>task</a> is associated with a
<code>Document</code>; if the task was queued in the context of an
element, then it is the element's <code>Document</code>; if the task
was queued in the context of a <a href=#browsing-context>browsing context</a>, then
@@ -35636,7 +37951,9 @@
<p>An <a href=#event-loop>event loop</a> must continually run through the
following steps for as long as it exists:</p>
- <ol><li><p>Run the oldest task on one of the <a href=#event-loop>event loop</a>'s
+ <ol>
+
+ <li><p>Run the oldest task on one of the <a href=#event-loop>event loop</a>'s
<a href=#task-queue title="task queue">task queues</a>, ignoring tasks whose
associated <code>Document</code>s are not <a href=#fully-active>fully
active</a>. The user agent may pick any <a href=#task-queue>task
@@ -35651,14 +37968,20 @@
<li><p>Return to the first step of the <a href=#event-loop>event
loop</a>.</li>
- </ol><h5 id=generic-task-sources><span class=secno>5.5.4.1 </span>Generic task sources</h5>
+ </ol>
+
+
+ <h5 id=generic-task-sources><span class=secno>5.5.4.1 </span>Generic task sources</h5>
+
<p>The following <a href=#task-source title="task source">task sources</a> are
used by a number of mostly unrelated features in this and other
specifications.</p>
- <dl><dt>The <dfn id=dom-manipulation-task-source>DOM manipulation task source</dfn></dt>
+ <dl>
+ <dt>The <dfn id=dom-manipulation-task-source>DOM manipulation task source</dfn></dt>
+
<dd>
<p>This <a href=#task-source>task source</a> is used for features that react
@@ -35697,12 +38020,19 @@
</dd>
- </dl><!-- SCRIPT EXEC --><h4 id=javascript-protocol><span class=secno>5.5.5 </span><dfn title="javascript protocol">The <code title="">javascript:</code> protocol</dfn></h4>
+ </dl>
+
+
+ <!-- SCRIPT EXEC -->
+ <h4 id=javascript-protocol><span class=secno>5.5.5 </span><dfn title="javascript protocol">The <code title="">javascript:</code> protocol</dfn></h4>
+
<p>When a <a href=#url>URL</a> using the <code title="">javascript:</code> protocol is <dfn id=concept-js-deref title=concept-js-deref>dereferenced</dfn>, the user agent must run
the following steps:</p>
- <ol><li><p>Let the script source be the string obtained using the
+ <ol>
+
+ <li><p>Let the script source be the string obtained using the
content retrieval operation defined for <code title="">javascript:</code> URLs. <a href=#refsJSURL>[JSURL]</a></li>
<!--
@@ -35715,7 +38045,9 @@
<p>Use the appropriate step from the following list:</p>
- <dl><dt>If a <a href=#browsing-context>browsing context</a> is being <a href=#navigate title=navigate>navigated</a> to a <code>javascript:</code>
+ <dl>
+
+ <dt>If a <a href=#browsing-context>browsing context</a> is being <a href=#navigate title=navigate>navigated</a> to a <code>javascript:</code>
URL, and the <a href=#active-document>active document</a> of that browsing
context has the <a href=#same-origin>same origin</a> as the script given by
that URL</dt>
@@ -35777,8 +38109,10 @@
</dd>
- </dl></li>
+ </dl>
+ </li>
+
<li>
<p>If the result of executing the script is void (there is no
@@ -35795,8 +38129,10 @@
</li>
- </ol><div class=example>
+ </ol>
+ <div class=example>
+
<p>So for example a <code title="">javascript:</code> URL for a
<code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute of an
<code><a href=#the-img-element>img</a></code> element would be evaluated in the context of an
@@ -35853,7 +38189,9 @@
<a href=#html-elements>HTML elements</a> and some of the event handlers on
<code><a href=#window>Window</a></code> objects are exposed in this way.</p>
- <hr><p><dfn id=event-handler-dom-attributes>Event handler DOM attributes</dfn>, on setting, must set the
+ <hr>
+
+ <p><dfn id=event-handler-dom-attributes>Event handler DOM attributes</dfn>, on setting, must set the
corresponding event handler attribute to their new value, and on
getting, must return whatever the current value of the corresponding
event handler attribute is (possibly null).</p>
@@ -35862,7 +38200,9 @@
requirements, in particular the <code title=handler-MessagePort-onmessage><a href=#handler-messageport-onmessage>onmessage</a></code> attribute of
<code><a href=#messageport>MessagePort</a></code> objects.</p>
- <hr><p><dfn id=event-handler-content-attributes>Event handler content attributes</dfn>, when specified, must
+ <hr>
+
+ <p><dfn id=event-handler-content-attributes>Event handler content attributes</dfn>, when specified, must
contain valid ECMAScript code matching the ECMAScript <code title="">FunctionBody</code> production. <a href=#refsECMA262>[ECMA262]</a></p>
<!-- SCRIPT EXEC -->
@@ -35872,7 +38212,9 @@
create a <a href=#concept-script title=concept-script>script</a> after setting
the content attribute to its new value:</p>
- <ol><li><p>Set up a <a href=#script-execution-environment>script execution environment</a> for
+ <ol>
+
+ <li><p>Set up a <a href=#script-execution-environment>script execution environment</a> for
JavaScript.</li>
<li>
@@ -35881,7 +38223,9 @@
attribute's new value as the body of an anonymous function, with
the function's arguments set as follows:</p>
- <dl class=switch><dt>If the attribute is the <code title=handler-window-onerror><a href=#handler-window-onerror>onerror</a></code> attribute of the
+ <dl class=switch>
+
+ <dt>If the attribute is the <code title=handler-window-onerror><a href=#handler-window-onerror>onerror</a></code> attribute of the
<code><a href=#window>Window</a></code> object</dt>
<dd>Let the function have three arguments, named <code title="">event</code>, <code title="">source</code>, and <code title="">fileno</code>.</dd>
@@ -35890,7 +38234,9 @@
<dd>Let the function have a single argument called <code title="">event</code>.</dd>
- </dl><p>Link the new function's scope chain from the activation object
+ </dl>
+
+ <p>Link the new function's scope chain from the activation object
of the handler, to the element's object, to the element's
<a href=#form-owner>form owner</a>, if it has one, to the element's
<code>Document</code> object, to the <code><a href=#window>Window</a></code> object of
@@ -35917,7 +38263,9 @@
<li><p>Set the corresponding event handler attribute to the
aforementioned function.</li>
- </ol><p class=note>When an event handler content attribute is set on an
+ </ol>
+
+ <p class=note>When an event handler content attribute is set on an
element owned by a <code>Document</code> that is not in a
<a href=#browsing-context>browsing context</a>, the corresponding event handler
attribute is not changed.</p>
@@ -35928,7 +38276,9 @@
<p class=XXX>How do we allow non-JS event handlers?</p>
- <hr><p>All event handler attributes on an element, whether set to null
+ <hr>
+
+ <p>All event handler attributes on an element, whether set to null
or to a <code><a href=#function>Function</a></code> object<!-- or to anything else, in the
case of 'onerror' -->, must be registered as event listeners on the
element, as if the <code title=dom-EventTarget-addEventListenerNS>addEventListenerNS()</code>
@@ -35958,8 +38308,10 @@
<p>The handler's return value must then be processed as follows:</p>
- <dl class=switch><dt>If the event type is <code class=event-mouseover>mouseover</code></dt>
+ <dl class=switch>
+ <dt>If the event type is <code class=event-mouseover>mouseover</code></dt>
+
<dd><p>If the return value is a boolean with the value true, then
the event must be canceled.</dd>
@@ -35975,7 +38327,13 @@
<dd><p>If the return value is a boolean with the value false, then
the event must be canceled.</dd>
- </dl><!-- IE actually uncancels the event if the function returns true --><hr><p>The <code><a href=#function>Function</a></code> interface represents a function in the
+ </dl>
+
+ <!-- IE actually uncancels the event if the function returns true -->
+
+ <hr>
+
+ <p>The <code><a href=#function>Function</a></code> interface represents a function in the
scripting language being used. It is represented in IDL as
follows:</p>
@@ -35999,8 +38357,10 @@
attributes and DOM attributes, and on <code><a href=#window>Window</a></code> objects,
as DOM attributes:</p>
- <dl><dt><dfn id=handler-onabort title=handler-onabort><code>onabort</code></dfn></dt>
+ <dl>
+ <dt><dfn id=handler-onabort title=handler-onabort><code>onabort</code></dfn></dt>
+
<dd><p>Must be invoked whenever an <code title=event-abort><a href=#event-abort>abort</a></code> event is targeted at or bubbles
through the element or object.</dd>
@@ -36161,13 +38521,19 @@
<dd><p>Must be invoked whenever a <code title=event-submit>submit</code> event is targeted at or bubbles
through the element or object.</dd>
- </dl><hr><p>The following are the event handler attributes that must be
+ </dl>
+
+ <hr>
+
+ <p>The following are the event handler attributes that must be
supported by all <a href=#html-elements>HTML elements</a> other than
<code><a href=#the-body-element>body</a></code>, as both content attributes and DOM
attributes:</p>
- <dl><dt><dfn id=handler-onerror title=handler-onerror><code>onerror</code></dfn></dt>
+ <dl>
+ <dt><dfn id=handler-onerror title=handler-onerror><code>onerror</code></dfn></dt>
+
<dd><p>Must be invoked whenever a <code title=event-error><a href=#event-error>error</a></code> event is targeted at or bubbles
through the element.</dd>
@@ -36181,14 +38547,20 @@
<dd><p>Must be invoked whenever a <code title=event-message><a href=#event-message>message</a></code> event is targeted at or bubbles
through the element.</dd>
- </dl><hr><p>The following are the event handler attributes that must be
+ </dl>
+
+ <hr>
+
+ <p>The following are the event handler attributes that must be
supported by <code><a href=#window>Window</a></code> objects, as DOM attributes on the
<code><a href=#window>Window</a></code> object, and with corresponding content
attributes and DOM attributes exposed on the <code><a href=#the-body-element>body</a></code>
element:</p>
- <dl><dt><dfn id=handler-window-onbeforeunload title=handler-window-onbeforeunload><code>onbeforeunload</code></dfn></dt>
+ <dl>
+ <dt><dfn id=handler-window-onbeforeunload title=handler-window-onbeforeunload><code>onbeforeunload</code></dfn></dt>
+
<dd><p>Must be invoked whenever a <code title=event-beforeunload>beforeunload</code> event is targeted at or bubbles
through the object.</dd>
@@ -36253,8 +38625,11 @@
<dd><p>Must be invoked whenever an <code title=event-unload>unload</code> event is targeted at or bubbles
through the object.</dd>
- </dl><h5 id=event-firing><span class=secno>5.5.6.3 </span>Event firing</h5>
+ </dl>
+
+ <h5 id=event-firing><span class=secno>5.5.6.3 </span>Event firing</h5>
+
<p class=XXX>maybe this should be moved higher up
(terminology? conformance? DOM?) Also, the whole terminology thing
should be changed so that we don't define any specific events here,
@@ -36331,7 +38706,9 @@
agent must also dispatch the event to the <code><a href=#window>Window</a></code>, as
follows:</p>
- <ol><li>In the capture phase, the event must be dispatched to the
+ <ol>
+
+ <li>In the capture phase, the event must be dispatched to the
<code><a href=#window>Window</a></code> object before being dispatched to any of the
nodes.</li>
@@ -36339,8 +38716,12 @@
<code><a href=#window>Window</a></code> object at the end of the phase, unless bubbling
has been prevented.</li>
- </ol><h5 id=runtime-script-errors><span class=secno>5.5.6.5 </span>Runtime script errors</h5>
+ </ol>
+
+
+ <h5 id=runtime-script-errors><span class=secno>5.5.6.5 </span>Runtime script errors</h5>
+
<p><em>This section only applies to user agents that support
scripting in general and ECMAScript in particular.</em></p>
@@ -36351,13 +38732,17 @@
<a href="#script's-global-object">script's global object</a>. If the error is still <i title="">not handled</i> after this, then the error should be
reported to the user.</p>
- <hr><p>When the user agent is required to <dfn id=report-the-error title="report the
+ <hr>
+
+ <p>When the user agent is required to <dfn id=report-the-error title="report the
error">report an error</dfn> <var title="">error</var> using the
event handler attribute <var title="">onerror</var>, it must run
these steps, after which the error is either <i title="">handled</i>
or <i title="">not handled</i>:</p>
- <dl class=switch><dt>If the value of <var title="">onerror</var> is a
+ <dl class=switch>
+
+ <dt>If the value of <var title="">onerror</var> is a
<code><a href=#function>Function</a></code></dt>
<dd>
@@ -36395,8 +38780,14 @@
</dd>
- </dl><h3 id=user-prompts><span class=secno>5.6 </span>User prompts</h3>
+ </dl>
+
+
+
+
+ <h3 id=user-prompts><span class=secno>5.6 </span>User prompts</h3>
+
<h4 id=simple-dialogs><span class=secno>5.6.1 </span>Simple dialogs</h4>
<p>The <dfn id=dom-alert title=dom-alert><code>alert(<var title="">message</var>)</code></dfn> method, when invoked, must show
@@ -36436,8 +38827,10 @@
<p>The <dfn id=printing-steps>printing steps</dfn> are as follows:</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>The user agent may display a message to the user and/or may
abort these steps.</p>
@@ -36496,14 +38889,19 @@
</li>
- </ol><h4 id=dialogs-implemented-using-separate-documents><span class=secno>5.6.3 </span>Dialogs implemented using separate documents</h4>
+ </ol>
+
+ <h4 id=dialogs-implemented-using-separate-documents><span class=secno>5.6.3 </span>Dialogs implemented using separate documents</h4>
+
<p>The <dfn id=dom-showmodaldialog title=dom-showModalDialog><code>showModalDialog(<var title="">url</var>, <var title="">argument</var><!--, <var
title="">features</var>-->)</code></dfn> method, when invoked, must
cause the user agent to run the following steps:</p>
- <ol><li>
+ <ol>
+ <li>
+
<p><a href=#resolve-a-url title="resolve a url">Resolve</a> <var title="">url</var> relative to the <a href=#first-script>first script</a>'s
<a href="#script's-base-url" title="script's base URL">base URL</a>.</p>
@@ -36531,7 +38929,9 @@
<p>Let <var title="">the list of background browsing
contexts</var> be a list of all the browsing contexts that:</p>
- <ul><li>are part of the same <a href=#unit-of-related-browsing-contexts>unit of related browsing
+ <ul>
+
+ <li>are part of the same <a href=#unit-of-related-browsing-contexts>unit of related browsing
contexts</a> as the browsing context of the
<code><a href=#window>Window</a></code> object on which the <code title=dom-showModalDialog><a href=#dom-showmodaldialog>showModalDialog()</a></code> method was
called, and that</li>
@@ -36543,7 +38943,9 @@
document.domain to talk to another domain doesn't make you able
to block that domain -->
- </ul><p>...as well as any browsing contexts that are nested inside any
+ </ul>
+
+ <p>...as well as any browsing contexts that are nested inside any
of the browsing contexts matching those conditions.</p>
</li>
@@ -36621,7 +39023,9 @@
</li>
- </ol><p>The <code><a href=#window>Window</a></code> objects of <code>Document</code>s hosted
+ </ol>
+
+ <p>The <code><a href=#window>Window</a></code> objects of <code>Document</code>s hosted
by <a href=#browsing-context title="browsing context">browsing contexts</a> created
by the above algorithm must all implement the
<code><a href=#windowmodal>WindowModal</a></code> interface:</p>
@@ -36930,10 +39334,16 @@
current versions; future versions and unknown versions should always
be assumed to be fully compliant.</p>
- <dl><!-- redundant
+ <dl>
+
+ <!-- redundant
<dt><dfn title="dom-navigator-appCodeName"><code>appCodeName</code></dfn></dt>
<dd><p>Must return the string "<code title="">Mozilla</code>".</p></dd>
- --><!-- appMinorVersion: IE only. In IE8b1, returns " Beta" (with the space) --><dt><dfn id=dom-navigator-appname title=dom-navigator-appName><code>appName</code></dfn></dt>
+ -->
+
+ <!-- appMinorVersion: IE only. In IE8b1, returns " Beta" (with the space) -->
+
+ <dt><dfn id=dom-navigator-appname title=dom-navigator-appName><code>appName</code></dfn></dt>
<dd><p>Must return either the string "<code title="">Netscape</code>" or the full name of the browser, e.g. "<code title="">Mellblom Browsernator</code>".</dd>
<dt><dfn id=dom-navigator-appversion title=dom-navigator-appVersion><code>appVersion</code></dfn></dt>
@@ -36961,8 +39371,11 @@
<!-- vendorSub: Mozilla and Safari only; always returns "" -->
- </dl><h4 id=custom-handlers><span class=secno>5.7.2 </span>Custom protocol and content handlers</h4>
+ </dl>
+
+ <h4 id=custom-handlers><span class=secno>5.7.2 </span>Custom protocol and content handlers</h4>
+
<p>The <dfn id=dom-navigator-registerprotocolhandler title=dom-navigator-registerProtocolHandler><code>registerProtocolHandler()</code></dfn>
method allows Web sites to register themselves as possible handlers
for particular protocols. For example, an online fax service could
@@ -36992,8 +39405,10 @@
<p>The arguments to the methods have the following meanings and
corresponding implementaion requirements:</p>
- <dl><dt><var title="">protocol</var> (<code title=dom-navigator-registerProtocolHandler><a href=#dom-navigator-registerprotocolhandler>registerProtocolHandler()</a></code> only)</dt>
+ <dl>
+ <dt><var title="">protocol</var> (<code title=dom-navigator-registerProtocolHandler><a href=#dom-navigator-registerprotocolhandler>registerProtocolHandler()</a></code> only)</dt>
+
<dd>
<p>A scheme, such as <code>ftp</code> or <code>fax</code>. The
@@ -37057,20 +39472,20 @@
<p>If the user had visited a site at <code title="">http://example.com/</code> that made the following
call:</p>
- <pre>navigator.registerContentHandler('application/x-soup', 'soup?url=%s', 'SoupWeb™')</pre>
+ <pre>navigator.registerContentHandler('application/x-soup', 'soup?url=%s', 'SoupWeb™')</pre>
<p>...and then, much later, while visiting <code title="">http://www.example.net/</code>, clicked on a link such
as:</p>
- <pre><a href="chickenkïwi.soup">Download our Chicken Kiwi soup!</a></pre>
+ <pre><a href="chickenkïwi.soup">Download our Chicken Kiwi soup!</a></pre>
- <p>...then, assuming this <code>chickenkïwi.soup</code> file
+ <p>...then, assuming this <code>chickenkïwi.soup</code> file
was served with the MIME type <code>application/x-soup</code>,
the UA might navigate to the following URL:</p>
<pre>http://example.com/soup?url=http://www.example.net/chickenk%C3%AFwi.soup</pre>
- <p>This site could then fetch the <code>chickenkïwi.soup</code>
+ <p>This site could then fetch the <code>chickenkïwi.soup</code>
file and do whatever it is that it does with soup (synthesize it
and ship it to the user, or whatever).</p>
@@ -37087,7 +39502,9 @@
</dd>
- </dl><p>User agents should raise <code><a href=#security_err>SECURITY_ERR</a></code> exceptions if
+ </dl>
+
+ <p>User agents should raise <code><a href=#security_err>SECURITY_ERR</a></code> exceptions if
the methods are called with <var title="">protocol</var> or <var title="">mimeType</var> values that the UA deems to be
"privileged". For example, a site attempting to register a handler
for <code>http</code> URLs or <code>text/html</code> content in a
@@ -37139,7 +39556,7 @@
consider the possibility that a site will attempt to register a
large number of handlers, possibly from multiple domains (e.g. by
redirecting through a series of pages each on a different domain,
- and each registering a handler for <code>video/mpeg</code> —
+ and each registering a handler for <code>video/mpeg</code> —
analogous practices abusing other Web browser features have been
used by pornography Web sites for many years). User agents should
gracefully handle such hostile attempts, protecting the user.</p>
@@ -37163,7 +39580,9 @@
in this section can result in secret Intranet URLs being leaked, in
the following manner:</p>
- <ol><li>The user registers a third-party content handler as the default
+ <ol>
+
+ <li>The user registers a third-party content handler as the default
handler for a content type.</li>
<li>The user then browses his corporate Intranet site and accesses
@@ -37172,7 +39591,9 @@
<li>The user agent contacts the third party and hands the third
party the URL to the Intranet content.</li>
- </ol><p>No actual confidential file data is leaked in this manner, but
+ </ol>
+
+ <p>No actual confidential file data is leaked in this manner, but
the URLs themselves could contain confidential information. For
example, the URL could be
<code>http://www.corp.example.com/upcoming-aquisitions/the-sample-company.egf</code>,
@@ -37291,13 +39712,17 @@
<p>An <dfn id=application-cache>application cache</dfn> is a set of cached resources
consisting of:</p>
- <ul><li>
+ <ul>
+ <li>
+
<p>One of more resources (including their out-of-band metadata,
such as HTTP headers, if any), identified by URLs, each falling
into one (or more) of the following categories:</p>
- <dl><dt><dfn id=concept-appcache-master title=concept-appcache-master>Master entries</dfn>
+ <dl>
+
+ <dt><dfn id=concept-appcache-master title=concept-appcache-master>Master entries</dfn>
<dd>Documents that were added to the cache because a
<a href=#browsing-context>browsing context</a> was <a href=#navigate title=navigate>navigated</a> to that document and the
@@ -37327,7 +39752,9 @@
entries.
- </dl><p class=note>A URL in the list can be flagged with multiple
+ </dl>
+
+ <p class=note>A URL in the list can be flagged with multiple
different types, and thus an entry can end up being categorized as
multiple entries. For example, an entry can be a manfiest entry
and an explicit entry at the same time, if the manifest is listed
@@ -37343,10 +39770,14 @@
<li>Zero or more URLs that form the <dfn id=concept-appcache-onlinewhitelist title=concept-appcache-onlinewhitelist>online whitelist
namespaces</dfn>.
- </ul><p>Each <a href=#application-cache>application cache</a> has a <dfn id=concept-appcache-completeness title=concept-appcache-completeness>completeness flag</dfn>, which is
+ </ul>
+
+ <p>Each <a href=#application-cache>application cache</a> has a <dfn id=concept-appcache-completeness title=concept-appcache-completeness>completeness flag</dfn>, which is
either <i>complete</i> or <i>incomplete</i>.</p>
- <hr><p>An <dfn id=application-cache-group>application cache group</dfn> is a group of <a href=#application-cache title="application cache">application caches</a>, identified by
+ <hr>
+
+ <p>An <dfn id=application-cache-group>application cache group</dfn> is a group of <a href=#application-cache title="application cache">application caches</a>, identified by
the <a href=#absolute-url>absolute URL</a> of a resource <a href=#concept-appcache-manifest title=concept-appcache-manifest>manifest</a> which is used to
populate the caches in the group.</p>
@@ -37375,7 +39806,9 @@
must be ignored when looking at what <a href=#application-cache-group title="application cache
group">application cache groups</a> exist.</p>
- <hr><p>A <code>Document</code> initially is not associated with an
+ <hr>
+
+ <p>A <code>Document</code> initially is not associated with an
<a href=#application-cache>application cache</a>, but steps <a href=#parser-appcache>in the parser</a> and in the <a href=#navigate title=navigate>navigation</a> sections cause <a href=#concept-appcache-init title=concept-appcache-init>cache selection</a> to occur early
in the page load process.</p>
@@ -37390,17 +39823,23 @@
the user most likely wants to see the resource from, taking into
account the following:</p>
- <ul><li>which application cache was most recently updated,
+ <ul>
+ <li>which application cache was most recently updated,
+
<li>which application cache was being used to display the
resource from which the user decided to look at the new resource,
and
<li>which application cache the user prefers.
- </ul><h4 id=manifests><span class=secno>5.8.3 </span>The cache manifest syntax</h4>
+ </ul>
+
+ <h4 id=manifests><span class=secno>5.8.3 </span>The cache manifest syntax</h4>
+
+
<h5 id=a-sample-manifest><span class=secno>5.8.3.1 </span>A sample manifest</h5>
<p><em>This section is non-normative.</em></p>
@@ -37462,7 +39901,8 @@
<p>Subsequent lines, if any, must all be one of the following:</p>
- <dl><dt>A blank line
+ <dl>
+ <dt>A blank line
<dd>
<p>Blank lines must consist of zero or more U+0020 SPACE and
U+0009 CHARACTER TABULATION (tab) characters only.</p>
@@ -37484,7 +39924,9 @@
<p>Section headers change the current section. There are three
possible section headers:
- <dl><dt><code>CACHE:</code>
+ <dl>
+
+ <dt><code>CACHE:</code>
<dd>Switches to the explicit section.
<dt><code>FALLBACK:</code>
@@ -37493,7 +39935,9 @@
<dt><code>NETWORK:</code>
<dd>Switches to the online whitelist section.
- </dl><p>Section header lines must consist of zero or more U+0020 SPACE
+ </dl>
+
+ <p>Section header lines must consist of zero or more U+0020 SPACE
and U+0009 CHARACTER TABULATION (tab) characters, followed by one
of the names above (including the U+003A COLON (:) character)
followed by zero or more U+0020 SPACE and U+0009 CHARACTER
@@ -37527,7 +39971,9 @@
since those would be relative URLs to the manifest itself. Such
lines would be confused with blank or invalid lines, anyway.</p>
- </dl><p>Manifests may contain sections more than once. Sections may be
+ </dl>
+
+ <p>Manifests may contain sections more than once. Sections may be
empty.</p>
<p>URLs that are to be fallback pages associated with <a href=#concept-appcache-fallback-ns title=concept-appcache-fallback-ns>fallback namespaces</a>, and
@@ -37561,7 +40007,9 @@
<p>When a user agent is to <dfn id=parse-a-manifest>parse a manifest</dfn>, it means
that the user agent must run the following steps:</p>
- <ol><li><p>The user agent must decode the byte stream corresponding with
+ <ol>
+
+ <li><p>The user agent must decode the byte stream corresponding with
the manifest to be parsed, treating it as UTF-8. Bytes or sequences
of bytes that are not valid UTF-8 sequences must be interpreted as
a U+FFFD REPLACEMENT CHARACTER. <!--All U+0000 NULL characters must
@@ -37668,7 +40116,9 @@
<p>While <var title="">position</var> doesn't point past the end
of <var title="">line</var>:</p>
- <ol><li><p>Let <var title="">current token</var> be an empty
+ <ol>
+
+ <li><p>Let <var title="">current token</var> be an empty
string.</li>
<li><p>While <var title="">position</var> doesn't point past the
@@ -37683,14 +40133,18 @@
end of <var title="">line</var> and the character at <var title="">position</var> is either a U+0020 SPACE or a U+0009
CHARACTER TABULATION (tab) character, advance <var title="">position</var> to the next character in <var title="">input</var>.</li>
- </ol></li>
+ </ol>
+ </li>
+
<li>
<p>Process <var title="">tokens</var> as follows:</p>
- <dl class=switch><dt>If <var title="">mode</var> is "explicit"</dt>
+ <dl class=switch>
+ <dt>If <var title="">mode</var> is "explicit"</dt>
+
<dd>
<p><a href=#resolve-a-url title="resolve a url">Resolve</a> the first item in
@@ -37779,8 +40233,10 @@
</dd>
- </dl></li>
+ </dl>
+ </li>
+
<li><p>Jump back to the step labeled "start of line". (That step
jumps to the next, and last, step when the end of the file is
reached.)</li>
@@ -37788,7 +40244,9 @@
<li><p>Return the <var title="">explicit URLs</var> list, the <var title="">fallback URLs</var> mapping, and the <var title="">online
whitelist URLs</var>.</li>
- </ol><p class=note>If a resource is listed in the explicit section and
+ </ol>
+
+ <p class=note>If a resource is listed in the explicit section and
matches an entry in the online whitelist, or if a resource matches
both an entry in the fallback section and the online whitelist, the
resource will taken from the cache, and the online whitelist entry
@@ -37805,16 +40263,22 @@
<a href=#browsing-context>browsing context</a>, and potentially given a new <a href=#concept-appcache-master title=concept-appcache-master>master</a> resource, the user
agent must run the following steps:</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>Atomically, so as to avoid race conditions, perform the
following substeps:</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>Pick the approprate substeps:</p>
- <dl class=switch><dt>If these steps were invoked with an <a href=#absolute-url>absolute
+ <dl class=switch>
+
+ <dt>If these steps were invoked with an <a href=#absolute-url>absolute
URL</a> purported to identify a <a href=#concept-appcache-manifest title=concept-appcache-manifest>manifest</a></dt>
<dd>
@@ -37842,8 +40306,10 @@
</dd>
- </dl></li>
+ </dl>
+ </li>
+
<li><p>Let <var title="">cache group</var> be the
<a href=#application-cache-group>application cache group</a> identified by <var title="">manifest URL</var>.</li>
@@ -37883,8 +40349,10 @@
that the user agent is checking for the availability of
updates.</li>
- </ol><p>The remainder of the steps run asychronously.</p>
+ </ol>
+ <p>The remainder of the steps run asychronously.</p>
+
<p>If <var title="">cache group</var> already has an
<a href=#application-cache>application cache</a> in it, then this is an <dfn id=concept-appcache-upgrade title=concept-appcache-upgrade>upgrade attempt</dfn>. Otherwise,
this is a <dfn id=concept-appcache-cache title=concept-appcache-cache>cache
@@ -37920,7 +40388,9 @@
response <a href=#concept-http-equivalent-codes title=concept-http-equivalent-codes>or
equivalent</a>, then run these substeps:</p>
- <ol><li><p>Mark <var title="">cache group</var> as <a href=#concept-appcache-obsolete title=concept-appcache-obsolete>obsolete</a>. This <var title="">cache group</var> no longer exists for any purpose other
+ <ol>
+
+ <li><p>Mark <var title="">cache group</var> as <a href=#concept-appcache-obsolete title=concept-appcache-obsolete>obsolete</a>. This <var title="">cache group</var> no longer exists for any purpose other
than the processing of <code>Document</code> objects already
associated with an <a href=#application-cache>application cache</a> in the <var title="">cache group</var>.</li>
@@ -37957,8 +40427,10 @@
<li><p>Abort the update process.</li>
- </ol></li>
+ </ol>
+ </li>
+
<li>
<p>Otherwise, if <i>fetching the manifest</i> fails in some other
@@ -37981,7 +40453,9 @@
or the server reported it as "304 Not Modified" <a href=#concept-http-equivalent-codes title=concept-http-equivalent-codes>or equivalent</a>, then
run these substeps:</p>
- <ol><li><p>Let <var title="">cache</var> be the <a href=#concept-appcache-newer title=concept-appcache-newer>newest</a> <a href=#application-cache>application
+ <ol>
+
+ <li><p>Let <var title="">cache</var> be the <a href=#concept-appcache-newer title=concept-appcache-newer>newest</a> <a href=#application-cache>application
cache</a> in <var title="">cache group</var>.</li>
<li>
@@ -38030,8 +40504,10 @@
<li><p>Abort the update process.</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>Let <var title="">new cache</var> be a newly created
<a href=#application-cache>application cache</a> in <var title="">cache
group</var>. Set its <a href=#concept-appcache-completeness title=concept-appcache-completeness>completeness flag</a> to
@@ -38080,8 +40556,10 @@
following steps. These steps may be run in parallel for two or
more of the URLs at a time.</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>If the resource URL being processed was flagged as neither an
"explicit entry" nor or a "fallback entry", then the user agent
may skip this URL.</p>
@@ -38140,7 +40618,9 @@
returned a redirect, then run the first appropriate step from
the following list:</p>
- <dl class=switch><dt>If the URL being processed was flagged as an "explicit
+ <dl class=switch>
+
+ <dt>If the URL being processed was flagged as an "explicit
entry" or a "fallback entry"</dt>
<dd>
@@ -38176,7 +40656,9 @@
</dd>
- </dl><p>User agents may warn the user of these errors as an aid to
+ </dl>
+
+ <p>User agents may warn the user of these errors as an aid to
development.</p>
<p class=note>These rules make errors for resources listed in
@@ -38211,8 +40693,10 @@
processed, then the user agent should mark the entry as being
<a href=#concept-appcache-foreign title=concept-appcache-foreign>foreign</a>.</p>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>Store the list of <a href=#concept-appcache-fallback-ns title=concept-appcache-fallback-ns>fallback namespaces</a>,
and the URLs of the <a href=#concept-appcache-fallback title=concept-appcache-fallback>fallback entries</a> that they
map to, in <var title="">new cache</var>.</li>
@@ -38229,7 +40713,9 @@
<p>If the download failed (e.g. the connection times out, or the
user cancels the download), then run these sebsteps:</p>
- <ol><li><p>Unassociate the <code>Document</code> for this entry from
+ <ol>
+
+ <li><p>Unassociate the <code>Document</code> for this entry from
<var title="">new cache</var>.</li>
<li><p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a>
@@ -38247,7 +40733,9 @@
attempt</a> and this entry is the last entry in <var title="">cache group</var>'s <a href=#concept-appcache-pending-masters title=concept-appcache-pending-masters>list of pending master
entries</a>, then run these further substeps:</p>
- <ol><li><p>Discard <var title="">cache group</var> and its only
+ <ol>
+
+ <li><p>Discard <var title="">cache group</var> and its only
<a href=#application-cache>application cache</a>, <var title="">new
cache</var>.</p>
@@ -38256,13 +40744,17 @@
<li><p>Abort the update process.</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>Otherwise, remove this entry from <var title="">cache
group</var>'s <a href=#concept-appcache-pending-masters title=concept-appcache-pending-masters>list
of pending master entries</a>.</li>
- </ol><p>Otherwise, store the resource for this entry in <var title="">new cache</var>, if it isn't already there, and
+ </ol>
+
+ <p>Otherwise, store the resource for this entry in <var title="">new cache</var>, if it isn't already there, and
categorize its entry as a <a href=#concept-appcache-master title=concept-appcache-master>master entry</a>.</p>
</li>
@@ -38330,15 +40822,21 @@
status</a> of <var title="">cache group</var> to
<i>idle</i>.</li>
- </ol><p>The <dfn id=cache-failure-steps>cache failure steps</dfn> are as follows:</p>
+ </ol>
- <ol><li>
+ <p>The <dfn id=cache-failure-steps>cache failure steps</dfn> are as follows:</p>
+ <ol>
+
+ <li>
+
<p>For each entry in <var title="">cache group</var>'s <a href=#concept-appcache-pending-masters title=concept-appcache-pending-masters>list of pending master
entries</a>, run the following further substeps. These steps
may be run in parallel for two or more entries at a time.</p>
- <ol><li><p>Wait for the resource for this entry to have either
+ <ol>
+
+ <li><p>Wait for the resource for this entry to have either
completely downloaded or failed.</p>
<li><p>Unassociate the <code>Document</code> for this entry from
@@ -38353,8 +40851,10 @@
of user interface indicating to the user that the user agent
failed to save the application for offline use.</p>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>For each <a href=#browsing-context>browsing context</a> whose <a href=#active-document>active
document</a> is still associated with an <a href=#application-cache>application
cache</a> in <var title="">cache group</var>, <a href=#queue-a-task>queue a
@@ -38384,12 +40884,16 @@
<li><p>Abort the update process.</li>
- </ol><p>Attempts to <a href=#fetch>fetch</a> resources as part of the
+ </ol>
+
+ <p>Attempts to <a href=#fetch>fetch</a> resources as part of the
<a href=#application-cache-update-process>application cache update process</a> may be done with
cache-defeating semantics, to avoid problems with stale or
inconsistent intermediary caches.</p>
- <hr><p>User agents may invoke the <a href=#application-cache-update-process>application cache update
+ <hr>
+
+ <p>User agents may invoke the <a href=#application-cache-update-process>application cache update
process</a>, in the background, for any <a href=#application-cache>application
cache</a>, at any time (with no <a href=#browsing-context>browsing
context</a>). This allows user agents to keep caches primed and
@@ -38434,7 +40938,9 @@
URL</var>, the user agent must run the first applicable set of steps
from the following list:</p>
- <dl class=switch><dt>If the flag <var title="">document-is-markup</var> is true, and
+ <dl class=switch>
+
+ <dt>If the flag <var title="">document-is-markup</var> is true, and
<var title="">document</var> was loaded from an <a href=#application-cache>application
cache</a>, and there is no <var title="">manifest URL</var></dt>
@@ -38511,8 +41017,12 @@
</dd>
- </dl><h5 id=changesToNetworkingModel><span class=secno>5.8.6.1 </span>Changes to the networking model</h5>
+ </dl>
+
+
+ <h5 id=changesToNetworkingModel><span class=secno>5.8.6.1 </span>Changes to the networking model</h5>
+
<p>When a <a href=#browsing-context>browsing context</a>'s <a href=#active-document>active
document</a> is associated with an <a href=#application-cache>application cache</a>
whose <a href=#concept-appcache-completeness title=concept-appcache-completeness>completeness
@@ -38521,7 +41031,9 @@
go through the following steps instead of immediately invoking the
mechanisms appropriate to that resource's scheme:</p>
- <ol><li><p>If the resource is not to be fetched using the HTTP GET
+ <ol>
+
+ <li><p>If the resource is not to be fetched using the HTTP GET
mechanism <a href=#concept-http-equivalent-get title=concept-http-equivalent-get>or
equivalent</a>, or if it has a <a href=#javascript-protocol title="javascript
protocol"><code title="">javascript:</code> URL</a>, then
@@ -38560,7 +41072,9 @@
<li><p>Fail the resource load.</li>
- </ol><p class=note>The above algorithm ensures that resources that are
+ </ol>
+
+ <p class=note>The above algorithm ensures that resources that are
not present in the <a href=#concept-appcache-manifest title=concept-appcache-manifest>manifest</a> will always fail
to load (at least, after the <a href=#application-cache>application cache</a> has been
primed the first time), making the testing of offline applications
@@ -38618,7 +41132,9 @@
is associated with, if any. This must be the appropriate value from
the following list:</p>
- <dl><dt><dfn id=dom-appcache-uncached title=dom-appcache-UNCACHED><code>UNCACHED</code></dfn>
+ <dl>
+
+ <dt><dfn id=dom-appcache-uncached title=dom-appcache-UNCACHED><code>UNCACHED</code></dfn>
(numeric value 0)</dt>
<dd><p>The <code><a href=#applicationcache>ApplicationCache</a></code> object is not associated
@@ -38669,7 +41185,11 @@
an <a href=#application-cache>application cache</a> whose <a href=#application-cache-group>application cache
group</a> is marked as <a href=#concept-appcache-obsolete title=concept-appcache-obsolete>obsolete</a>.</dd>
- </dl><hr><p>If the <dfn id=dom-appcache-update title=dom-appcache-update><code>update()</code></dfn> method is
+ </dl>
+
+ <hr>
+
+ <p>If the <dfn id=dom-appcache-update title=dom-appcache-update><code>update()</code></dfn> method is
invoked, the user agent must invoke the <a href=#application-cache-update-process>application cache
update process</a>, in the background, for the <a href=#application-cache>application
cache</a> with which the <code><a href=#applicationcache>ApplicationCache</a></code> object is
@@ -38680,7 +41200,9 @@
<p>If the <dfn id=dom-appcache-swapcache title=dom-appcache-swapCache><code>swapCache()</code></dfn> method
is invoked, the user agent must run the following steps:
- <ol><li><p>Let <var title="">document</var> be the
+ <ol>
+
+ <li><p>Let <var title="">document</var> be the
<code>Document</code> with which the <code><a href=#applicationcache>ApplicationCache</a></code>
object is associated.</li>
@@ -38713,12 +41235,16 @@
<li><p>Unassociate <var title="">document</var> from <var title="">cache</var> and instead associate it with <var title="">new cache</var>.</li>
- </ol><p>The following are the <a href=#event-handler-attributes-0>event handler attributes</a> that
+ </ol>
+
+ <p>The following are the <a href=#event-handler-attributes-0>event handler attributes</a> that
must be supported, as DOM attributes, by all objects implementing
the <code><a href=#applicationcache>ApplicationCache</a></code> interface:</p>
- <dl><dt><dfn id=handler-appcache-onchecking title=handler-appcache-onchecking><code>onchecking</code></dfn></dt>
+ <dl>
+ <dt><dfn id=handler-appcache-onchecking title=handler-appcache-onchecking><code>onchecking</code></dfn></dt>
+
<dd><p>Must be invoked whenever an <code title=event-checking>checking</code> event is targeted at or
bubbles through the <code><a href=#applicationcache>ApplicationCache</a></code> object.</dd>
@@ -38766,8 +41292,11 @@
<dd><p>Must be invoked whenever an <code title=event-obsolete>obsolete</code> event is targeted at or bubbles
through the <code><a href=#applicationcache>ApplicationCache</a></code> object.</dd>
- </dl><h4 id=browser-state><span class=secno>5.8.8 </span>Browser state</h4>
+ </dl>
+
+ <h4 id=browser-state><span class=secno>5.8.8 </span>Browser state</h4>
+
<p>The <dfn id=dom-navigator-online title=dom-navigator-onLine><code>navigator.onLine</code></dfn>
attribute must return false if the user agent will not contact the
network when the user follows links or when a script requests a
@@ -38919,18 +41448,29 @@
are defined in terms of the <code title=dom-history-go><a href=#dom-history-go>go()</a></code>
method, as follows:</p>
- <table><tr><th>Member</th>
+ <table>
+ <tr>
+ <th>Member</th>
<th>Definition</th>
- <tr><td><dfn id=dom-history-back title=dom-history-back><code>back()</code></dfn></td>
+ </tr>
+ <tr>
+ <td><dfn id=dom-history-back title=dom-history-back><code>back()</code></dfn></td>
<td>Must do the same as <code title=dom-history-go><a href=#dom-history-go>go(-1)</a></code></td>
- <tr><td><dfn id=dom-history-forward title=dom-history-forward><code>forward()</code></dfn></td>
+ </tr>
+ <tr>
+ <td><dfn id=dom-history-forward title=dom-history-forward><code>forward()</code></dfn></td>
<td>Must do the same as <code title=dom-history-go><a href=#dom-history-go>go(1)</a></code></td>
- </table><p>The <dfn id=dom-history-pushstate title=dom-history-pushState><code>pushState(<var title="">data</var>, <var title="">title</var>, <var title="">url</var>)</code></dfn> method adds a state object to the
+ </tr>
+ </table>
+
+ <p>The <dfn id=dom-history-pushstate title=dom-history-pushState><code>pushState(<var title="">data</var>, <var title="">title</var>, <var title="">url</var>)</code></dfn> method adds a state object to the
history.</p>
<p>When this method is invoked, the user agent must run the following steps:</p>
- <ol><li><p>Let <var title="">clone data</var> be a <a href=#structured-clone>structured
+ <ol>
+
+ <li><p>Let <var title="">clone data</var> be a <a href=#structured-clone>structured
clone</a> of the specified <var title="">data</var>. If this
throws an exception, then rethrow that exception and abort these
steps.</li>
@@ -38939,7 +41479,9 @@
<p>If a third argument is specified, run these substeps:</p>
- <ol><li><a href=#resolve-a-url title="resolve a url">Resolve</a> the value of the
+ <ol>
+
+ <li><a href=#resolve-a-url title="resolve a url">Resolve</a> the value of the
third argument, relative to the <a href=#first-script>first script</a>'s <a href="#script's-base-url" title="script's base URL">base URL</a>.</li>
<li>If that fails, raise a <code><a href=#security_err>SECURITY_ERR</a></code> exception and
@@ -38950,7 +41492,9 @@
document's address</a>. If any part of these two <a href=#url title=URL>URLs</a> differ other than the <a href=#url-path title=url-path><path></a>, <a href=#url-query title=url-query><query></a>, and <a href=#url-fragment title=url-fragment><fragment></a> components, then
raise a <code><a href=#security_err>SECURITY_ERR</a></code> exception and abort the <code title=dom-history-pushState><a href=#dom-history-pushstate>pushState()</a></code> steps.</li>
- </ol><p>For the purposes of the comparison in the above substeps, the
+ </ol>
+
+ <p>For the purposes of the comparison in the above substeps, the
<a href=#url-path title=url-path><path></a> and <a href=#url-query title=url-query><query></a> components can only be the
same if the URLs use a hierarchical <a href=#url-scheme title=url-scheme><scheme></a>.</p>
@@ -38977,7 +41521,9 @@
<li><p>Update the <a href=#current-entry>current entry</a> to be the this newly
added entry.</li>
- </ol><p class=note>The <var title="">title</var> is purely
+ </ol>
+
+ <p class=note>The <var title="">title</var> is purely
advisory. User agents might use the title in the user interface.</p>
<p>User agents may limit the number of state objects added to the
@@ -39010,7 +41556,9 @@
steps:</p>
<ol><!-- only called for the first entry of a Document set and for
- state object entries, not for frag id change entries --><li><p>If the entry is a <a href=#state-object>state object</a> entry, let <var title="">state</var> be a <a href=#structured-clone>structured clone</a> of that
+ state object entries, not for frag id change entries -->
+
+ <li><p>If the entry is a <a href=#state-object>state object</a> entry, let <var title="">state</var> be a <a href=#structured-clone>structured clone</a> of that
state object. Otherwise, let <var title="">state</var> be
null.</li>
@@ -39018,7 +41566,9 @@
<p>Run the appropriate according to the conditions described:</p>
- <dl class=switch><dt>If the <a href=#current-document-readiness>current document readiness</a> is set to the
+ <dl class=switch>
+
+ <dt>If the <a href=#current-document-readiness>current document readiness</a> is set to the
string "complete"</dt>
<dd><p><a href=#queue-a-task>Queue a task</a> to fire a <dfn id=event-popstate title=event-popstate><code>popstate</code></dfn> event in no
@@ -39039,11 +41589,17 @@
<p class=note>The event will then be fired just after the <code title=event-load><a href=#event-load>load</a></code> event.</dd>
- </dl></li>
+ </dl>
- </ol><p>The <a href=#pending-state-object>pending state object</a> must be initially null.</p>
+ </li>
- <hr><pre class=idl>interface <dfn id=popstateevent>PopStateEvent</dfn> : Event {
+ </ol>
+
+ <p>The <a href=#pending-state-object>pending state object</a> must be initially null.</p>
+
+ <hr>
+
+ <pre class=idl>interface <dfn id=popstateevent>PopStateEvent</dfn> : Event {
readonly attribute any <a href=#dom-popstateevent-state title=dom-PopStateEvent-state>state</a>;
void <a href=#dom-popstateevent-initpopstateevent title=dom-PopStateEvent-initPopStateEvent>initPopStateEvent</a>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in any stateArg);
void <a href=#dom-popstateevent-initpopstateeventns title=dom-PopStateEvent-initPopStateEventNS>initPopStateEventNS</a>(in DOMString namespaceURIArg, in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in any stateArg);
@@ -39170,7 +41726,9 @@
being the same as setting the <code title=dom-location-href><a href=#dom-location-href>href</a></code> attribute to the new output
value.</p>
- <hr><p>The <dfn id=dom-location-resolveurl title=dom-location-resolveURL><code>resolveURL(<var title="">url</var>)</code></dfn> method must <a href=#resolve-a-url title="resolve a
+ <hr>
+
+ <p>The <dfn id=dom-location-resolveurl title=dom-location-resolveURL><code>resolveURL(<var title="">url</var>)</code></dfn> method must <a href=#resolve-a-url title="resolve a
url">resolve</a> its <var title="">url</var> argument, relative
to the <a href=#first-script>first script</a>'s <a href="#script's-base-url" title="script's base
URL">base URL</a>, and if that succeeds, return the resulting
@@ -39186,14 +41744,18 @@
object's associated <code>Document</code>'s <a href=#effective-script-origin>effective script
origin</a>, with the following exceptions:</p>
- <ul><li>The <code title=dom-location-href><a href=#dom-location-href>href</a></code> setter, if the
+ <ul>
+
+ <li>The <code title=dom-location-href><a href=#dom-location-href>href</a></code> setter, if the
script is running in a <a href=#browsing-context>browsing context</a> that is
<a href=#allowed-to-navigate>allowed to navigate</a> the browsing context with which
the <code><a href=#location>Location</a></code> object is associated
- </ul><p>User agents must not allow scripts to override the <code title=dom-location-href><a href=#dom-location-href>href</a></code> attribute's setter.</p>
+ </ul>
+ <p>User agents must not allow scripts to override the <code title=dom-location-href><a href=#dom-location-href>href</a></code> attribute's setter.</p>
+
<h4 id=history-notes><span class=secno>5.9.5 </span>Implementation notes for session history</h4>
<p><em>This section is non-normative.</em></p>
@@ -39252,7 +41814,9 @@
<p>When a browsing context is <dfn id=navigate title=navigate>navigated</dfn>
to a new resource, the user agent must run the following steps:</p>
- <ol><li id=sandboxLinks><p>If the <a href=#source-browsing-context>source browsing
+ <ol>
+
+ <li id=sandboxLinks><p>If the <a href=#source-browsing-context>source browsing
context</a> is not the same as the <a href=#browsing-context>browsing context</a>
being navigated, and the <a href=#source-browsing-context>source browsing context</a> is
not one of the <a href=#ancestor-browsing-context title="ancestor browsing context">ancestor
@@ -39333,7 +41897,9 @@
agent must include an <code title=http-origin>XXX-Origin</code>
header whose value is determined as follows:</p>
- <dl class=switch><dt>If the <a href=#navigate title=navigate>navigation</a> algorithm has
+ <dl class=switch>
+
+ <dt>If the <a href=#navigate title=navigate>navigation</a> algorithm has
so far contacted more than one <a href=#origin-0>origin</a></dt>
<dt>If there is no <a href=#source-browsing-context>source browsing context</a></dt>
@@ -39346,8 +41912,10 @@
the <a href=#active-document>active document</a> of the <a href=#source-browsing-context>source browsing
context</a> at the time the navigation was started.</dd>
- </dl></li>
+ </dl>
+ </li>
+
<li>
<p>If fetching the resource is synchronous (i.e. for <a href=#javascript-protocol title="javascript protocol"><code title="">javascript:</code>
@@ -39416,10 +41984,12 @@
<div class=note>
<p>Such processing might be triggered by, amongst other things, the
following:</p>
- <ul class=brief><li>HTTP status codes (e.g. 204 No Content or 205 Reset Content)</li>
+ <ul class=brief>
+ <li>HTTP status codes (e.g. 204 No Content or 205 Reset Content)</li>
<li>HTTP Content-Disposition headers</li>
<li>Network errors</li>
- </ul></div>
+ </ul>
+ </div>
<!-- XXX should we define 205 processing here? e.g. reset all forms? -->
@@ -39450,7 +42020,9 @@
of the following types, jump to the appropriate entry in the
following list, and process the resource as described there:</p>
- <dl class=switch><dt>"text/html"</dt>
+ <dl class=switch>
+
+ <dt>"text/html"</dt>
<dd>Follow the steps given in the <a href=#read-html title=navigate-html>HTML document</a> section, and abort
these steps.</dd>
@@ -39476,7 +42048,9 @@
<dd>Follow the steps given in the <a href=#read-plugin title=navigate-plugin>plugin</a> section, and abort these
steps.</dd>
- </dl><p><dfn id="set-the-document's-address" title="set the document's address">Setting the document's
+ </dl>
+
+ <p><dfn id="set-the-document's-address" title="set the document's address">Setting the document's
address</dfn>: If there is no <dfn id=override-url>override URL</dfn>, then any
<code>Document</code> created by these steps must have its <a href="#the-document's-address" title="the document's address">address</a> set to the
<a href=#url>URL</a> that was originally to be <a href=#fetch title=fetch>fetched</a>, ignoring any other data that was
@@ -39509,14 +42083,18 @@
e.g. because the resource is to be handed to an external
application. Process the resource appropriately.</p>
- </ol><p>Some of the sections below, to which the above algorithm defers
+ </ol>
+
+ <p>Some of the sections below, to which the above algorithm defers
in certain cases, require the user agent to <dfn id=update-the-session-history-with-the-new-page>update the session
history with the new page</dfn>. When a user agent is required to do
this, it must follows the set of steps given below that is
appropriate for the situation at hand. From the point of view of any
script, these steps must occur atomically.</p>
- <ol><li><p class=XXX>pause for scripts -- but don't use the
+ <ol>
+
+ <li><p class=XXX>pause for scripts -- but don't use the
"pause" definition since that involves not running script!</li>
<li><p><a href=#unload-a-document title="unload a document">Unload</a> the
@@ -39526,12 +42104,16 @@
<li>
- <dl><dt>If the navigation was initiated for <dfn id=entry-update>entry update</dfn> of
+ <dl>
+
+ <dt>If the navigation was initiated for <dfn id=entry-update>entry update</dfn> of
an entry</dt>
<dd>
- <ol><li><p>Replace the entry being updated with a new entry
+ <ol>
+
+ <li><p>Replace the entry being updated with a new entry
representing the new resource and its <code>Document</code>
object and related state. The user agent may propagate state from
the old entry to the new entry (e.g. scroll position).</li>
@@ -39539,14 +42121,18 @@
<li><p><a href=#traverse-the-history>Traverse the history</a> to the new
entry.</li>
- </ol></dd>
+ </ol>
+ </dd>
+
<dt>Otherwise</dt>
<dd>
- <ol><li><p>Remove all the entries after the <a href=#current-entry>current
+ <ol>
+
+ <li><p>Remove all the entries after the <a href=#current-entry>current
entry</a> in the <a href=#browsing-context>browsing context</a>'s
<code>Document</code> object's <code><a href=#history-1>History</a></code> object.</p>
<p class=note>This <a href=#history-notes>doesn't necessarily
@@ -39563,12 +42149,19 @@
enabled</dfn>, remove the entry immediately before the new
<a href=#current-entry>current entry</a> in the session history.</li>
- </ol></dd>
+ </ol>
- </dl></li>
+ </dd>
- </ol><h4 id=read-html><span class=secno>5.10.2 </span><dfn title=navigate-html>Page load processing model for HTML files</dfn></h4>
+ </dl>
+ </li>
+
+ </ol>
+
+
+ <h4 id=read-html><span class=secno>5.10.2 </span><dfn title=navigate-html>Page load processing model for HTML files</dfn></h4>
+
<p>When an HTML document is to be loaded in a <a href=#browsing-context>browsing
context</a>, the user agent must create a <code>Document</code>
object, mark it as being an <a href=#html-documents title="HTML documents">HTML
@@ -39830,7 +42423,9 @@
the following processing model must be followed to determine what
<a href=#the-indicated-part-of-the-document>the indicated part of the document</a> is.</p>
- <ol><li><p><a href=#parse-a-url title="parse a url">Parse</a> the <a href=#url>URL</a>,
+ <ol>
+
+ <li><p><a href=#parse-a-url title="parse a url">Parse</a> the <a href=#url>URL</a>,
and let <i>fragid</i> be the <a href=#url-fragment title=url-fragment><fragment></a> component of the
URL.</li><!-- parsing can't fail, since we checked earlier on
when navigating -->
@@ -39852,7 +42447,9 @@
<li><p>Otherwise, there is no indicated part of the
document.</li>
- </ol><p>For the purposes of the interaction of HTML with Selectors' <code title=selector-target>:target</code> pseudo-class, the
+ </ol>
+
+ <p>For the purposes of the interaction of HTML with Selectors' <code title=selector-target>:target</code> pseudo-class, the
<dfn id=target-element><i>target element</i></dfn> is <a href=#the-indicated-part-of-the-document>the indicated part of the
document</a>, if that is an element; otherwise there is no
<i><a href=#target-element>target element</a></i>. <a href=#refsSELECTORS>[SELECTORS]</a></p>
@@ -39864,7 +42461,9 @@
to a <i>specified entry</i>, the user agent must act as
follows:</p>
- <ol><li><p>If there is no longer a <code>Document</code> object for the
+ <ol>
+
+ <li><p>If there is no longer a <code>Document</code> object for the
entry in question, the user agent must <a href=#navigate>navigate</a> the
browsing context to the location for that entry to perform an
<a href=#entry-update>entry update</a> of that entry, and abort these steps. The
@@ -39887,7 +42486,9 @@
<code>Document</code> object than the <a href=#current-entry>current entry</a>
then the user agent must run the following substeps:</p>
- <ol><li>If the browsing context is a <a href=#top-level-browsing-context>top-level browsing
+ <ol>
+
+ <li>If the browsing context is a <a href=#top-level-browsing-context>top-level browsing
context</a> (and not an <a href=#auxiliary-browsing-context>auxiliary browsing
context</a>), and the <a href=#origin-0>origin</a> of the
<code>Document</code> of the <i>specified entry</i> is not the
@@ -39895,7 +42496,9 @@
of the <code>Document</code> of the <a href=#current-entry>current entry</a>,
then the following sub-sub-steps must be run:
- <ol><li>The current <a href=#browsing-context-name>browsing context name</a> must be
+ <ol>
+
+ <li>The current <a href=#browsing-context-name>browsing context name</a> must be
stored with all the entries in the history that are associated
with <code>Document</code> objects with the <a href=#same-origin>same
origin</a> as the <a href=#active-document>active document</a> <em>and</em>
@@ -39904,8 +42507,10 @@
<li id=resetBCName>The browsing context's <a href=#browsing-context-name>browsing
context name</a> must be unset.</li>
- </ol></li>
+ </ol>
+ </li>
+
<li id=appcache-history-2>The user agent must make the
<i>specified entry</i>'s <code>Document</code> object the
<a href=#active-document>active document</a> of the <a href=#browsing-context>browsing
@@ -39915,7 +42520,9 @@
context name</a> stored with it, then the following
sub-sub-steps must be run:
- <ol><li>The browsing context's <a href=#browsing-context-name>browsing context name</a>
+ <ol>
+
+ <li>The browsing context's <a href=#browsing-context-name>browsing context name</a>
must be set to the name stored with the specified entry.</li>
<li>Any <a href=#browsing-context-name>browsing context name</a> stored with the
@@ -39924,10 +42531,14 @@
as the new <a href=#active-document>active document</a>, and that are
contiguous with the specified entry, must be cleared.</li>
- </ol></li>
+ </ol>
- </ol></li>
+ </li>
+ </ol>
+
+ </li>
+
<li><p>If the <i>specified entry</i> is a state object or the
first entry for a <code>Document</code>, the user agent must <a href=#activating-state-object-entries title="activate the state object">activate that
entry</a>.</li>
@@ -39949,7 +42560,9 @@
<li><p>The <a href=#current-entry>current entry</a> is now the <i>specified
entry</i>.</li>
- </ol><p class=XXX>how does the changing of the global attributes
+ </ol>
+
+ <p class=XXX>how does the changing of the global attributes
affect .watch() when seen from other Windows?</p>
@@ -39961,8 +42574,10 @@
whether the <code>Document</code> object is going to be
re-used. (This is set by the <code title=dom-document-open><a href=#dom-document-open>document.open()</a></code> method.)</p>
- <ol><li><p>Set <var title="">salvageable</var> to true.</li>
+ <ol>
+ <li><p>Set <var title="">salvageable</var> to true.</li>
+
<li><p>Let <var title="">event</var> be a new
<code><a href=#beforeunloadevent>BeforeUnloadEvent</a></code> event object with the name <code title=event-beforeunload>beforeunload</code>, with no namespace,
which does not bubble but is cancelable.</li>
@@ -40009,8 +42624,12 @@
<li><p>If <var title="">salvageable</var> and <var title="">recycle</var> are both false, <a href=#discard-a-document title="discard a
document">discard the <code>Document</code></a>.</li>
- </ol><h5 id=event-definition><span class=secno>5.10.10.1 </span>Event definition</h5>
+ </ol>
+
+
+ <h5 id=event-definition><span class=secno>5.10.10.1 </span>Event definition</h5>
+
<pre class=idl>interface <dfn id=beforeunloadevent>BeforeUnloadEvent</dfn> : Event {
attribute DOMString <a href=#dom-beforeunloadevent-returnvalue title=dom-BeforeUnloadEvent-returnValue>returnValue</a>;
};</pre>
@@ -40578,7 +43197,7 @@
<p>The version that the database was opened with is the <dfn id=concept-database-expected-version title=concept-database-expected-version>expected version</dfn> of
this <code><a href=#database>Database</a></code> object. It can be the empty string, in
- which case there is no expected version — any version is
+ which case there is no expected version — any version is
fine.</p>
<p>On getting, the <dfn id=dom-database-version title=dom-database-version><code>version</code></dfn> attribute
@@ -40596,13 +43215,19 @@
fifth argument, the <i>preflight operation</i> being the
following:</p>
- <ol><li><p>Check that the value of the first argument to the <code title=dom-database-changeVersion><a href=#dom-database-changeversion>changeVersion()</a></code> method
+ <ol>
+
+ <li><p>Check that the value of the first argument to the <code title=dom-database-changeVersion><a href=#dom-database-changeversion>changeVersion()</a></code> method
exactly matches the database's actual version. If it does not, then
the <i>preflight operation</i> fails.</li>
- </ol><p>...the <i>postflight operation</i> being the following:</p>
+ </ol>
- <ol><li>Change the database's actual version to the value of the second
+ <p>...the <i>postflight operation</i> being the following:</p>
+
+ <ol>
+
+ <li>Change the database's actual version to the value of the second
argument to the <code title=dom-database-changeVersion><a href=#dom-database-changeversion>changeVersion()</a></code>
method.</li>
@@ -40610,9 +43235,11 @@
the value of the second argument to the <code title=dom-database-changeVersion><a href=#dom-database-changeversion>changeVersion()</a></code>
method.</li>
- </ol><p>...and the <i>mode</i> being read/write.</p>
+ </ol>
+ <p>...and the <i>mode</i> being read/write.</p>
+
<h5 id=executing-sql-statements><span class=secno>5.11.2.3 </span>Executing SQL statements</h5>
<p>The <code title=dom-database-transaction><a href=#dom-database-transaction>transaction()</a></code>
@@ -40639,10 +43266,12 @@
<p>When the <dfn id=dom-sqltransaction-executesql title=dom-sqltransaction-executeSql><code>executeSql(<var title="">sqlStatement</var>, <var title="">arguments</var>, <var title="">callback</var>, <var title="">errorCallback</var>)</code></dfn> method is invoked, the
user agent must run the following algorithm. (This algorithm is
relatively simple in that it doesn't actually execute any SQL
- — the bulk of the work is actually done as part of the
+ — the bulk of the work is actually done as part of the
<a href=#transaction-steps>transaction steps</a>.)</p>
- <ol><li><p>If the method was not invoked during the execution of a
+ <ol>
+
+ <li><p>If the method was not invoked during the execution of a
<code><a href=#sqltransactioncallback>SQLTransactionCallback</a></code>,
<code><a href=#sqlstatementcallback>SQLStatementCallback</a></code>, or
<code><a href=#sqlstatementerrorcallback>SQLStatementErrorCallback</a></code> then raise an
@@ -40700,7 +43329,9 @@
the third argument (if any) as the statement's result set callback
and the fourth argument (if any) as the error callback.</li>
- </ol><p>The user agent must act as if the database was hosted in an
+ </ol>
+
+ <p>The user agent must act as if the database was hosted in an
otherwise completely empty environment with no resources. For
example, attempts to read from or write to the file system will
fail.</p>
@@ -40798,31 +43429,42 @@
attribute must return the most appropriate code from the following
table:</p>
- <table><thead><tr><th>Code
+ <table>
+ <thead>
+ <tr>
+ <th>Code
<th>Situation
- <tbody><tr><td><dfn id=dom-sqlerror-code-0 title=dom-sqlerror-code-0>0</dfn>
+ <tbody>
+
+ <tr>
+ <td><dfn id=dom-sqlerror-code-0 title=dom-sqlerror-code-0>0</dfn>
<td>The transaction failed for reasons unrelated to the database
itself and not covered by any other error code.
- <tr><td><dfn id=dom-sqlerror-code-1 title=dom-sqlerror-code-1>1</dfn>
+ <tr>
+ <td><dfn id=dom-sqlerror-code-1 title=dom-sqlerror-code-1>1</dfn>
<td>The statement failed for database reasons not covered by any
other error code.
- <tr><td><dfn id=dom-sqlerror-code-2 title=dom-sqlerror-code-2>2</dfn>
+ <tr>
+ <td><dfn id=dom-sqlerror-code-2 title=dom-sqlerror-code-2>2</dfn>
<td>The statement failed because the <a href=#concept-database-expected-version title=concept-database-expected-version>expected version</a>
of the database didn't match the actual database version.
- <tr><td><dfn id=dom-sqlerror-code-3 title=dom-sqlerror-code-3>3</dfn>
+ <tr>
+ <td><dfn id=dom-sqlerror-code-3 title=dom-sqlerror-code-3>3</dfn>
<td>The statement failed because the data returned from the
database was too large. The SQL "LIMIT" modifier might be useful
to reduce the size of the result set.
- <tr><td><dfn id=dom-sqlerror-code-4 title=dom-sqlerror-code-4>4</dfn>
+ <tr>
+ <td><dfn id=dom-sqlerror-code-4 title=dom-sqlerror-code-4>4</dfn>
<td>The statement failed because there was not enough remaining
storage space, or the storage quota was reached and the user
declined to give more space to the database.
- <tr><td><dfn id=dom-sqlerror-code-5 title=dom-sqlerror-code-5>5</dfn>
+ <tr>
+ <td><dfn id=dom-sqlerror-code-5 title=dom-sqlerror-code-5>5</dfn>
<td>The statement failed because the transaction's first
statement was a read-only statement, and a subsequent statement
in the same transaction tried to modify the database, but the
@@ -40830,13 +43472,16 @@
transaction obtained a write lock and changed a part of the
database that the former transaction was depending upon.
- <tr><td><dfn id=dom-sqlerror-code-6 title=dom-sqlerror-code-6>6</dfn>
+ <tr>
+ <td><dfn id=dom-sqlerror-code-6 title=dom-sqlerror-code-6>6</dfn>
<td>An <code title="">INSERT</code>, <code title="">UPDATE</code>, or <code title="">REPLACE</code>
statement failed due to a constraint failure. For example,
because a row was being inserted and the value given for the
primary key column duplicated the value of an existing row.
- </table><p class=XXX>We should define a more thorough list of
+ </table>
+
+ <p class=XXX>We should define a more thorough list of
codes. Implementation feedback is requested to determine what codes
are needed.</p>
@@ -40856,7 +43501,9 @@
optionally a <i>postflight operation</i>, and with a <i>mode</i>
that is either read/write or read-only.</p>
- <ol><li><p>Open a new SQL transaction to the database, and create a
+ <ol>
+
+ <li><p>Open a new SQL transaction to the database, and create a
<code><a href=#sqltransaction>SQLTransaction</a></code> object that represents that
transaction. If the <i>mode</i> is read/write, the transaction must
have an exclusive write lock over the entire database. If the
@@ -40892,7 +43539,9 @@
optionally a result set callback, and optionally an error
callback.</p>
- <ol><li><p>If the statement is marked as bogus, jump to the "in case
+ <ol>
+
+ <li><p>If the statement is marked as bogus, jump to the "in case
of error" steps below.</li>
<li id=modifications-fail-if-read-only>
@@ -40930,11 +43579,15 @@
<li><p>Move on to the next statement, if any, or onto the next
overall step otherwise.</li>
- </ol><p>In case of error (or more specifically, if the above substeps
+ </ol>
+
+ <p>In case of error (or more specifically, if the above substeps
say to jump to the "in case of error" steps), run the following
substeps:</p>
- <ol><li><p>If the statement had an associated error callback, then
+ <ol>
+
+ <li><p>If the statement had an associated error callback, then
<a href=#queue-a-task>queue a task</a> to invoke that error callback with the
<code><a href=#sqltransaction>SQLTransaction</a></code> object and a newly constructed
<code><a href=#sqlerror>SQLError</a></code> object that represents the error that
@@ -40949,8 +43602,10 @@
there was no error callback. Jump to the last step in the overall
steps.</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>If a <i>postflight operation</i> was defined for this
instance of the transaction steps, run that. If it fails, then jump
to the last step. <!--The operation, if any, might depend
@@ -40975,8 +43630,12 @@
transaction. Rollback the transaction. Any still-pending statements
in the transaction are discarded.</li>
- </ol><h4 id=disk-space><span class=secno>5.11.3 </span>Disk space</h4>
+ </ol>
+
+
+ <h4 id=disk-space><span class=secno>5.11.3 </span>Disk space</h4>
+
<p>User agents should limit the total amount of space allowed for
storage areas and databases.</p>
@@ -41020,8 +43679,10 @@
<p>There are a number of techniques that can be used to mitigate the
risk of user tracking:</p>
- <ul><li>
+ <ul>
+ <li>
+
<p>Blocking third-party storage: user agents may restrict access
to the <code title=dom-localStorage><a href=#dom-localstorage>localStorage</a></code> and
database objects to scripts originating at the domain of the
@@ -41100,7 +43761,9 @@
</li>
- </ul><p>While these suggestions prevent trivial use of these APIs for
+ </ul>
+
+ <p>While these suggestions prevent trivial use of these APIs for
user tracking, they do not block it altogether. Within a single
domain, a site can continue to track the user during a session, and
can then pass all this information to the third party along with any
@@ -41267,7 +43930,7 @@
attribute on hyperlink elements, if present, gives the language of
the linked resource. It is purely advisory. The value must be a
valid RFC 3066 language code. <a href=#refsRFC3066>[RFC3066]</a>
- User agents must not consider this attribute authoritative —
+ User agents must not consider this attribute authoritative —
upon fetching the resource, user agents must use only language
information associated with the resource to determine its language,
not metadata included in the link to the resource.</p>
@@ -41277,7 +43940,7 @@
resource. It is purely advisory. The value must be a valid MIME
type, optionally with parameters. <a href=#refsRFC2046>[RFC2046]</a> User agents must not consider the
<code title=attr-hyperlink-type><a href=#attr-hyperlink-type>type</a></code> attribute
- authoritative — upon fetching the resource, user agents must
+ authoritative — upon fetching the resource, user agents must
not use metadata included in the link to the resource to determine
its type.</p>
@@ -41370,7 +44033,9 @@
authentication headers must be included in the request. Which other
headers are required depends on the URLs involved.</p>
- <dl class=switch><dt>If both the <a href="#the-document's-address" title="the document's address">address</a>
+ <dl class=switch>
+
+ <dt>If both the <a href="#the-document's-address" title="the document's address">address</a>
of the <code>Document</code> object containing the hyperlink being
audited and the ping URL have the <a href=#same-origin>same origin</a></dt>
@@ -41403,7 +44068,9 @@
include a <code title=http-ping-from>Ping-From</code> HTTP
header.</dd>
- </dl><p>In addition, an <code title=http-origin>XXX-Origin</code> header
+ </dl>
+
+ <p>In addition, an <code title=http-origin>XXX-Origin</code> header
must always be included, whose value is the <a href=#ascii-serialization-of-an-origin title="ASCII
serialization of an origin">ASCII serialization</a> of the
<a href=#origin-0>origin</a> of the the <code>Document</code> containing the
@@ -41444,7 +44111,9 @@
<p>However, the <code title=attr-hyperlink-ping><a href=#ping>ping</a></code> attribute
provides these advantages to the user over those alternatives:</p>
- <ul><li>It allows the user to see the final target URL
+ <ul>
+
+ <li>It allows the user to see the final target URL
unobscured.</li>
<li>It allows the UA to inform the user about the out-of-band
@@ -41456,7 +44125,9 @@
<li>It allows the UA to optimize the use of available network
bandwidth so that the target page loads faster.</li>
- </ul><p>Thus, while it is possible to track users without this feature,
+ </ul>
+
+ <p>Thus, while it is possible to track users without this feature,
authors are encouraged to use the <code title=attr-hyperlink-ping><a href=#ping>ping</a></code> attribute so that the user agent
can improve <!-- XXX optimize? --> the user experience.</p> <!--
XXX need a better way to end that sentence. It's what I mean, but
@@ -41496,111 +44167,192 @@
<p class=example>Thus, <code title="">rel="next"</code> is the
same as <code title="">rel="NEXT"</code>.</p>
- <table><thead><tr><th rowspan=2>Link type</th>
+ <table>
+ <thead>
+ <tr>
+ <th rowspan=2>Link type</th>
<th colspan=2>Effect on...</th>
<th rowspan=2>Brief description</th>
- <tr><th><code><a href=#the-link-element>link</a></code></th>
+ </tr>
+ <tr>
+ <th><code><a href=#the-link-element>link</a></code></th>
<th><code><a href=#the-a-element>a</a></code> and <code><a href=#the-area-element>area</a></code></th>
- <tbody><tr><td><code title=rel-alternate><a href=#link-type-alternate>alternate</a></code></td> <!-- second most used <link rel> value -->
+ </tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td><code title=rel-alternate><a href=#link-type-alternate>alternate</a></code></td> <!-- second most used <link rel> value -->
<td><a href=#hyperlink-link title="hyperlink link">Hyperlink</a></td>
<td><a href=#hyperlink>Hyperlink</a></td>
<td>Gives alternate representations of the current document.</td>
- <tr><td><code title=rel-archives><a href=#link-type-archives>archives</a></code></td>
+ </tr>
+
+ <tr>
+ <td><code title=rel-archives><a href=#link-type-archives>archives</a></code></td>
<td><a href=#hyperlink-link title="hyperlink link">Hyperlink</a></td>
<td><a href=#hyperlink>Hyperlink</a></td>
<td>Provides a link to a collection of records, documents, or other materials of historical interest.</td>
- <tr><td><code title=rel-author><a href=#link-type-author>author</a></code></td>
+ </tr>
+
+ <tr>
+ <td><code title=rel-author><a href=#link-type-author>author</a></code></td>
<td><a href=#hyperlink-link title="hyperlink link">Hyperlink</a></td>
<td><a href=#hyperlink>Hyperlink</a></td>
<td>Gives a link to the current document's author.</td>
- <tr><td><code title=rel-bookmark><a href=#link-type-bookmark>bookmark</a></code></td> <!-- fourth most used <a rel> value -->
+ </tr>
+
+ <tr>
+ <td><code title=rel-bookmark><a href=#link-type-bookmark>bookmark</a></code></td> <!-- fourth most used <a rel> value -->
<td><em>not allowed</em></td>
<td><a href=#hyperlink>Hyperlink</a></td>
<td>Gives the permalink for the nearest ancestor section.</td>
- </tr><!-- (commented out on the assumption that rel=contact is really XFN)
+ </tr>
+<!-- (commented out on the assumption that rel=contact is really XFN)
<tr>
<td><code title="rel-contact">contact</code></td> <!- 8th most used <a rel> value ->
<td><span title="hyperlink link">Hyperlink</span></td>
<td><span>Hyperlink</span></td>
<td>Gives a link to contact information for the current document.</td>
</tr>
---><tr><td><code title=rel-external><a href=#link-type-external>external</a></code></td> <!-- fifth and sixth most used <a rel> value (sixth is "external nofollow") -->
+-->
+ <tr>
+ <td><code title=rel-external><a href=#link-type-external>external</a></code></td> <!-- fifth and sixth most used <a rel> value (sixth is "external nofollow") -->
<td><em>not allowed</em></td>
<td><a href=#hyperlink>Hyperlink</a></td>
<td>Indicates that the referenced document is not part of the same site as the current document.</td>
- <tr><td><code title=rel-feed><a href=#link-type-feed>feed</a></code></td>
+ </tr>
+
+ <tr>
+ <td><code title=rel-feed><a href=#link-type-feed>feed</a></code></td>
<td><a href=#hyperlink-link title="hyperlink link">Hyperlink</a></td>
<td><a href=#hyperlink>Hyperlink</a></td>
<td>Gives the address of a syndication feed for the current document.</td>
- <tr><td><code title=rel-first><a href=#link-type-first>first</a></code></td>
+ </tr>
+
+ <tr>
+ <td><code title=rel-first><a href=#link-type-first>first</a></code></td>
<td><a href=#hyperlink-link title="hyperlink link">Hyperlink</a></td>
<td><a href=#hyperlink>Hyperlink</a></td>
<td>Indicates that the current document is a part of a series, and that the first document in the series is the referenced document.</td>
- <tr><td><code title=rel-help><a href=#link-type-help>help</a></code></td>
+ </tr>
+
+ <tr>
+ <td><code title=rel-help><a href=#link-type-help>help</a></code></td>
<td><a href=#hyperlink-link title="hyperlink link">Hyperlink</a></td>
<td><a href=#hyperlink>Hyperlink</a></td>
<td>Provides a link to context-sensitive help.</td>
- <tr><td><code title=rel-icon><a href=#rel-icon>icon</a></code></td> <!-- link rel="shortcut icon" and its ilk are the fourth, sixth, and ninth most used values -->
+ </tr>
+
+ <tr>
+ <td><code title=rel-icon><a href=#rel-icon>icon</a></code></td> <!-- link rel="shortcut icon" and its ilk are the fourth, sixth, and ninth most used values -->
<td><a href=#external-resource-link title="external resource link">External Resource</a></td>
<td><em>not allowed</em></td>
<td>Imports an icon to represent the current document.</td>
- <tr><td><code title=rel-index><a href=#link-type-index>index</a></code></td> <!-- used more than "top" and "contents" on <link> (though on <a>, "contents" wins) -->
+ </tr>
+
+ <tr>
+ <td><code title=rel-index><a href=#link-type-index>index</a></code></td> <!-- used more than "top" and "contents" on <link> (though on <a>, "contents" wins) -->
<td><a href=#hyperlink-link title="hyperlink link">Hyperlink</a></td>
<td><a href=#hyperlink>Hyperlink</a></td>
<td>Gives a link to the document that provides a table of contents or index listing the current document.</td>
- <tr><td><code title=rel-last><a href=#link-type-last>last</a></code></td>
+ </tr>
+
+ <tr>
+ <td><code title=rel-last><a href=#link-type-last>last</a></code></td>
<td><a href=#hyperlink-link title="hyperlink link">Hyperlink</a></td>
<td><a href=#hyperlink>Hyperlink</a></td>
<td>Indicates that the current document is a part of a series, and that the last document in the series is the referenced document.</td>
- <tr><td><code title=rel-license><a href=#link-type-license>license</a></code></td> <!-- seventh most used <a rel> value -->
+ </tr>
+
+ <tr>
+ <td><code title=rel-license><a href=#link-type-license>license</a></code></td> <!-- seventh most used <a rel> value -->
<td><a href=#hyperlink-link title="hyperlink link">Hyperlink</a></td>
<td><a href=#hyperlink>Hyperlink</a></td>
<td>Indicates that the current document is covered by the copyright license described by the referenced document.</td>
- <tr><td><code title=rel-next><a href=#link-type-next>next</a></code></td>
+ </tr>
+
+ <tr>
+ <td><code title=rel-next><a href=#link-type-next>next</a></code></td>
<td><a href=#hyperlink-link title="hyperlink link">Hyperlink</a></td>
<td><a href=#hyperlink>Hyperlink</a></td>
<td>Indicates that the current document is a part of a series, and that the next document in the series is the referenced document.</td>
- <tr><td><code title=rel-nofollow><a href=#link-type-nofollow>nofollow</a></code></td> <!-- most used <a rel> value (and sixth most used is "external nofollow") -->
+ </tr>
+
+ <tr>
+ <td><code title=rel-nofollow><a href=#link-type-nofollow>nofollow</a></code></td> <!-- most used <a rel> value (and sixth most used is "external nofollow") -->
<td><em>not allowed</em></td>
<td><a href=#hyperlink>Hyperlink</a></td>
<td>Indicates that the current document's original author or publisher does not endorse the referenced document.</td>
- <tr><td><code title=rel-noreferrer><a href=#link-type-noreferrer>noreferrer</a></code></td>
+ </tr>
+
+ <tr>
+ <td><code title=rel-noreferrer><a href=#link-type-noreferrer>noreferrer</a></code></td>
<td><em>not allowed</em></td>
<td><a href=#hyperlink>Hyperlink</a></td>
<td>Requires that the user agent not send an HTTP <code title="">Referer</code> header if the user follows the hyperlink.</td>
- <tr><td><code title=rel-pingback><a href=#link-type-pingback>pingback</a></code></td>
+ </tr>
+
+ <tr>
+ <td><code title=rel-pingback><a href=#link-type-pingback>pingback</a></code></td>
<td><a href=#external-resource-link title="external resource link">External Resource</a></td>
<td><em>not allowed</em></td>
<td>Gives the address of the pingback server that handles pingbacks to the current document.</td>
- <tr><td><code title=rel-prefetch><a href=#link-type-prefetch>prefetch</a></code></td>
+ </tr>
+
+ <tr>
+ <td><code title=rel-prefetch><a href=#link-type-prefetch>prefetch</a></code></td>
<td><a href=#external-resource-link title="external resource link">External Resource</a></td>
<td><em>not allowed</em></td>
<td>Specifies that the target resource should be preemptively cached.</td>
- <tr><td><code title=rel-prev><a href=#link-type-prev>prev</a></code></td> <!-- prev is used more than previous -->
+ </tr>
+
+ <tr>
+ <td><code title=rel-prev><a href=#link-type-prev>prev</a></code></td> <!-- prev is used more than previous -->
<td><a href=#hyperlink-link title="hyperlink link">Hyperlink</a></td>
<td><a href=#hyperlink>Hyperlink</a></td>
<td>Indicates that the current document is a part of a series, and that the previous document in the series is the referenced document.</td>
- <tr><td><code title=rel-search><a href=#link-type-search>search</a></code></td> <!-- used quite a bit -->
+ </tr>
+
+ <tr>
+ <td><code title=rel-search><a href=#link-type-search>search</a></code></td> <!-- used quite a bit -->
<td><a href=#hyperlink-link title="hyperlink link">Hyperlink</a></td>
<td><a href=#hyperlink>Hyperlink</a></td>
<td>Gives a link to a resource that can be used to search through the current document and its related pages.</td>
- <tr><td><code title=rel-stylesheet><a href=#link-type-stylesheet>stylesheet</a></code></td> <!-- most commonly used <link rel> value, variants came in 7th, 8th, 12th, 17th... -->
+ </tr>
+
+ <tr>
+ <td><code title=rel-stylesheet><a href=#link-type-stylesheet>stylesheet</a></code></td> <!-- most commonly used <link rel> value, variants came in 7th, 8th, 12th, 17th... -->
<td><a href=#external-resource-link title="external resource link">External Resource</a></td>
<td><em>not allowed</em></td>
<td>Imports a stylesheet.</td>
- <tr><td><code title=rel-sidebar><a href=#link-type-sidebar>sidebar</a></code></td> <!-- used quite a bit -->
+ </tr>
+
+ <tr>
+ <td><code title=rel-sidebar><a href=#link-type-sidebar>sidebar</a></code></td> <!-- used quite a bit -->
<td><a href=#hyperlink-link title="hyperlink link">Hyperlink</a></td>
<td><a href=#hyperlink>Hyperlink</a></td>
<td>Specifies that the referenced document, if retrieved, is intended to be shown in the browser's sidebar (if it has one).</td>
- <tr><td><code title=rel-tag><a href=#link-type-tag>tag</a></code></td> <!-- second and third most used <a rel> value (third is technically "category tag"). -->
+ </tr>
+
+ <tr>
+ <td><code title=rel-tag><a href=#link-type-tag>tag</a></code></td> <!-- second and third most used <a rel> value (third is technically "category tag"). -->
<td><a href=#hyperlink-link title="hyperlink link">Hyperlink</a></td>
<td><a href=#hyperlink>Hyperlink</a></td>
<td>Gives a tag (identified by the given address) that applies to the current document.</td>
- <tr><td><code title=rel-up><a href=#link-type-up>up</a></code></td>
+ </tr>
+
+ <tr>
+ <td><code title=rel-up><a href=#link-type-up>up</a></code></td>
<td><a href=#hyperlink-link title="hyperlink link">Hyperlink</a></td>
<td><a href=#hyperlink>Hyperlink</a></td>
<td>Provides a link to a document giving the context for the current document.</td>
- </table><p>Some of the types described below list synonyms for these
+ </tr>
+
+ </tbody>
+ </table>
+
+ <p>Some of the types described below list synonyms for these
values. These are to be handled as specified by user agents, but
must not be used in documents.</p>
@@ -41692,7 +44444,7 @@
user agent must treat the link as it would if it had the <code title=rel-feed><a href=#link-type-feed>feed</a></code> keyword specified as well.</p>
<p>The <code title=rel-alternate><a href=#link-type-alternate>alternate</a></code> link
- relationship is transitive — that is, if a document links to
+ relationship is transitive — that is, if a document links to
two other documents with the link type "<code title=rel-alternate><a href=#link-type-alternate>alternate</a></code>", then, in addition to
implying that those documents are alternative representations of the
first document, it is also implying that those two documents are
@@ -41924,7 +44676,9 @@
<p>Other keywords must be further parsed as follows to determine
what they represent:</p>
- <ul><li><p>If the keyword doesn't contain exactly one U+0078 LATIN
+ <ul>
+
+ <li><p>If the keyword doesn't contain exactly one U+0078 LATIN
SMALL LETTER X character, then this keyword doesn't represent
anything. Abort these steps for that keyword.</li>
@@ -41950,7 +44704,9 @@
icon with a width of <var title="">width</var> device pixels and a
height of <var title="">height</var> device pixels.</li>
- </ul><p>The keywords specified on the <code title=attr-link-sizes><a href=#attr-link-sizes>sizes</a></code> attribute must not represent
+ </ul>
+
+ <p>The keywords specified on the <code title=attr-link-sizes><a href=#attr-link-sizes>sizes</a></code> attribute must not represent
icon sizes that are not actually available in the linked
resource.</p>
@@ -41966,7 +44722,7 @@
<pre><!DOCTYPE HTML>
<html>
<head>
- <title>lsForums — Inbox</title>
+ <title>lsForums — Inbox</title>
<link rel=icon href=favicon.png sizes="16x16">
<link rel=icon href=windows.ico sizes="32x32 48x48">
<link rel=icon href=mac.icns sizes="128x128 512x512 8192x8192 32768x32768">
@@ -42285,8 +45041,10 @@
time to add a type. Extension types must be specified with the
following information:</p>
- <dl><dt>Keyword</dt>
+ <dl>
+ <dt>Keyword</dt>
+
<dd><p>The actual value being defined. The value should not be
confusingly similar to any other defined value (e.g. differing only
in case).</dd>
@@ -42298,8 +45056,10 @@
<p>One of the following:</p>
- <dl><dt>not allowed</dt>
+ <dl>
+ <dt>not allowed</dt>
+
<dd>The keyword is not allowed to be specified on
<code><a href=#the-link-element>link</a></code> elements.</dd>
@@ -42315,17 +45075,21 @@
it creates a <a href=#external-resource-link title="external resource link">external
resource link</a>.</dd>
- </dl></dd>
+ </dl>
+ </dd>
+
<dt>Effect on... <code><a href=#the-a-element>a</a></code> and <code><a href=#the-area-element>area</a></code></dt>
<dd>
<p>One of the following:</p>
- <dl><dt>not allowed</dt>
+ <dl>
+ <dt>not allowed</dt>
+
<dd>The keyword is not allowed to be specified on <code><a href=#the-a-element>a</a></code>
and <code><a href=#the-area-element>area</a></code> elements.</dd>
@@ -42334,9 +45098,11 @@
<dd>The keyword may be specified on <code><a href=#the-a-element>a</a></code> and
<code><a href=#the-area-element>area</a></code> elements.</dd>
- </dl></dd>
+ </dl>
+ </dd>
+
<dt>Brief description</dt>
<dd><p>A short description of what the keyword's meaning is.</dd>
@@ -42363,8 +45129,10 @@
<p>One of the following:</p>
- <dl><dt>Proposal</dt>
+ <dl>
+ <dt>Proposal</dt>
+
<dd>The keyword has not received wide peer review and
approval. It is included for completeness because pages use the
keyword. Pages should not use the keyword.</dd>
@@ -42385,7 +45153,9 @@
<code><a href=#the-area-element>area</a></code>" information should be set to "not
allowed".</dd>
- </dl><p>If a keyword is added with the "proposal" status and found to
+ </dl>
+
+ <p>If a keyword is added with the "proposal" status and found to
be redundant with existing values, it should be removed and listed
as a synonym for the existing value. If a keyword is added with
the "proposal" status and found to be harmful, then it should be
@@ -42394,7 +45164,9 @@
</dd>
- </dl><p>Conformance checkers must use the information given on the WHATWG
+ </dl>
+
+ <p>Conformance checkers must use the information given on the WHATWG
Wiki RelExtensions page to establish if a value not explicitly
defined in this specification is allowed or not. When an author uses
a new type not defined by either this specification or the Wiki
@@ -42462,7 +45234,7 @@
used to hide content that could legitimately be shown in another
presentation. For example, it is incorrect to use <code title=attr-hidden><a href=#the-hidden-attribute>hidden</a></code> to hide panels in a tabbed dialog,
because the tabbed interface is merely a kind of overflow
- presentation — showing all the form controls in one big page
+ presentation — showing all the form controls in one big page
with a scrollbar would be equivalent, and no less correct.</p>
<p>Elements in a section hidden by the <code title=attr-hidden><a href=#the-hidden-attribute>hidden</a></code> attribute are still active,
@@ -42488,7 +45260,9 @@
<p>The <dfn id=dom-click title=dom-click>click()</dfn> method must run these
steps:</p>
- <ol><li><p>If the element's <var title="">click in progress</var> flag
+ <ol>
+
+ <li><p>If the element's <var title="">click in progress</var> flag
is set to true, then abort these steps.</li>
<li><p>Set the <var title="">click in progress</var> flag on the
@@ -42502,8 +45276,12 @@
<li><p>Set the <var title="">click in progress</var> flag on the
element to false.</li>
- </ol><h3 id=scrolling-elements-into-view><span class=secno>6.4 </span>Scrolling elements into view</h3>
+ </ol>
+
+
+ <h3 id=scrolling-elements-into-view><span class=secno>6.4 </span>Scrolling elements into view</h3>
+
<p>The <dfn id=dom-scrollintoview title=dom-scrollIntoView><code>scrollIntoView([<var title="">top</var>])</code></dfn> method, when called, must cause
the element on which the method was called to have the attention of
the user called to it.</p>
@@ -42559,7 +45337,7 @@
<p>User agents may track focus for each <a href=#browsing-context>browsing
context</a> or <code>Document</code> individually, or may support
only one focused elment per <a href=#top-level-browsing-context>top-level browsing context</a>
- — user agents should follow platform conventions in this
+ — user agents should follow platform conventions in this
regard.</p>
<p>Which elements within a <a href=#top-level-browsing-context>top-level browsing context</a>
@@ -42590,7 +45368,9 @@
<a href=#rules-for-parsing-integers>rules for parsing integers</a>. The attribute's values have
the following meanings:</p>
- <dl><dt>If the attribute is omitted or parsing the value returns an
+ <dl>
+
+ <dt>If the attribute is omitted or parsing the value returns an
error</dt>
<dd>
@@ -42632,7 +45412,9 @@
and should place the element in the sequential focus navigation
order so that it is:</p>
- <ul><li>before any focusable element whose <code title=attr-tabindex><a href=#attr-tabindex>tabindex</a></code> attribute has been
+ <ul>
+
+ <li>before any focusable element whose <code title=attr-tabindex><a href=#attr-tabindex>tabindex</a></code> attribute has been
omitted or whose value, when parsed, returns an error,</li>
<li>before any focusable element whose <code title=attr-tabindex><a href=#attr-tabindex>tabindex</a></code> attribute has a value equal
@@ -42656,9 +45438,13 @@
greater than the value of the <code title=attr-tabindex><a href=#attr-tabindex>tabindex</a></code> attribute on the
element.</li>
- </ul></dd>
+ </ul>
- </dl><p>An element is <dfn id=focusable>focusable</dfn> if the <code title=attr-tabindex><a href=#attr-tabindex>tabindex</a></code> attribute's definition above
+ </dd>
+
+ </dl>
+
+ <p>An element is <dfn id=focusable>focusable</dfn> if the <code title=attr-tabindex><a href=#attr-tabindex>tabindex</a></code> attribute's definition above
defines the element to be focusable <em>and</em> the element is
<span>being rendered</span><!-- XXX xref, define display:none as not
being rendered, off-screen as being rendered? -->.</p>
@@ -42677,14 +45463,16 @@
attribute must <a href=#reflect>reflect</a> the value of the <code title=attr-tabindex><a href=#attr-tabindex>tabindex</a></code> content attribute. If the
attribute is not present, or parsing its value returns an error,
then the DOM attribute must return 0 for elements that are focusable
- and −1 for elements that are not focusable.</p>
+ and −1 for elements that are not focusable.</p>
<h4 id=focus-management><span class=secno>6.5.2 </span>Focus management</h4>
<p>The <dfn id=focusing-steps>focusing steps</dfn> are as follows:</p>
- <ol><li><p>If focusing the element will remove the focus from another
+ <ol>
+
+ <li><p>If focusing the element will remove the focus from another
element, then run the <a href=#unfocusing-steps>unfocusing steps</a> for that
element.</li>
@@ -42704,13 +45492,17 @@
<li><p><a href=#fire-a-simple-event>Fire a simple event</a> that doesn't bubble called
<code title=event-focus>focus</code> at the element.</li>
- </ol><p>User agents must run the <a href=#focusing-steps>focusing steps</a> for an
+ </ol>
+
+ <p>User agents must run the <a href=#focusing-steps>focusing steps</a> for an
element whenever the user moves the focus to a
<a href=#focusable>focusable</a> element.</p>
<p>The <dfn id=unfocusing-steps>unfocusing steps</dfn> are as follows:</p>
- <ol><li><p>If the element is an <code><a href=#the-input-element>input</a></code> element, and the
+ <ol>
+
+ <li><p>If the element is an <code><a href=#the-input-element>input</a></code> element, and the
<code title=event-input-change><a href=#event-input-change>change</a></code> event applies to the
element, and the element does not have a defined <a href=#activation-behavior>activation
behavior</a>, and the user has changed the element's <a href=#concept-fe-value title=concept-fe-value>value</a> or its list of <a href=#concept-input-type-file-selected title=concept-input-type-file-selected>selected files</a>
@@ -42724,7 +45516,9 @@
<li><p><a href=#fire-a-simple-event>Fire a simple event</a> that doesn't bubble called
<code title=event-blur>blur</code> at the element.</li>
- </ol><p>User agents should run the <a href=#unfocusing-steps>unfocusing steps</a> for an
+ </ol>
+
+ <p>User agents should run the <a href=#unfocusing-steps>unfocusing steps</a> for an
element whenever the user moves the focus away from any
<a href=#focusable>focusable</a> element.</p>
@@ -42773,7 +45567,9 @@
<p>The <dfn id=dom-focus title=dom-focus><code>focus()</code></dfn> method,
when invoked, must run the following algorithm:</p>
- <ol><li><p>If the element is marked as <i><a href=#locked-for-focus>locked for focus</a></i>, then abort
+ <ol>
+
+ <li><p>If the element is marked as <i><a href=#locked-for-focus>locked for focus</a></i>, then abort
these steps.</li>
<li><p>If the element is not <a href=#focusable>focusable</a>, then abort these
@@ -42786,7 +45582,9 @@
<li><p>Unmark the element as <i><a href=#locked-for-focus>locked for focus</a></i>.</li>
- </ol><p>The <dfn id=dom-blur title=dom-blur><code>blur()</code></dfn> method, when
+ </ol>
+
+ <p>The <dfn id=dom-blur title=dom-blur><code>blur()</code></dfn> method, when
invoked, should run the <a href=#unfocusing-steps>unfocusing steps</a> for the
element. User agents may selectively or uniformly ignore calls to
this method for usability reasons.</p>
@@ -43180,8 +45978,10 @@
action, but when it is not defined, suggested key bindings are
provided to guide implementors.</p>
- <dl><dt>Move the caret</dt>
+ <dl>
+ <dt>Move the caret</dt>
+
<dd><p>User agents must allow users to move the caret to any
position within an editing host, even into nested editable
elements. This could be triggered as the default action of <code title=event-keydown>keydown</code> events with various key
@@ -43344,7 +46144,11 @@
<!-- XXX something about not supporting resizing? -->
- </dl><!-- XXX each action performed should be added to the undo history --><p>User agents may perform several commands per user request; for
+ </dl>
+
+ <!-- XXX each action performed should be added to the undo history -->
+
+ <p>User agents may perform several commands per user request; for
example if the user selects a block of text and hits
<kbd><kbd>Enter</kbd></kbd>, the UA might interpret that as a
request to delete the content of <a href=#the-selection-0>the selection</a> followed
@@ -43391,8 +46195,10 @@
through defaults or through preferences expressed by the user. There
are three possible default behaviors for each element:</p>
- <dl><dt><dfn id=concept-spellcheck-default-true title=concept-spellcheck-default-true>true-by-default</dfn>
+ <dl>
+ <dt><dfn id=concept-spellcheck-default-true title=concept-spellcheck-default-true>true-by-default</dfn>
+
<dd>The element will be checked for spelling and grammar if its
contents are editable.
@@ -43406,14 +46212,20 @@
element's. Elements that have no parent element cannot have this as
their default behavior.
- </dl><hr><p>The <dfn id=attr-spellcheck title=attr-spellcheck><code>spellcheck</code></dfn>
+ </dl>
+
+ <hr>
+
+ <p>The <dfn id=attr-spellcheck title=attr-spellcheck><code>spellcheck</code></dfn>
attribute is an <a href=#enumerated-attribute>enumerated attribute</a> whose keywords are
<code title="">true</code> and <code title="">false</code>. The <code title="">true</code> keyword map to the <i>true</i> state. The <code title="">false</code> keyword maps to the <i>false</i> state. In
addition, there is a third state, the <i>inherit</i> state, which is
the <i>missing value default</i> (and the <i>invalid value
default</i>).</p>
- <hr><p>The <dfn id=dom-spellcheck title=dom-spellcheck><code>spellcheck</code></dfn> DOM
+ <hr>
+
+ <p>The <dfn id=dom-spellcheck title=dom-spellcheck><code>spellcheck</code></dfn> DOM
attribute, on getting, must return true if the element's <code title=attr-spellcheck><a href=#attr-spellcheck>spellcheck</a></code> content attribute is in
the <i>true</i> state, or if the element's <code title=attr-spellcheck><a href=#attr-spellcheck>spellcheck</a></code> content attribute is in
the <i>inherit</i> state and the element's <a href=#concept-spellcheck-default title=concept-spellcheck-default>default behavior</a> is <a href=#concept-spellcheck-default-true title=concept-spellcheck-default-true>true-by-default</a>, or
@@ -43434,10 +46246,14 @@
set to the literal string "<code title="">true</code>", otherwise it
must be set to the literal string "<code title="">false</code>".
- </p><hr><p>User agents must only consider the following pieces of text as
+ </p><hr>
+
+ <p>User agents must only consider the following pieces of text as
checkable for the purposes of this feature:</p>
- <ul><li>The value of <code><a href=#the-input-element>input</a></code> elements to which the <code title=attr-input-readonly><a href=#attr-input-readonly>readonly</a></code> attribute applies, but
+ <ul>
+
+ <li>The value of <code><a href=#the-input-element>input</a></code> elements to which the <code title=attr-input-readonly><a href=#attr-input-readonly>readonly</a></code> attribute applies, but
that are not <i title=concept-input-immutable><a href=#concept-input-immutable>immutable</a></i>
(i.e. that do not have the <code title=attr-input-readonly><a href=#attr-input-readonly>readonly</a></code> attribute specified and
that are not <a href=#concept-fe-disabled title=concept-fe-disabled>disabled</a>).</li>
@@ -43451,7 +46267,9 @@
<li>Text in attributes of <a href=#editable>editable</a> elements.</li>
- </ul><p>For text that is part of a <a href=#text-node>text node</a>, the element
+ </ul>
+
+ <p>For text that is part of a <a href=#text-node>text node</a>, the element
with which the text is associated is the element that is the
immediate parent of the first character of the word, sentence, or
other piece of text. For text in attributes, it is the attribute's
@@ -43463,7 +46281,11 @@
grammar-checking enabled, the UA must use the following
algorithm:</p>
- <ol><!-- user override --><li>If the user has disabled the checking for this text, then the
+ <ol>
+
+ <!-- user override -->
+
+ <li>If the user has disabled the checking for this text, then the
checking is disabled.</li>
<li>Otherwise, if the user has forced the checking for this text to
@@ -43500,7 +46322,9 @@
<li>Otherwise, checking is disabled.</li>
- </ol><p>If the checking is enabled for a word/sentence/text, the user
+ </ol>
+
+ <p>If the checking is enabled for a word/sentence/text, the user
agent should indicate spelling and/or grammar errors in that
text. User agents should take into account the other semantics given
in the document when suggesting spelling and grammar
@@ -43645,7 +46469,9 @@
<p>When a <code><a href=#datatransfer>DataTransfer</a></code> object is created, it must be
initialized as follows:</p>
- <ul><li>The <code><a href=#datatransfer>DataTransfer</a></code> object must initially contain no
+ <ul>
+
+ <li>The <code><a href=#datatransfer>DataTransfer</a></code> object must initially contain no
data, no elements, and have no associated image.</li>
<li>The <code><a href=#datatransfer>DataTransfer</a></code> object's <code title=dom-DataTransfer-effectAllowed><a href=#dom-datatransfer-effectallowed>effectAllowed</a></code>
@@ -43654,7 +46480,9 @@
<li>The <code title=dom-DataTransfer-dropEffect><a href=#dom-datatransfer-dropeffect>dropEffect</a></code>
attribute must be set to "<code title="">none</code>".</li>
- </ul><p>The <dfn id=dom-datatransfer-dropeffect title=dom-DataTransfer-dropEffect><code>dropEffect</code></dfn>
+ </ul>
+
+ <p>The <dfn id=dom-datatransfer-dropeffect title=dom-DataTransfer-dropEffect><code>dropEffect</code></dfn>
attribute controls the drag-and-drop feedback that the user is given
during a drag-and-drop operation.</p>
@@ -43748,7 +46576,11 @@
and the <code title="">relatedTarget</code> attribute set to
null.</p>
- <table><thead><tr><th> Event Name </th>
+ <table>
+
+ <thead>
+ <tr>
+ <th> Event Name </th>
<th> Target </th>
<th> Bubbles? </th>
<th> Cancelable? </th>
@@ -43756,63 +46588,93 @@
<th> <code title=dom-DataTransfer-effectAllowed><a href=#dom-datatransfer-effectallowed>effectAllowed</a></code> </th>
<th> <code title=dom-DataTransfer-dropEffect><a href=#dom-datatransfer-dropeffect>dropEffect</a></code> </th>
<th> Default Action </th>
- <tbody><tr><td><dfn id=event-dragstart title=event-dragstart><code>dragstart</code></dfn></td>
+ </tr>
+ </thead>
+
+ <tbody>
+
+ <tr>
+ <td><dfn id=event-dragstart title=event-dragstart><code>dragstart</code></dfn></td>
<td><a href=#source-node>Source node</a></td>
- <td>✓ Bubbles</td>
- <td>✓ Cancelable</td>
+ <td>✓ Bubbles</td>
+ <td>✓ Cancelable</td>
<td>Contains <a href=#source-node>source node</a> unless a selection is being dragged, in which case it is empty</td>
<td><code title="">uninitialized</code></td>
<td><code title="">none</code></td>
<td>Initiate the drag-and-drop operation</td>
- <tr><td><dfn id=event-drag title=event-drag><code>drag</code></dfn></td>
+ </tr>
+
+ <tr>
+ <td><dfn id=event-drag title=event-drag><code>drag</code></dfn></td>
<td><a href=#source-node>Source node</a></td>
- <td>✓ Bubbles</td>
- <td>✓ Cancelable</td>
+ <td>✓ Bubbles</td>
+ <td>✓ Cancelable</td>
<td>Empty</td>
<td><a href=#effectAllowed-initialization>Same as last event</a></td>
<td><code title="">none</code></td>
<td>Continue the drag-and-drop operation</td>
- <tr><td><dfn id=event-dragenter title=event-dragenter><code>dragenter</code></dfn></td>
+ </tr>
+
+ <tr>
+ <td><dfn id=event-dragenter title=event-dragenter><code>dragenter</code></dfn></td>
<td><a href=#immediate-user-selection>Immediate user selection</a> or <a href=#the-body-element-0>the body element</a></td>
- <td>✓ Bubbles</td>
- <td>✓ Cancelable</td>
+ <td>✓ Bubbles</td>
+ <td>✓ Cancelable</td>
<td>Empty</td>
<td><a href=#effectAllowed-initialization>Same as last event</a></td>
<td><a href=#dropEffect-initialization>Based on <code>effectAllowed</code> value</a></td>
<td>Reject <a href=#immediate-user-selection>immediate user selection</a> as potential <a href=#current-target-element title="current target element">target element</a></td>
- <tr><td><dfn id=event-dragleave title=event-dragleave><code>dragleave</code></dfn></td>
+ </tr>
+
+ <tr>
+ <td><dfn id=event-dragleave title=event-dragleave><code>dragleave</code></dfn></td>
<td><a href=#current-target-element title="current target element">Previous target element</a></td>
- <td>✓ Bubbles</td>
- <td>—</td>
+ <td>✓ Bubbles</td>
+ <td>—</td>
<td>Empty</td>
<td><a href=#effectAllowed-initialization>Same as last event</a></td>
<td><code title="">none</code></td>
<td>None</td>
- <tr><td><dfn id=event-dragover title=event-dragover><code>dragover</code></dfn></td>
+ </tr>
+
+ <tr>
+ <td><dfn id=event-dragover title=event-dragover><code>dragover</code></dfn></td>
<td><a href=#current-target-element>Current target element</a></td>
- <td>✓ Bubbles</td>
- <td>✓ Cancelable</td>
+ <td>✓ Bubbles</td>
+ <td>✓ Cancelable</td>
<td>Empty</td>
<td><a href=#effectAllowed-initialization>Same as last event</a></td>
<td><a href=#dropEffect-initialization>Based on <code>effectAllowed</code> value</a></td>
<td>Reset the <a href=#current-drag-operation>current drag operation</a> to "none"</td>
- <tr><td><dfn id=event-drop title=event-drop><code>drop</code></dfn></td>
+ </tr>
+
+ <tr>
+ <td><dfn id=event-drop title=event-drop><code>drop</code></dfn></td>
<td><a href=#current-target-element>Current target element</a></td>
- <td>✓ Bubbles</td>
- <td>✓ Cancelable</td>
+ <td>✓ Bubbles</td>
+ <td>✓ Cancelable</td>
<td><code>getData()</code> returns data set in <code title=dom-dragstart>dragstart</code> event</td>
<td><a href=#effectAllowed-initialization>Same as last event</a></td>
<td><a href=#current-drag-operation>Current drag operation</a></td>
<td>Varies</td>
- <tr><td><dfn id=event-dragend title=event-dragend><code>dragend</code></dfn></td>
+ </tr>
+
+ <tr>
+ <td><dfn id=event-dragend title=event-dragend><code>dragend</code></dfn></td>
<td><a href=#source-node>Source node</a></td>
- <td>✓ Bubbles</td>
- <td>—</td>
+ <td>✓ Bubbles</td>
+ <td>—</td>
<td>Empty</td>
<td><a href=#effectAllowed-initialization>Same as last event</a></td>
<td><a href=#current-drag-operation>Current drag operation</a></td>
<td>Varies</td>
- </table><p>The <code title=dom-DragEvent-dataTransfer><a href=#dom-dragevent-datatransfer>dataTransfer</a></code>
+ </tr>
+
+ </tbody>
+
+ </table>
+
+ <p>The <code title=dom-DragEvent-dataTransfer><a href=#dom-dragevent-datatransfer>dataTransfer</a></code>
object's contents are empty except for <code title=event-dragstart><a href=#event-dragstart>dragstart</a></code> events and <code title=event-drop><a href=#event-drop>drop</a></code> events, for which the contents are
set as described in the processing model, below.</p>
@@ -43833,26 +46695,50 @@
attribute's value and to the drag-and-drop source, as given by the
following table, for the remaining events (<code title=event-dragenter><a href=#event-dragenter>dragenter</a></code> and <code title=event-dragover><a href=#event-dragover>dragover</a></code>):</p>
- <table><thead><tr><th><code title=dom-DataTransfer-effectAllowed><a href=#dom-datatransfer-effectallowed>effectAllowed</a></code></th>
+ <table>
+ <thead>
+ <tr>
+ <th><code title=dom-DataTransfer-effectAllowed><a href=#dom-datatransfer-effectallowed>effectAllowed</a></code></th>
<th><code title=dom-DataTransfer-dropEffect><a href=#dom-datatransfer-dropeffect>dropEffect</a></code></th>
- </thead><tr><td><code title="">none</code></td>
+ </tr>
+ </thead>
+ <tr>
<td><code title="">none</code></td>
- <tr><td><code title="">copy</code>, <code title="">copyLink</code>, <code title="">copyMove</code>, <code title="">all</code></td>
+ <td><code title="">none</code></td>
+ </tr>
+ <tr>
+ <td><code title="">copy</code>, <code title="">copyLink</code>, <code title="">copyMove</code>, <code title="">all</code></td>
<td><code title="">copy</code></td>
- <tr><td><code title="">link</code>, <code title="">linkMove</code></td>
+ </tr>
+ <tr>
+ <td><code title="">link</code>, <code title="">linkMove</code></td>
<td><code title="">link</code></td>
- <tr><td><code title="">move</code></td>
+ </tr>
+ <tr>
<td><code title="">move</code></td>
- <tr><td><code title="">uninitialized</code> when what is being dragged is a selection from a text field</td>
<td><code title="">move</code></td>
- <tr><td><code title="">uninitialized</code> when what is being dragged is a selection</td>
+ </tr>
+ <tr>
+ <td><code title="">uninitialized</code> when what is being dragged is a selection from a text field</td>
+ <td><code title="">move</code></td>
+ </tr>
+ <tr>
+ <td><code title="">uninitialized</code> when what is being dragged is a selection</td>
<td><code title="">copy</code></td>
- <tr><td><code title="">uninitialized</code> when what is being dragged is an <code><a href=#the-a-element>a</a></code> element with an <code>href</code> attribute</td>
+ </tr>
+ <tr>
+ <td><code title="">uninitialized</code> when what is being dragged is an <code><a href=#the-a-element>a</a></code> element with an <code>href</code> attribute</td>
<td><code title="">link</code></td>
- <tr><td>Any other case</td>
+ </tr>
+ <tr>
+ <td>Any other case</td>
<td><code title="">copy</code></td>
- </table><h4 id=drag-and-drop-processing-model><span class=secno>6.9.4 </span>Drag-and-drop processing model</h4>
+ </tr>
+ </table>
+
+ <h4 id=drag-and-drop-processing-model><span class=secno>6.9.4 </span>Drag-and-drop processing model</h4>
+
<p>When the user attempts to begin a drag operation, the user agent
must first determine what is being dragged. If the drag operation
was invoked on a selection, then it is the selection that is being
@@ -43923,7 +46809,9 @@
generated from the first of the following sources that is
available:</p>
- <ol><li>The element specified in the last call to the <code title=dom-DataTransfer-setDragImage><a href=#dom-datatransfer-setdragimage>setDragImage()</a></code> method
+ <ol>
+
+ <li>The element specified in the last call to the <code title=dom-DataTransfer-setDragImage><a href=#dom-datatransfer-setdragimage>setDragImage()</a></code> method
of the <code title=dom-DragEvent-dataTransfer><a href=#dom-dragevent-datatransfer>dataTransfer</a></code>
object of the <code title=event-dragstart><a href=#event-dragstart>dragstart</a></code> event,
if the method was called. In visual media, if this is used, the
@@ -43944,7 +46832,9 @@
</ol><!-- XXX xref also link to the section that explains how to
render drag-and-drop, :drag, :drop, etc. Safari has a pseudo-class
that it uses to render an element off-screen to use as the drag
- feedback. --><p>The user agent must take a note of <a href=#dom-datatransfer-setdata title=dom-DataTransfer-setData>the data that was placed</a> in
+ feedback. -->
+
+ <p>The user agent must take a note of <a href=#dom-datatransfer-setdata title=dom-DataTransfer-setData>the data that was placed</a> in
the <code title=dom-DragEvent-dataTransfer><a href=#dom-dragevent-datatransfer>dataTransfer</a></code>
object. This data will be made available again when the <code title=event-drop><a href=#event-drop>drop</a></code> event is fired.</p>
@@ -43983,15 +46873,17 @@
Initially it has the value "none". It is updated by the user agent
as described in the steps below.</p>
- <p>User agents must, every 350ms (±200ms), perform the
+ <p>User agents must, every 350ms (±200ms), perform the
following steps in sequence. (If the user agent is still performing
the previous iteration of the sequence when the next iteration
becomes due, the user agent must not execute the overdue iteration,
effectively "skipping missed frames" of the drag-and-drop
operation.)</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>First, the user agent must fire a <code title=event-drag><a href=#event-drag>drag</a></code> event at the <a href=#source-node>source
node</a>. If this event is canceled, the user agent must set
the <a href=#current-drag-operation>current drag operation</a> to none (no drag
@@ -44006,8 +46898,10 @@
the user agent must check the state of the drag-and-drop
operation, as follows:</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>First, if the user is indicating a different <a href=#immediate-user-selection>immediate
user selection</a> than during the last iteration (or if this
is the first iteration), and if this <a href=#immediate-user-selection>immediate user
@@ -44015,8 +46909,10 @@
element</a>, then the <a href=#current-target-element>current target element</a> must
be updated, as follows:</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>If the new <a href=#immediate-user-selection>immediate user selection</a> is null, or
is in a non-DOM document or application, then set the
<a href=#current-target-element>current target element</a> to the same value.</p>
@@ -44050,8 +46946,10 @@
</li>
- </ol></li>
+ </ol>
+ </li>
+
<li>
<p>If the previous step caused the <a href=#current-target-element>current target
@@ -44078,37 +46976,67 @@
attributes of the <code title=dom-DragEvent-dataTransfer><a href=#dom-dragevent-datatransfer>dataTransfer</a></code> object
had after the event was handled, as per the following table:</p>
- <table><thead><tr><th><code title=dom-DataTransfer-effectAllowed><a href=#dom-datatransfer-effectallowed>effectAllowed</a></code></th>
+ <table>
+ <thead>
+ <tr>
+ <th><code title=dom-DataTransfer-effectAllowed><a href=#dom-datatransfer-effectallowed>effectAllowed</a></code></th>
<th><code title=dom-DataTransfer-dropEffect><a href=#dom-datatransfer-dropeffect>dropEffect</a></code></th>
<th>Drag operation</th>
- </thead><tr><td><code title="">uninitialized</code>, <code title="">copy</code>, <code title="">copyLink</code>, <code title="">copyMove</code>, or <code title="">all</code></td>
+ </tr>
+ </thead>
+ <tr>
+ <td><code title="">uninitialized</code>, <code title="">copy</code>, <code title="">copyLink</code>, <code title="">copyMove</code>, or <code title="">all</code></td>
<td><code title="">copy</code></td>
<td>"copy"</td>
- <tr><td><code title="">uninitialized</code>, <code title="">link</code>, <code title="">copyLink</code>, <code title="">linkMove</code>, or <code title="">all</code></td>
+ </tr>
+ <tr>
+ <td><code title="">uninitialized</code>, <code title="">link</code>, <code title="">copyLink</code>, <code title="">linkMove</code>, or <code title="">all</code></td>
<td><code title="">link</code></td>
<td>"link"</td>
- <tr><td><code title="">uninitialized</code>, <code title="">move</code>, <code title="">copyMove</code>, <code title="">linkMove</code>, or <code title="">all</code></td>
+ </tr>
+ <tr>
+ <td><code title="">uninitialized</code>, <code title="">move</code>, <code title="">copyMove</code>, <code title="">linkMove</code>, or <code title="">all</code></td>
<td><code title="">move</code></td>
<td>"move"</td>
- <tr><td colspan=2>Any other case</td>
+ </tr>
+ <tr>
+ <td colspan=2>Any other case</td>
<td>"none"</td>
- </table><p>Then, regardless of whether the <code title=event-dragover><a href=#event-dragover>dragover</a></code> event was canceled or
+ </tr>
+ </table>
+
+ <p>Then, regardless of whether the <code title=event-dragover><a href=#event-dragover>dragover</a></code> event was canceled or
not, the drag feedback (e.g. the mouse cursor) must be updated
to match the <a href=#current-drag-operation>current drag operation</a>, as
follows:</p>
- <table><thead><tr><th>Drag operation</th>
+ <table>
+ <thead>
+ <tr>
+ <th>Drag operation</th>
<th>Feedback</th>
- </thead><tr><td>"copy"</td>
+ </tr>
+ </thead>
+ <tr>
+ <td>"copy"</td>
<td>Data will be copied if dropped here.</td>
- <tr><td>"link"</td>
+ </tr>
+ <tr>
+ <td>"link"</td>
<td>Data will be linked if dropped here.</td>
- <tr><td>"move"</td>
+ </tr>
+ <tr>
+ <td>"move"</td>
<td>Data will be moved if dropped here.</td>
- <tr><td>"none"</td>
+ </tr>
+ <tr>
+ <td>"none"</td>
<td>No operation allowed, dropping here will cancel the drag-and-drop operation.</td>
- </table></li>
+ </tr>
+ </table>
+ </li>
+
<li>
<p>Otherwise, if the <a href=#current-target-element>current target element</a> is not a
@@ -44118,8 +47046,10 @@
</li>
- </ol></li>
+ </ol>
+ </li>
+
<li>
<p>Otherwise, if the user ended the drag-and-drop operation (e.g.
@@ -44128,8 +47058,10 @@
was canceled, then this will be the last iteration. The user agent
must execute the following steps, then stop looping.</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>If the <a href=#current-drag-operation>current drag operation</a> is none (no drag
operation), or, if the user ended the drag-and-drop operation by
canceling it (e.g. by hitting the <kbd>Escape</kbd> key), or if
@@ -44165,7 +47097,9 @@
perform the event's default action, which depends on the exact
target as follows:</p>
- <dl class=switch><dt>If the <a href=#current-target-element>current target element</a> is a text field
+ <dl class=switch>
+
+ <dt>If the <a href=#current-target-element>current target element</a> is a text field
(e.g. <code><a href=#the-textarea-element>textarea</a></code>, or an <code><a href=#the-input-element>input</a></code> element
whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in
the <a href=#text-state-and-search-state title=attr-input-type-text>Text</a> state)</dt>
@@ -44181,8 +47115,10 @@
<dd>Reset the <a href=#current-drag-operation>current drag operation</a> to
"none".</dd>
- </dl></li>
+ </dl>
+ </li>
+
<li>
<p>Finally, the user agent must fire a <code title=event-dragend><a href=#event-dragend>dragend</a></code> event at the <a href=#source-node>source
@@ -44197,7 +47133,9 @@
<p>The event is not cancelable. After the event has been
handled, the user agent must act as follows:</p>
- <dl class=switch><dt>If the <a href=#current-target-element>current target element</a> is a text field
+ <dl class=switch>
+
+ <dt>If the <a href=#current-target-element>current target element</a> is a text field
(e.g. <code><a href=#the-textarea-element>textarea</a></code>, or an <code><a href=#the-input-element>input</a></code> element
whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in
the <a href=#text-state-and-search-state title=attr-input-type-text>Text</a> state), and
@@ -44225,11 +47163,18 @@
<dd>The event has no default action.</dd>
- </dl></li>
+ </dl>
- </ol></li>
+ </li>
- </ol><h5 id=when-the-drag-and-drop-operation-starts-or-ends-in-another-document><span class=secno>6.9.4.1 </span>When the drag-and-drop operation starts or ends in another
+ </ol>
+
+ </li>
+
+ </ol>
+
+
+ <h5 id=when-the-drag-and-drop-operation-starts-or-ends-in-another-document><span class=secno>6.9.4.1 </span>When the drag-and-drop operation starts or ends in another
document</h5>
<p>The model described above is independent of which
@@ -44377,7 +47322,7 @@
<p>For the same reason, user agents must consider a drop to be
successful only if the user specifically ended the drag operation
- — if any scripts end the drag operation, it must be considered
+ — if any scripts end the drag operation, it must be considered
unsuccessful (canceled) and the <code title=event-drop><a href=#event-drop>drop</a></code>
event must not be fired.</p>
@@ -44408,7 +47353,9 @@
history</a> consists of batches of one or more of the
following:</p>
- <ul><li>Changes to the <a href=#content-attributes>content attributes</a> of an
+ <ul>
+
+ <li>Changes to the <a href=#content-attributes>content attributes</a> of an
<code>Element</code> node.</li>
<li>Changes to the <a href=#dom-attributes>DOM attributes</a> of a
@@ -44419,7 +47366,9 @@
the <code><a href=#htmldocument>HTMLDocument</a></code> object (<code>parentNode</code>,
<code>childNodes</code>).</li>
- </ul><p><dfn id=undo-object>Undo object</dfn> entries consist of objects representing
+ </ul>
+
+ <p><dfn id=undo-object>Undo object</dfn> entries consist of objects representing
state that scripts running in the document are managing. For
example, a Web mail application could use an <a href=#undo-object>undo
object</a> to keep track of the fact that a user has moved an
@@ -44441,7 +47390,9 @@
<p>This API sucks. Seriously. It's a terrible API. Really bad. I
hate it. Here are the requirements:</p>
- <ul><li>Has to cope with cases where the server has undo state already
+ <ul>
+
+ <li>Has to cope with cases where the server has undo state already
when the page is loaded, that can be stuffed into the undo buffer
onload.</li>
@@ -44456,8 +47407,10 @@
other states not expiring (e.g. client can undo arbitrary amounts
of local edits).</li>
- </ul></div>
+ </ul>
+ </div>
+
<p>To manage <a href=#undo-object>undo object</a> entries in the <a href=#undo-transaction-history>undo
transaction history</a>, the <code><a href=#undomanager>UndoManager</a></code>
interface can be used:</p>
@@ -44699,13 +47652,17 @@
<p>When <code title=dom-document-execCommand><a href=#execCommand>execCommand()</a></code>
is invoked, the user agent must follow the following steps:</p>
- <ol><li>If the given <var title="">commandId</var> maps to an entry in
+ <ol>
+
+ <li>If the given <var title="">commandId</var> maps to an entry in
the list below whose "Enabled When" entry has a condition that is
currently false, do nothing; abort these steps.</li>
<li>Otherwise, execute the "Action" listed below for the given <var title="">commandId</var>.</li>
- </ol><p>A document is <dfn id=ready-for-editing-host-commands>ready for editing host commands</dfn> if it
+ </ol>
+
+ <p>A document is <dfn id=ready-for-editing-host-commands>ready for editing host commands</dfn> if it
has a selection that is entirely within an <a href=#editing-host>editing
host</a>, or if it has no selection but its caret is inside an
<a href=#editing-host>editing host</a>.</p>
@@ -44735,7 +47692,9 @@
compared to the argument in an <a href=#ascii-case-insensitive>ASCII case-insensitive</a>
manner.</p>
- <dl><dt><dfn id=command-bold title=command-bold><code>bold</code></dfn></dt>
+ <dl>
+
+ <dt><dfn id=command-bold title=command-bold><code>bold</code></dfn></dt>
<dd><strong>Action:</strong> The user agent must act as if the user
had requested that the selection <a href=#contenteditable-wrapSemantic>be wrapped in the
semantics</a> of the <em><code><a href=#the-b-element>b</a></code></em> element (or, again,
@@ -44781,7 +47740,8 @@
<dd>
<p><strong>Action:</strong> The user agent must run the following
steps:</p>
- <ol><li><p>If the <var title="">value</var> argument wasn't
+ <ol>
+ <li><p>If the <var title="">value</var> argument wasn't
specified, abort these steps without doing anything.</li>
<li><p>If the <var title="">value</var> argument has a leading
U+003C LESS-THAN SIGN character ('<') and a trailing U+003E
@@ -44806,7 +47766,8 @@
selection was an empty range (with just one position) at the
caret position.</p>
</li>
- </ol></dd>
+ </ol>
+ </dd>
<dd><strong>Enabled When:</strong> The document is <a href=#ready-for-editing-host-commands>ready for
editing host commands</a>.</dd>
<dd><strong>Indeterminate When:</strong> Never.</dd>
@@ -44843,7 +47804,8 @@
<dd>
<p><strong>Action:</strong> The user agent must run the following
steps:</p>
- <ol><li><p>If the document is an <span>XML document</span>, then
+ <ol>
+ <li><p>If the document is an <span>XML document</span>, then
throw an <code><a href=#invalid_access_err>INVALID_ACCESS_ERR</a></code> exception and abort
these steps.</li><!-- XXX support XML? -->
<li><p>If the <var title="">value</var> argument wasn't
@@ -44858,7 +47820,8 @@
<li><p>Insert the nodes returned by the previous step into the
document at the location of the caret, without firing any
mutation events.</li>
- </ol></dd>
+ </ol>
+ </dd>
<dd><strong>Enabled When:</strong> The document is <a href=#ready-for-editing-host-commands>ready for
editing host commands</a>.</dd>
<dd><strong>Indeterminate When:</strong> Never.</dd>
@@ -44880,7 +47843,7 @@
had requested that the selection <a href=#contenteditable-wrapSemantic>be wrapped in the
semantics</a> of the <code><a href=#the-ol-element>ol</a></code> element (or unwrapped, or, if
there is no selection, have that semantic inserted or removed
- — the exact behavior is UA-defined).</dd>
+ — the exact behavior is UA-defined).</dd>
<dd><strong>Enabled When:</strong> The document is <a href=#ready-for-editing-host-commands>ready for
editing host commands</a>.</dd>
<dd><strong>Indeterminate When:</strong> Never.</dd>
@@ -44892,7 +47855,7 @@
had requested that the selection <a href=#contenteditable-wrapSemantic>be wrapped in the
semantics</a> of the <code><a href=#the-ul-element>ul</a></code> element (or unwrapped, or, if
there is no selection, have that semantic inserted or removed
- — the exact behavior is UA-defined).</dd>
+ — the exact behavior is UA-defined).</dd>
<dd><strong>Enabled When:</strong> The document is <a href=#ready-for-editing-host-commands>ready for
editing host commands</a>.</dd>
<dd><strong>Indeterminate When:</strong> Never.</dd>
@@ -44980,7 +47943,7 @@
had requested that the selection <a href=#contenteditable-wrapSemantic>be wrapped in the
semantics</a> of the <code><a href=#the-sub-and-sup-elements>sup</a></code> element (or unwrapped, or, if
there is no selection, have that semantic inserted or removed
- — the exact behavior is UA-defined).</dd>
+ — the exact behavior is UA-defined).</dd>
<dd><strong>Enabled When:</strong> The document is <a href=#ready-for-editing-host-commands>ready for
editing host commands</a>.</dd>
<dd><strong>Indeterminate When:</strong> Never.</dd>
@@ -45042,13 +48005,21 @@
<dd><strong>State:</strong> Always false.</dd>
<dd><strong>Value:</strong> Always the string "<code title="">false</code>".</dd>
- </dl><!--
+ </dl>
+
+<!--
XXX Once we resolve the style="" issue, address these:
"forecolor", "hilitecolor", "fontname", "fontsize", "justifyleft",
"justifycenter", "justifyright", "justifyfull", "indent", "outdent"
---><h2 id=comms><span class=secno>7 </span>Communication</h2>
+-->
+
+
+
+ <h2 id=comms><span class=secno>7 </span>Communication</h2>
+
+
<h3 id=event-definitions><span class=secno>7.1 </span>Event definitions</h3>
<p>Messages in <a href=#server-sent-events>server-sent events</a>, <a href=#network>Web
@@ -45158,7 +48129,9 @@
user agent should <a href=#queue-a-task>queue a task</a> to run the following
steps with the new <a href=#absolute-url>absolute URL</a>:</p>
- <ol><li><p>If the entry for the new <a href=#absolute-url>absolute URL</a> has been
+ <ol>
+
+ <li><p>If the entry for the new <a href=#absolute-url>absolute URL</a> has been
removed from the list, then abort these steps.</li>
<li>
@@ -45172,7 +48145,9 @@
</li>
- </ol><p>When an event source is removed from the list of event sources
+ </ol>
+
+ <p>When an event source is removed from the list of event sources
for an object, if that resource is still being fetched, then the
relevant connection must be closed.</p>
@@ -45186,7 +48161,9 @@
<p>Each event source in the list must have associated with it the
following:</p>
- <ul><li>The <dfn id=concept-event-stream-reconnection-time title=concept-event-stream-reconnection-time>reconnection
+ <ul>
+
+ <li>The <dfn id=concept-event-stream-reconnection-time title=concept-event-stream-reconnection-time>reconnection
time</dfn>, in milliseconds. This must initially be a
user-agent-defined value, probably in the region of a few
seconds.</li>
@@ -45194,7 +48171,9 @@
<li>The <dfn id=concept-event-stream-last-event-id title=concept-event-stream-last-event-id>last event
ID string</dfn>. This must initially be the empty string.</li>
- </ul><p>In general, the semantics of the transport protocol specified by
+ </ul>
+
+ <p>In general, the semantics of the transport protocol specified by
the URLs for the event sources must be followed, including HTTP
caching rules.</p>
@@ -45360,8 +48339,10 @@
<p>Lines must be processed, in the order they are received, as
follows:</p>
- <dl class=switch><dt>If the line is empty (a blank line)</dt>
+ <dl class=switch>
+ <dt>If the line is empty (a blank line)</dt>
+
<dd><p><a href=#dispatchMessage>Dispatch the event</a>, as
defined below.</dd>
@@ -45401,7 +48382,9 @@
</dd>
- </dl><p>Once the end of the file is reached, the user agent must <a href=#dispatchMessage>dispatch the event</a> one final time, as
+ </dl>
+
+ <p>Once the end of the file is reached, the user agent must <a href=#dispatchMessage>dispatch the event</a> one final time, as
defined below.</p>
@@ -45410,8 +48393,10 @@
name, as given in the following list. Field names must be compared
literally, with no case folding performed.</p>
- <dl class=switch><dt>If the field name is "event"</dt>
+ <dl class=switch>
+ <dt>If the field name is "event"</dt>
+
<dd><p>Set the <var title="">event name</var> buffer the to field
value.</dd>
@@ -45452,10 +48437,15 @@
<dd><p>The field is ignored.</dd>
- </dl><p id=dispatchMessage>When the user agent is required to <dfn title="">dispatch the event</dfn>, then the user agent must act as
+ </dl>
+
+
+ <p id=dispatchMessage>When the user agent is required to <dfn title="">dispatch the event</dfn>, then the user agent must act as
follows:
- <ol><li><p>If the <var title="">data</var> buffer is an empty string,
+ <ol>
+
+ <li><p>If the <var title="">data</var> buffer is an empty string,
set the <var title="">data</var> buffer and the <var title="">event
name</var> buffer to the empty string and abort these
steps.</li>
@@ -45489,7 +48479,9 @@
<a href=#concept-task title=concept-task>task</a> is the <dfn id=remote-event-task-source>remote event
task source</dfn>.</li>
- </ol><p class=note>If an event doesn't have an "id" field, but an
+ </ol>
+
+ <p class=note>If an event doesn't have an "id" field, but an
earlier event did set the event source's <span>last event ID
string</span>, then the event's <code title=dom-MessageEvent-lastEventId><a href=#dom-messageevent-lasteventid>lastEventId</a></code> field will
be set to the value of whatever the last seen "id" field was.</p>
@@ -45568,7 +48560,7 @@
<pre>data:test
-data: test</pre>
+data: test</pre>
<p>This is because the space after the colon is ignored if
present.</p>
@@ -45651,8 +48643,10 @@
which to connect. When the <code>WebSocket()</code> constructor is
invoked, the UA must run these steps:</p>
- <ol><li><p><a href=#parse-a-url title="parse a url">Parse</a> the <var title="">url</var> argument.</li>
+ <ol>
+ <li><p><a href=#parse-a-url title="parse a url">Parse</a> the <var title="">url</var> argument.</li>
+
<li><p>If the previous step failed, or if <var title="">url</var>
does not have a <a href=#url-scheme title=url-scheme><scheme></a>
component whose value is either "<code title="">ws</code>" or
@@ -45693,7 +48687,11 @@
was specified), from <var title="">origin</var>, with the flag <var title="">secure</var>, and with <var title="">resource name</var>
as the resource name.</li>
- </ol><hr><p>The <dfn id=dom-websocket-url title=dom-WebSocket-URL><code>URL</code></dfn>
+ </ol>
+
+ <hr>
+
+ <p>The <dfn id=dom-websocket-url title=dom-WebSocket-URL><code>URL</code></dfn>
attribute must return the value that was passed to the
constructor.</p>
@@ -45701,8 +48699,10 @@
attribute represents the state of the connection. It can have the
following values:</p>
- <dl><dt><dfn id=dom-websocket-connecting title=dom-WebSocket-CONNECTING><code>CONNECTING</code></dfn> (numeric value 0)</dt>
+ <dl>
+ <dt><dfn id=dom-websocket-connecting title=dom-WebSocket-CONNECTING><code>CONNECTING</code></dfn> (numeric value 0)</dt>
+
<dd>The connection has not yet been established.</dd>
<dt><dfn id=dom-websocket-open title=dom-WebSocket-OPEN><code>OPEN</code></dfn> (numeric value 1)</dt>
@@ -45713,7 +48713,9 @@
<dd>The connection has been closed or could not be opened.</dd>
- </dl><p>When the object is created its <code title=dom-WebSocket-readyState><a href=#dom-websocket-readystate>readyState</a></code> must be set to
+ </dl>
+
+ <p>When the object is created its <code title=dom-WebSocket-readyState><a href=#dom-websocket-readystate>readyState</a></code> must be set to
<code title=dom-WebSocket-CONNECTING><a href=#dom-websocket-connecting>CONNECTING</a></code> (0). The
steps executed when the constructor is invoked change this
attribute's value.</p>
@@ -45750,12 +48752,16 @@
<p>The <code title=event-message><a href=#event-message>message</a></code> event is fired
when when data is received for a connection.</p>
- <hr><p>The following are the <a href=#event-handler-attributes-0>event handler attributes</a> that
+ <hr>
+
+ <p>The following are the <a href=#event-handler-attributes-0>event handler attributes</a> that
must be supported, as DOM attributes, by all objects implementing
the <code><a href=#websocket>WebSocket</a></code> interface:</p>
- <dl><dt><dfn id=handler-websocket-onopen title=handler-WebSocket-onopen><code>onopen</code></dfn></dt>
+ <dl>
+ <dt><dfn id=handler-websocket-onopen title=handler-WebSocket-onopen><code>onopen</code></dfn></dt>
+
<dd><p>Must be invoked whenever an <code title=event-WebSocket-open><a href=#event-websocket-open>open</a></code> event is targeted at or
bubbles through the <code><a href=#websocket>WebSocket</a></code> object.</dd>
@@ -45769,13 +48775,19 @@
<dd><p>Must be invoked whenever an <code title=event-WebSocket-closed>closed</code> event is targeted at or
bubbles through the <code><a href=#websocket>WebSocket</a></code> object.</dd>
- </dl><h4 id=feedback-from-the-protocol><span class=secno>7.3.4 </span>Feedback from the protocol</h4>
+ </dl>
+
+
+ <h4 id=feedback-from-the-protocol><span class=secno>7.3.4 </span>Feedback from the protocol</h4>
+
<p>When the <i><a href=#web-socket-connection-is-established>Web Socket connection is established</a></i>, the user
agent must run the following steps:</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>Change the <code title=dom-WebSocket-readyState><a href=#dom-websocket-readystate>readyState</a></code> attribute's value
to <code title=dom-WebSocket-OPEN><a href=#dom-websocket-open>OPEN</a></code> (1).</p>
@@ -45789,19 +48801,27 @@
</li>
- </ol><hr><p>When <i>a Web Socket message has been received</i> with text <var title="">data</var>, the user agent must create an event that uses
+ </ol>
+
+ <hr>
+
+ <p>When <i>a Web Socket message has been received</i> with text <var title="">data</var>, the user agent must create an event that uses
the <code><a href=#messageevent>MessageEvent</a></code> interface, with the event name <code title=event-message><a href=#event-message>message</a></code>, which does not bubble, is
cancelable, has no default action, and whose <code title=dom-MessageEvent-data><a href=#dom-messageevent-data>data</a></code> attribute is set to <var title="">data</var>, and <a href=#queue-a-task>queue a task</a> to dispatch it at
the <code><a href=#websocket>WebSocket</a></code> object.</p>
- <hr><p id=closeWebSocket>When the <i><a href=#web-socket-connection-is-closed>Web Socket connection is
+ <hr>
+
+ <p id=closeWebSocket>When the <i><a href=#web-socket-connection-is-closed>Web Socket connection is
closed</a></i>, the <code title=dom-WebSocket-readyState><a href=#dom-websocket-readystate>readyState</a></code> attribute's value
must be changed to <code title=dom-WebSocket-CLOSED><a href=#dom-websocket-closed>CLOSED</a></code>
(2), and the user agent must <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire
a simple event</a> named <code title=event-WebSocket-close><a href=#event-websocket-close>close</a></code> at the
<code><a href=#websocket>WebSocket</a></code> object.</p>
- <hr><p>The <a href=#task-source>task source</a> for all <a href=#concept-task title=concept-task>tasks</a> <a href=#queue-a-task title="queue a
+ <hr>
+
+ <p>The <a href=#task-source>task source</a> for all <a href=#concept-task title=concept-task>tasks</a> <a href=#queue-a-task title="queue a
task">queued</a> in this section is the <dfn id=web-socket-task-source>Web Socket task
source</dfn>.</p>
@@ -45843,8 +48863,10 @@
with a particular <var title="">resource name</var>, it must run the
following steps:</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>If there is no explicit <var title="">port</var>, then: if <var title="">secure</var> is false, let <var title="">port</var> be 81,
otherwise let <var title="">port</var> be 815.</p>
@@ -45904,9 +48926,9 @@
6f 6e 6e 65 63 74 69 6f 6e 3a 20 55 70 67 72 61
64 65 0d 0a</pre>
- <p class=note>The string "GET ", the path,
- " HTTP/1.1", CRLF, the string "Upgrade: WebSocket",
- CRLF, and the string "Connection: Upgrade", CRLF.</p>
+ <p class=note>The string "GET ", the path,
+ " HTTP/1.1", CRLF, the string "Upgrade: WebSocket",
+ CRLF, and the string "Connection: Upgrade", CRLF.</p>
</li>
@@ -45924,7 +48946,7 @@
<pre>0d 0a</pre>
- <p class=note>The string "Host: ", the host, and CRLF.</p>
+ <p class=note>The string "Host: ", the host, and CRLF.</p>
</li>
@@ -45941,7 +48963,7 @@
<pre>0d 0a</pre>
- <p class=note>The string "Origin: ", the origin, and CRLF.</p>
+ <p class=note>The string "Origin: ", the origin, and CRLF.</p>
</li>
@@ -46000,9 +49022,9 @@
61 64 65 0d 0a</pre>
<p class=note>The string
- "HTTP/1.1 101 Web Socket Protocol Handshake", CRLF, the
- string "Upgrade: WebSocket", CRLF, the string
- "Connection: Upgrade", CRLF.</p>
+ "HTTP/1.1 101 Web Socket Protocol Handshake", CRLF, the
+ string "Upgrade: WebSocket", CRLF, the string
+ "Connection: Upgrade", CRLF.</p>
<!-- v2 if we ever support the server requiring credentials, this
is where it goes -->
@@ -46026,8 +49048,10 @@
<p>Otherwise, handle the byte as described in the appropriate
entry below:</p>
- <dl class=switch><dt>If the byte is 0x0d (ASCII CR)</dt>
+ <dl class=switch>
+ <dt>If the byte is 0x0d (ASCII CR)</dt>
+
<dd>If the <var title="">name</var> byte array is empty, then
jump to the <a href=#ws-ua-headers-processing>headers
processing</a> step. Otherwise, <a href=#fail-the-web-socket-connection>fail the Web Socket
@@ -46057,7 +49081,9 @@
<dd>Append the byte to the <var title="">name</var> byte
array and redo this step for the next byte.</dd>
- </dl><p class=note>This reads a header name, terminated by a colon,
+ </dl>
+
+ <p class=note>This reads a header name, terminated by a colon,
converting upper-case ASCII letters to lowercase, and aborting if
a stray CR or LF is found.</p>
@@ -46074,8 +49100,10 @@
<p>Otherwise, handle the byte as described in the appropriate
entry below:</p>
- <dl class=switch><dt>If the byte is 0x20 (ASCII space)</dt>
+ <dl class=switch>
+ <dt>If the byte is 0x20 (ASCII space)</dt>
+
<dd>Ignore the byte and move on to the next step.</dd>
@@ -46084,7 +49112,9 @@
<dd>Treat the byte as described by the list in the next step,
then move on to that next step for real.</dd>
- </dl><p class=note>This skips past a space character after the colon,
+ </dl>
+
+ <p class=note>This skips past a space character after the colon,
if necessary.</p>
</li>
@@ -46100,8 +49130,10 @@
<p>Otherwise, handle the byte as described in the appropriate
entry below:</p>
- <dl class=switch><dt>If the byte is 0x0d (ASCII CR)</dt>
+ <dl class=switch>
+ <dt>If the byte is 0x0d (ASCII CR)</dt>
+
<dd>Move on to the next step.</dd>
@@ -46116,7 +49148,9 @@
<dd>Append the byte to the <var title="">name</var> byte array
and redo this step for the next byte.</dd>
- </dl><p class=note>This reads a header value, terminated by a
+ </dl>
+
+ <p class=note>This reads a header value, terminated by a
CRLF.</p>
</li>
@@ -46165,8 +49199,10 @@
<p>Handle each entry in the <var title="">headers</var> list as
follows:</p>
- <dl class=switch><dt>If the entry's name is "<code title="">websocket-origin</code>"</dt>
+ <dl class=switch>
+ <dt>If the entry's name is "<code title="">websocket-origin</code>"</dt>
+
<dd><p>If the value is not exactly equal to <var title="">origin</var>, <a href=#converted-to-lowercase>converted to lowercase</a>, then
<a href=#fail-the-web-socket-connection>fail the Web Socket connection</a> and abort these
steps.</dd>
@@ -46180,7 +49216,9 @@
the following components in the same order, then <a href=#fail-the-web-socket-connection>fail the
Web Socket connection</a> and abort these steps:</p>
- <ol><li>The string "<code title="">http</code>" if <var title="">secure</var> is false and "<code title="">https</code>" if <var title="">secure</var> is
+ <ol>
+
+ <li>The string "<code title="">http</code>" if <var title="">secure</var> is false and "<code title="">https</code>" if <var title="">secure</var> is
true</li>
<li>The three characters "<code title="">://</code>".</li>
@@ -46192,9 +49230,11 @@
<li>The value of <var title="">resource name</var>.</li>
- </ol></dd>
+ </ol>
+ </dd>
+
<dt>If the entry's name is "<code title="">set-cookie</code>" or
"<code title="">set-cookie2</code>" or another cookie-related
header name</dt>
@@ -46210,8 +49250,10 @@
<dd>Ignore it.</dd>
- </dl></li>
+ </dl>
+ </li>
+
<li>
<p>The <dfn id=web-socket-connection-is-established>Web Socket connection is established</dfn>. Now the
@@ -46220,7 +49262,9 @@
</li>
- </ol><p>To <dfn id=fail-the-web-socket-connection>fail the Web Socket connection</dfn>, the user agent must
+ </ol>
+
+ <p>To <dfn id=fail-the-web-socket-connection>fail the Web Socket connection</dfn>, the user agent must
<a href=#close-the-web-socket-connection>close the Web Socket connection</a>, and may report the
problem to the user (which would be especially useful for
developers). However, user agents must not convey the failure
@@ -46234,8 +49278,10 @@
user agent must run through the following state machine for the
bytes sent by the server.</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>Try to read a byte from the server. Let <var title="">frame
type</var> be that byte.</p>
@@ -46248,7 +49294,9 @@
<p>Handle the <var title="">frame type</var> byte as follows:</p>
- <dl><dt>If the high-order bit of the <var title="">frame type</var>
+ <dl>
+
+ <dt>If the high-order bit of the <var title="">frame type</var>
byte is set (i.e. if <var title="">frame type</var> <i title="">and</i>ed with 0x80 returns 0x80)</dt>
<dd>
@@ -46257,8 +49305,10 @@
attempted but fails because the <a href=#web-socket-connection-is-closed>Web Socket connection is
closed</a>, then abort.</p>
- <ol><li><p>Let <var title="">length</var> be zero.</li>
+ <ol>
+ <li><p>Let <var title="">length</var> be zero.</li>
+
<li id=ws-cd-length><p><em>Length</em>: Read a byte, let <var title="">b</var> be that byte.</li>
<li><p>Let <var title="">b<sub title="">v</sub></var> be
@@ -46277,8 +49327,10 @@
<li><p>Discard the read bytes.</li>
- </ol></dd>
+ </ol>
+ </dd>
+
<dt>If the high-order bit of the <var title="">frame type</var>
byte is <em>not</em> set (i.e. if <var title="">frame type</var>
<i title="">and</i>ed with 0x80 returns 0x00)</dt>
@@ -46289,8 +49341,10 @@
attempted but fails because the <a href=#web-socket-connection-is-closed>Web Socket connection is
closed</a>, then abort.</p>
- <ol><li><p>Let <var title="">raw data</var> be an empty byte array.</li>
+ <ol>
+ <li><p>Let <var title="">raw data</var> be an empty byte array.</li>
+
<li id=ws-cd-data><p><em>Data</em>: Read a byte, let <var title="">b</var> be that byte.</li>
<li><p>If <var title="">b</var> is not 0xff, then append <var title="">b</var> to <var title="">raw data</var> and return to
@@ -46302,31 +49356,47 @@
<li><p>If <var title="">frame type</var> is 0x00, then <dfn id=a-message-has-been-received>a
message has been received</dfn> with text <var title="">data</var>. Otherwise, discard the data.</li>
- </ol></dd>
+ </ol>
- </dl></li>
+ </dd>
+ </dl>
+
+ </li>
+
<li><p>Return to the first step to read the next byte.</li>
- </ol><p>If the user agent is faced with content that is too large to be
+ </ol>
+
+ <p>If the user agent is faced with content that is too large to be
handled appropriately, then it must <a href=#fail-the-web-socket-connection>fail the Web Socket
connection</a>.</p>
- <hr><p>Once a <a href=#web-socket-connection-is-established>Web Socket connection is established</a>, the
+ <hr>
+
+ <p>Once a <a href=#web-socket-connection-is-established>Web Socket connection is established</a>, the
user agent must use the following steps to <dfn id=send-data-using-the-web-socket>send <var title="">data</var> using the Web Socket</dfn>:</p>
- <ol><li><p>Send a 0x00 byte to the server.</li>
+ <ol>
+ <li><p>Send a 0x00 byte to the server.</li>
+
<li><p>Encode <var title="">data</var> using UTF-8 and send the
resulting byte stream to the server.</li>
<li><p>Send a 0xff byte to the server.</li>
- </ol><!-- v2: People often request the ability to send binary blobs over
+ </ol>
+
+ <!-- v2: People often request the ability to send binary blobs over
this API; we should also look into allowing name/value pairs,
arrays, and numbers using postMessage() instead of just strings and
- binary data. --><h5 id=server-side-requirements><span class=secno>7.3.5.3 </span>Server-side requirements</h5>
+ binary data. -->
+
+
+ <h5 id=server-side-requirements><span class=secno>7.3.5.3 </span>Server-side requirements</h5>
+
<p><em>This section only applies to servers.</em></p> <!-- XXX that's not a defined conformance class -->
<h6 id=minimal-handshake><span class=secno>7.3.5.3.1 </span>Minimal handshake</h6>
@@ -46398,8 +49468,10 @@
part separated from the value part by a colon and a space (bytes
0x3a 0x20). Of these, several are interesting:</p>
- <dl><dt>Host (bytes 48 6f 73 74)</dt>
+ <dl>
+ <dt>Host (bytes 48 6f 73 74)</dt>
+
<dd>
<p>The value gives the hostname that the client intended to use
@@ -46442,8 +49514,11 @@
</dd>
- </dl><h6 id=ws-sd-framing><span class=secno>7.3.5.3.3 </span>Data framing</h6>
+ </dl>
+
+ <h6 id=ws-sd-framing><span class=secno>7.3.5.3.3 </span>Data framing</h6>
+
<p class=note>This section only describes how to handle content
that this specification allows user agents to send (text). It
doesn't handle any arbitrary content in the same way that the
@@ -46453,7 +49528,9 @@
<p>The server should run through the following steps to process the
bytes sent by the client:</p>
- <ol><li><p>Read a byte from the client. Assuming everything is going
+ <ol>
+
+ <li><p>Read a byte from the client. Assuming everything is going
according to plan, it will be a 0x00 byte. Behaviour for the server
is undefined if the byte is not 0x00.</li>
@@ -46471,10 +49548,16 @@
<li><p>Return to the first step to read the next byte.</li>
- </ol><hr><p>The server should run through the following steps to send strings
+ </ol>
+
+ <hr>
+
+ <p>The server should run through the following steps to send strings
to the client:</p>
- <ol><li><p>Send a 0x00 byte to the client to indicate the start of a
+ <ol>
+
+ <li><p>Send a 0x00 byte to the client to indicate the start of a
string.</li>
<li><p>Encode <var title="">data</var> using UTF-8 and send the
@@ -46483,8 +49566,11 @@
<li><p>Send a 0xff byte to the client to indicate the end of the
message.</li>
- </ol><h5 id=closing-the-connection><span class=secno>7.3.5.4 </span>Closing the connection</h5>
+ </ol>
+
+ <h5 id=closing-the-connection><span class=secno>7.3.5.4 </span>Closing the connection</h5>
+
<p>To <dfn id=close-the-web-socket-connection>close the Web Socket connection</dfn>, either the user
agent or the server closes the TCP/IP connection. There is no
closing handshake. Whether the user agent or the server closes the
@@ -46605,8 +49691,10 @@
arguments) on a <code><a href=#window>Window</a></code> object, the user agent must
follow these steps:
- <ol><li>
+ <ol>
+ <li>
+
<p>If the value of the <var title="">targetOrigin</var> argument
is not a single U+002A ASTERISK character ("*"), and <a href=#resolve-a-url title="resolve a url">resolving</a> it relative to the
<a href=#first-script>first script</a>'s <a href="#script's-base-url" title="script's base URL">base
@@ -46668,14 +49756,22 @@
</li>
- </ol><h4 id=posting-messages-with-message-ports><span class=secno>7.4.4 </span>Posting messages with message ports</h4>
+ </ol>
+
+ <h4 id=posting-messages-with-message-ports><span class=secno>7.4.4 </span>Posting messages with message ports</h4>
+
<p>When a script invokes the <dfn id=dom-window-postmessage-3 title=dom-window-postMessage-3><code>postMessage(<var title="">message</var>, <var title="">messagePort</var>, <var title="">targetOrigin</var>)</code></dfn> method (with three
arguments) on a <code><a href=#window>Window</a></code> object, the user agent must
follow these steps:
- <ol><!-- EXCEPT WHERE NOTED, THESE STEPS ARE IDENTICAL TO THE PREVIOUS SECTION --><!-- one exception is the use of -3 instead of -2 in the xrefs --><li>
+ <ol>
+ <!-- EXCEPT WHERE NOTED, THESE STEPS ARE IDENTICAL TO THE PREVIOUS SECTION -->
+ <!-- one exception is the use of -3 instead of -2 in the xrefs -->
+
+ <li>
+
<p>If the value of the <var title="">targetOrigin</var> argument
is not a single U+002A ASTERISK character ("*"), and <a href=#resolve-a-url title="resolve a url">resolving</a> it relative to the
<a href=#first-script>first script</a>'s <a href="#script's-base-url" title="script's base URL">base
@@ -46761,7 +49857,9 @@
</li>
- </ol><p class=note>These steps, with the exception of the second and
+ </ol>
+
+ <p class=note>These steps, with the exception of the second and
third steps and the penultimate step, are identical to those in the
previous section.</p>
@@ -46795,7 +49893,9 @@
<p>When the <dfn id=dom-messagechannel title=dom-MessageChannel><code>MessageChannel()</code></dfn>
constructor is called, it must run the following algorithm:</p>
- <ol><li><p><a href=#create-a-new-messageport-object>Create a new <code>MessagePort</code> object</a>
+ <ol>
+
+ <li><p><a href=#create-a-new-messageport-object>Create a new <code>MessagePort</code> object</a>
owned by the <a href="#script's-global-object">script's global object</a>, and let <var title="">port1</var> be that object.</li>
<li><p><a href=#create-a-new-messageport-object>Create a new <code>MessagePort</code> object</a>
@@ -46814,7 +49914,9 @@
<li><p>Return <var title="">channel</var>.</li>
- </ol><p>The <dfn id=dom-channel-port1 title=dom-channel-port1><code>port1</code></dfn> and
+ </ol>
+
+ <p>The <dfn id=dom-channel-port1 title=dom-channel-port1><code>port1</code></dfn> and
<dfn id=dom-channel-port2 title=dom-channel-port2><code>port2</code></dfn> attributes
must return the values they were assigned when the
<code><a href=#messagechannel>MessageChannel</a></code> object was created.</p>
@@ -46851,12 +49953,16 @@
instantiate a new <code><a href=#messageport>MessagePort</a></code> object, and let its owner
be <var title="">owner</var>.</p>
- <hr><p>When the user agent is to <dfn id=entangle>entangle</dfn> two
+ <hr>
+
+ <p>When the user agent is to <dfn id=entangle>entangle</dfn> two
<code><a href=#messageport>MessagePort</a></code> objects, it must run the following
steps:</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>If one of the ports is already entangled, then unentangle it
and the port that it was entangled with.</p>
@@ -46872,11 +49978,17 @@
<code><a href=#messagechannel>MessageChannel</a></code> object that represents this
channel.)</li>
- </ol><hr><p>When the user agent is to <dfn id=clone-a-port>clone a port</dfn> <var title="">original port</var>, with the clone being owned by <var title="">owner</var>, it must run the following steps, which return
+ </ol>
+
+ <hr>
+
+ <p>When the user agent is to <dfn id=clone-a-port>clone a port</dfn> <var title="">original port</var>, with the clone being owned by <var title="">owner</var>, it must run the following steps, which return
either a new <code><a href=#messageport>MessagePort</a></code> object or an exception for the
caller to raise:</p>
- <ol><li><p>If the <var title="">original port</var> is not entangled
+ <ol>
+
+ <li><p>If the <var title="">original port</var> is not entangled
without another port, then return an <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code>
exception and abort all these steps.</li>
@@ -46900,15 +50012,23 @@
<li><p>Return <var title="">new port</var>. It is the
clone.</li>
- </ol><hr><p>The <dfn id=dom-messageport-active title=dom-MessagePort-active><code>active</code></dfn>
+ </ol>
+
+ <hr>
+
+ <p>The <dfn id=dom-messageport-active title=dom-MessagePort-active><code>active</code></dfn>
attribute must return true if the port is entangled, and false
otherwise.</p>
- <hr><p>The <dfn id=dom-messageport-postmessage title=dom-MessagePort-postMessage><code>postMessage()</code></dfn>
+ <hr>
+
+ <p>The <dfn id=dom-messageport-postmessage title=dom-MessagePort-postMessage><code>postMessage()</code></dfn>
method, when called on a port <var title="">source port</var>, must
cause the user agent to run the following steps:</p>
- <ol><li><p>Let <var title="">message</var> be the method's first
+ <ol>
+
+ <li><p>Let <var title="">message</var> be the method's first
argument.</li>
<li><p>Let <var title="">data port</var> be the method's second
@@ -46938,7 +50058,9 @@
<li><p>If the method was called with a second argument <var title="">data port</var> and that argument isn't null, then run the
following substeps:</p>
- <ol><li><p>If the <var title="">data port</var> is the <var title="">source port</var> or the <var title="">target
+ <ol>
+
+ <li><p>If the <var title="">data port</var> is the <var title="">source port</var> or the <var title="">target
port</var>, then throw an <code><a href=#invalid_access_err>INVALID_ACCESS_ERR</a></code>
exception and abort all these steps.</li>
@@ -46950,14 +50072,18 @@
<li><p>Let the <code title=dom-MessageEvent-messagePort><a href=#dom-messageevent-messageport>messagePort</a></code> attribute
of the event be the <var title="">new data port</var>.</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>Return from the method, but continue with these
steps.</li>
<li><p>Add the event to the <a href=#port-message-queue>port message queue</a> of <var title="">target port</var>.</li>
- </ol><!--
+ </ol>
+
+<!--
<hr>
<p>The <dfn
@@ -47016,7 +50142,10 @@
title="">target port</var>.</p></li>
</ol>
---><hr><p>The <dfn id=dom-messageport-start title=dom-MessagePort-start><code>start()</code></dfn>
+-->
+ <hr>
+
+ <p>The <dfn id=dom-messageport-start title=dom-MessagePort-start><code>start()</code></dfn>
method must open its port's <a href=#port-message-queue>port message queue</a>, if it
is not already open.</p>
@@ -47029,18 +50158,24 @@
is not <a href=#fully-active>fully active</a>, then the messages are lost.</p>
<!-- because of the jump-to-entry-point algorithm first step -->
- <hr><p>The <dfn id=dom-messageport-close title=dom-MessagePort-close><code>close()</code></dfn>
+ <hr>
+
+ <p>The <dfn id=dom-messageport-close title=dom-MessagePort-close><code>close()</code></dfn>
method, when called on a port <var title="">local port</var> that is
entangled with another port, must cause the user agents to
unentangle the two ports. If the method is called on a port that is
not entangled, then the method must do nothing.</p>
- <hr><p>The following are the <a href=#event-handler-attributes-0>event handler attributes</a> that
+ <hr>
+
+ <p>The following are the <a href=#event-handler-attributes-0>event handler attributes</a> that
must be supported, as DOM attributes, by all objects implementing
the <code><a href=#messageport>MessagePort</a></code> interface:</p>
- <dl><dt><dfn id=handler-messageport-onmessage title=handler-MessagePort-onmessage><code>onmessage</code></dfn></dt>
+ <dl>
+ <dt><dfn id=handler-messageport-onmessage title=handler-MessagePort-onmessage><code>onmessage</code></dfn></dt>
+
<dd>
<p>Must be invoked whenever a <code title=event-MessagePort-message>message</code> event is targeted
@@ -47053,8 +50188,12 @@
</dd>
- </dl><h5 id=ports-and-garbage-collection><span class=secno>7.5.3.1 </span>Ports and garbage collection</h5>
+ </dl>
+
+
+ <h5 id=ports-and-garbage-collection><span class=secno>7.5.3.1 </span>Ports and garbage collection</h5>
+
<p>User agents must act as if <code><a href=#messageport>MessagePort</a></code> objects have
a strong reference to their entangled <code><a href=#messageport>MessagePort</a></code>
object.</p>
@@ -47100,8 +50239,10 @@
<p>Documents must consist of the following parts, in the given
order:</p>
- <ol><li>Optionally, a single U+FEFF BYTE ORDER MARK (BOM) character.</li>
+ <ol>
+ <li>Optionally, a single U+FEFF BYTE ORDER MARK (BOM) character.</li>
+
<li>Any number of <a href=#syntax-comments title=syntax-comments>comments</a> and
<a href=#space-character title="space character">space characters</a>.</li>
@@ -47115,7 +50256,9 @@
<li>Any number of <a href=#syntax-comments title=syntax-comments>comments</a> and
<a href=#space-character title="space character">space characters</a>.</li>
- </ol><p>The various types of content mentioned above are described in the
+ </ol>
+
+ <p>The various types of content mentioned above are described in the
next few sections.</p>
<p>In addition, there are some restrictions on how <span>character
@@ -47162,7 +50305,8 @@
<p>A DOCTYPE must consist of the following characters, in this
order:</p>
- <ol class=brief><li>A U+003C LESS-THAN SIGN (<code><</code>) character.</li>
+ <ol class=brief>
+ <li>A U+003C LESS-THAN SIGN (<code><</code>) character.</li>
<li>A U+0021 EXCLAMATION MARK (<code>!</code>) character.</li>
<li>A string that is an <a href=#ascii-case-insensitive>ASCII case-insensitive</a> match for the string "<code title="">DOCTYPE</code>".</li>
<li>One or more <a href=#space-character title="space character">space characters</a>.</li>
@@ -47170,7 +50314,9 @@
<li>Optionally, a <a href=#doctype-legacy-string>DOCTYPE legacy string</a> (defined below).</li>
<li>Zero or more <a href=#space-character title="space character">space characters</a>.</li>
<li>A U+003E GREATER-THAN SIGN (<code>></code>) character.</li>
- </ol><p class=note>In other words, <code><!DOCTYPE HTML></code>,
+ </ol>
+
+ <p class=note>In other words, <code><!DOCTYPE HTML></code>,
case-insensitively.</p>
<p>For the purposes of HTML generators that cannot output HTML
@@ -47179,13 +50325,16 @@
into the DOCTYPE (in the position defined above). This string must
consist of:</p>
- <ol class=brief><li>One or more <a href=#space-character title="space character">space characters</a>.</li>
+ <ol class=brief>
+ <li>One or more <a href=#space-character title="space character">space characters</a>.</li>
<li>A string that is an <a href=#ascii-case-insensitive>ASCII case-insensitive</a> match for the string "<code title="">SYSTEM</code>".</li>
<li>One or more <a href=#space-character title="space character">space characters</a>.</li>
<li>A U+0022 QUOTATION MARK or U+0027 APOSTROPHE character (the <i>quote mark</i>).</li>
<li>The literal string "<code title="">about:legacy-compat</code>".</li>
<li>A matching U+0022 QUOTATION MARK or U+0027 APOSTROPHE character (i.e. the same character as in the earlier step marked <i>quote mark</i>).</li>
- </ol><p class=note>In other words, <code><!DOCTYPE HTML SYSTEM
+ </ol>
+
+ <p class=note>In other words, <code><!DOCTYPE HTML SYSTEM
"about:legacy-compat"></code> or <code><!DOCTYPE HTML SYSTEM
'about:legacy-compat'></code>, case-insensitively except for the bit
in quotes.</p>
@@ -47202,8 +50351,10 @@
elements, RCDATA elements, foreign elements, and normal
elements.</p>
- <dl><dt><dfn id=void-elements>Void elements</dfn></dt>
+ <dl>
+ <dt><dfn id=void-elements>Void elements</dfn></dt>
+
<dd><code><a href=#the-base-element>base</a></code>, <code><a href=#the-command>command</a></code>,
<code><a href=#the-eventsource-element>eventsource</a></code>, <code><a href=#the-link-element>link</a></code>, <code><a href=#meta>meta</a></code>,
<code><a href=#the-hr-element>hr</a></code>, <code><a href=#the-br-element>br</a></code>, <code><a href=#the-img-element>img</a></code>,
@@ -47231,7 +50382,9 @@
<dd>All other allowed <a href=#html-elements>HTML elements</a> are normal
elements.</dd>
- </dl><p><dfn id=syntax-tags title=syntax-tags>Tags</dfn> are used to delimit the start
+ </dl>
+
+ <p><dfn id=syntax-tags title=syntax-tags>Tags</dfn> are used to delimit the start
and end of elements in the markup. CDATA, RCDATA, and normal
elements have a <a href=#syntax-start-tag title=syntax-start-tag>start tag</a> to
indicate where they begin, and an <a href=#syntax-end-tag title=syntax-end-tag>end
@@ -47303,7 +50456,9 @@
<p><dfn id=syntax-start-tag title=syntax-start-tag>Start tags</dfn> must have the
following format:</p>
- <ol><li>The first character of a start tag must be a U+003C LESS-THAN
+ <ol>
+
+ <li>The first character of a start tag must be a U+003C LESS-THAN
SIGN (<code><</code>).</li>
<li>The next few characters of a start tag must be the element's
@@ -47329,12 +50484,17 @@
<li>Finally, start tags must be closed by a U+003E GREATER-THAN
SIGN (<code>></code>) character.</li>
- </ol><h5 id=end-tags><span class=secno>8.1.2.2 </span>End tags</h5>
+ </ol>
+
+ <h5 id=end-tags><span class=secno>8.1.2.2 </span>End tags</h5>
+
<p><dfn id=syntax-end-tag title=syntax-end-tag>End tags</dfn> must have the
following format:</p>
- <ol><li>The first character of an end tag must be a U+003C LESS-THAN
+ <ol>
+
+ <li>The first character of an end tag must be a U+003C LESS-THAN
SIGN (<code><</code>).</li>
<li>The second character of an end tag must be a U+002F SOLIDUS
@@ -47349,8 +50509,11 @@
<li>Finally, end tags must be closed by a U+003E GREATER-THAN
SIGN (<code>></code>) character.</li>
- </ol><h5 id=attributes><span class=secno>8.1.2.3 </span>Attributes</h5>
+ </ol>
+
+ <h5 id=attributes><span class=secno>8.1.2.3 </span>Attributes</h5>
+
<p><dfn id=syntax-attributes title=syntax-attributes>Attributes</dfn> for an element
are expressed inside the element's start tag.</p>
@@ -47370,8 +50533,10 @@
<p>Attributes can be specified in four different ways:</p>
- <dl><dt>Empty attribute syntax</dt>
+ <dl>
+ <dt>Empty attribute syntax</dt>
+
<dd>
<p>Just the <a href=#syntax-attribute-name title=syntax-attribute-name>attribute
@@ -47485,7 +50650,9 @@
</dd>
- </dl><p>There must never be two or more attributes on the same start tag
+ </dl>
+
+ <p>There must never be two or more attributes on the same start tag
whose names are an <a href=#ascii-case-insensitive>ASCII case-insensitive</a> match for
each other.</p>
@@ -47702,7 +50869,7 @@
span</a>, and ends at the next <a href=#syntax-escape-end title=syntax-escape-end>escaping text span end</a>. There
cannot be any <a href=#syntax-charref title=syntax-charref>character
references</a> inside an <a href=#syntax-escape title=syntax-escape>escaping
- text span</a> — sequences of characters that would look
+ text span</a> — sequences of characters that would look
like <a href=#syntax-charref title=syntax-charref>character references</a> do not
have special meaning.</p>
@@ -47757,8 +50924,10 @@
(<code>&</code>). Following this, there are three possible kinds
of character references:</p>
- <dl><dt>Named character references</dt>
+ <dl>
+ <dt>Named character references</dt>
+
<dd>The ampersand must be followed by one of the names given in the
<a href=#named-character-references>named character references</a> section, using the same
case. The name must be one that is terminated by a U+003B SEMICOLON
@@ -47790,7 +50959,9 @@
0xD800 .. 0xDFFF (surrogates). The digits must then be followed by
a U+003B SEMICOLON character (<code title="">;</code>).</dd>
- </dl><p>An <dfn id=syntax-ambiguous-ampersand title=syntax-ambiguous-ampersand>ambiguous
+ </dl>
+
+ <p>An <dfn id=syntax-ambiguous-ampersand title=syntax-ambiguous-ampersand>ambiguous
ampersand</dfn> is a U+0026 AMPERSAND (<code>&</code>) character
that is followed by some <a href=#syntax-text title=syntax-text>text</a> other
than a <a href=#space-character>space character</a>, a U+003C LESS-THAN SIGN
@@ -47856,9 +51027,9 @@
(if any) web browsers ever implemented true SGML parsing for HTML
documents; the only user agents to strictly handle HTML as an SGML
application have historically been validators. The resulting
- confusion — with validators claiming documents to have one
+ confusion — with validators claiming documents to have one
representation while widely deployed Web browsers interoperably
- implemented a different representation — has wasted decades
+ implemented a different representation — has wasted decades
of productivity. This version of HTML thus returns to a non-SGML
basis.</p>
@@ -47981,7 +51152,9 @@
all, then the <a href=#concept-encoding-confidence title=concept-encoding-confidence>confidence</a> is
<i>irrelevant</i>.</p>
- <ol><li><p>If the transport layer specifies an encoding, and it is
+ <ol>
+
+ <li><p>If the transport layer specifies an encoding, and it is
supported, return that encoding with the <a href=#concept-encoding-confidence title=concept-encoding-confidence>confidence</a>
<i>certain</i>, and abort these steps.</li>
@@ -48005,27 +51178,37 @@
<i>certain</i>, and abort these steps:</p>
<!-- this table is present in several forms in this file; keep them in sync -->
- <table><thead><tr><th>Bytes in Hexadecimal
+ <table>
+ <thead>
+ <tr>
+ <th>Bytes in Hexadecimal
<th>Encoding
- <tbody><!-- nobody uses this
+ <tbody>
+<!-- nobody uses this
<tr>
<td>00 00 FE FF
<td>UTF-32BE
<tr>
<td>FF FE 00 00
<td>UTF-32LE
---><tr><td>FE FF
+-->
+ <tr>
+ <td>FE FF
<td>UTF-16BE
- <tr><td>FF FE
+ <tr>
+ <td>FF FE
<td>UTF-16LE
- <tr><td>EF BB BF
+ <tr>
+ <td>EF BB BF
<td>UTF-8
<!-- nobody uses this
<tr>
<td>DD 73 66 73
<td>UTF-EBCDIC
-->
- </table><p class=note>This step looks for Unicode Byte Order Marks
+ </table>
+
+ <p class=note>This step looks for Unicode Byte Order Marks
(BOMs).</li>
<li><p>Otherwise, the user agent will have to search for explicit
@@ -48045,9 +51228,13 @@
aborts (either because user agent aborts, as described above, or
because a character encoding is found):</p>
- <ol><li><p>If <var title="">position</var> points to:</p>
+ <ol>
- <dl class=switch><dt>A sequence of bytes starting with: 0x3C 0x21 0x2D 0x2D (ASCII '<!--')</dt>
+ <li><p>If <var title="">position</var> points to:</p>
+
+ <dl class=switch>
+
+ <dt>A sequence of bytes starting with: 0x3C 0x21 0x2D 0x2D (ASCII '<!--')</dt>
<dd>
<p>Advance the <var title="">position</var> pointer so that it
@@ -48061,7 +51248,9 @@
<dt>A sequence of bytes starting with: 0x3C, 0x4D or 0x6D, 0x45 or 0x65, 0x54 or 0x74, 0x41 or 0x61, and finally one of 0x09, 0x0A, 0x0C, 0x0D, 0x20, 0x2F (case-insensitive ASCII '<meta' followed by a space or slash)</dt>
<dd>
- <ol><li><p>Advance the <var title="">position</var> pointer so
+ <ol>
+
+ <li><p>Advance the <var title="">position</var> pointer so
that it points at the next 0x09, 0x0A, 0x0C, 0x0D, 0x20, or
0x2F byte (the one in sequence of characters matched
above).</li>
@@ -48096,12 +51285,16 @@
<li><p>Otherwise, return to step 2 in these inner
steps.</li>
- </ol></dd>
+ </ol>
+ </dd>
+
<dt>A sequence of bytes starting with a 0x3C byte (ASCII '<'), optionally a 0x2F byte (ASCII '/'), and finally a byte in the range 0x41-0x5A or 0x61-0x7A (an ASCII letter)</dt>
<dd>
- <ol><li><p>Advance the <var title="">position</var> pointer so
+ <ol>
+
+ <li><p>Advance the <var title="">position</var> pointer so
that it points at the next 0x09 (ASCII TAB), 0x0A (ASCII LF),
0x0C (ASCII FF), 0x0D (ASCII CR), 0x20 (ASCII space), or 0x3E
(ASCII '>') byte.</li>
@@ -48111,8 +51304,10 @@
then jump to the second step in the overall "two step"
algorithm.</li>
- </ol></dd>
+ </ol>
+ </dd>
+
<dt>A sequence of bytes starting with: 0x3C 0x21 (ASCII '<!')</dt>
<dt>A sequence of bytes starting with: 0x3C 0x2F (ASCII '</')</dt>
<dt>A sequence of bytes starting with: 0x3C 0x3F (ASCII '<?')</dt>
@@ -48131,16 +51326,22 @@
</dd>
- </dl></li>
+ </dl>
+ </li>
+
<li>Move <var title="">position</var> so it points at the next
byte in the input stream, and return to the first step of this
"two step" algorithm.</li>
- </ol><p>When the above "two step" algorithm says to <dfn id=concept-get-attributes-when-sniffing title=concept-get-attributes-when-sniffing>get an
+ </ol>
+
+ <p>When the above "two step" algorithm says to <dfn id=concept-get-attributes-when-sniffing title=concept-get-attributes-when-sniffing>get an
attribute</dfn>, it means doing this:</p>
- <ol><li><p>If the byte at <var title="">position</var> is one of 0x09
+ <ol>
+
+ <li><p>If the byte at <var title="">position</var> is one of 0x09
(ASCII TAB), 0x0A (ASCII LF), 0x0C (ASCII FF), 0x0D (ASCII CR),
0x20 (ASCII space), or 0x2F (ASCII '/') then advance <var title="">position</var> to the next byte and redo this
substep.</li>
@@ -48156,7 +51357,9 @@
<li><p><em>Attribute name</em>: Process the byte at <var title="">position</var> as follows:</p>
- <dl class=switch><dt>If it is 0x3D (ASCII '='), and the <var title="">attribute
+ <dl class=switch>
+
+ <dt>If it is 0x3D (ASCII '='), and the <var title="">attribute
name</var> is longer than the empty string</dt>
<dd>Advance <var title="">position</var> to the next byte and
@@ -48188,8 +51391,10 @@
ASCII characters can contribute to the detection of a character
encoding.)</dd>
- </dl></li>
+ </dl>
+ </li>
+
<li><p>Advance <var title="">position</var> to the next byte and
return to the previous step.</li>
@@ -48214,11 +51419,15 @@
<li><p>Process the byte at <var title="">position</var> as
follows:</p>
- <dl class=switch><dt>If it is 0x22 (ASCII '"') or 0x27 ("'")</dt>
+ <dl class=switch>
+ <dt>If it is 0x22 (ASCII '"') or 0x27 ("'")</dt>
+
<dd>
- <ol><li>Let <var title="">b</var> be the value of the byte at
+ <ol>
+
+ <li>Let <var title="">b</var> be the value of the byte at
<var title="">position</var>.</li>
<li>Advance <var title="">position</var> to the next
@@ -48239,8 +51448,10 @@
<li>Return to the second step in these substeps.</li>
- </ol></dd>
+ </ol>
+ </dd>
+
<dt>If it is 0x3E (ASCII '>')</dt>
<dd>Abort the "get an attribute" algorithm. The attribute's
@@ -48260,12 +51471,16 @@
<dd>Append the Unicode character with the same codepoint as the
value of the byte at <var title="">position</var>) to <var title="">attribute value</var>. Advance <var title="">position</var> to the next byte.</dd>
- </dl></li>
+ </dl>
+ </li>
+
<li><p>Process the byte at <var title="">position</var> as
follows:</p>
- <dl class=switch><dt>If it is 0x09 (ASCII TAB), 0x0A (ASCII LF), 0x0C (ASCII
+ <dl class=switch>
+
+ <dt>If it is 0x09 (ASCII TAB), 0x0A (ASCII LF), 0x0C (ASCII
FF), 0x0D (ASCII CR), 0x20 (ASCII space), or 0x3E (ASCII
'>')</dt>
@@ -48285,12 +51500,16 @@
<dd>Append the Unicode character with the same codepoint as the
value of the byte at <var title="">position</var>) to <var title="">attribute value</var>.</dd>
- </dl></li>
+ </dl>
+ </li>
+
<li><p>Advance <var title="">position</var> to the next byte and
return to the previous step.</li>
- </ol><p>For the sake of interoperability, user agents should not use a
+ </ol>
+
+ <p>For the sake of interoperability, user agents should not use a
pre-scan algorithm that returns different results than the one
described above. (But, if you do, please at least let us know, so
that we can improve this algorithm and benefit everyone...)</p>
@@ -48319,7 +51538,9 @@
can in many cases be distinguished by inspection, a user agent may
heuristically decide which to use as a default.</li>
- </ol><p>The <a href="#document's-character-encoding">document's character encoding</a> must immediately
+ </ol>
+
+ <p>The <a href="#document's-character-encoding">document's character encoding</a> must immediately
be set to the value returned from this algorithm, at the same time
as the user agent uses the returned value to select the decoder to
use for the input stream.</p>
@@ -48360,38 +51581,45 @@
must be considered <a href=#parse-error title="parse error">parse
errors</a>.</p>
- <table><caption>Character encoding overrides</caption>
- <thead><tr><th> Input encoding <th> Replacement encoding <th> References
- <tbody><!-- how about EUC-JP? --><tr><td> EUC-KR <td> Windows-949 <td>
+ <table>
+ <caption>Character encoding overrides</caption>
+ <thead>
+ <tr> <th> Input encoding <th> Replacement encoding <th> References
+ <tbody>
+ <!-- how about EUC-JP? -->
+ <tr> <td> EUC-KR <td> Windows-949 <td>
<a href=#refsEUCKR>[EUCKR]</a> <!-- see reference for [EUC-KR] in RFC1557 -->
<a href=#refsWin949>[WIN949]</a><!-- http://www.microsoft.com/globaldev/reference/dbcs/949.mspx -->
- <tr><td> GB2312 <td> GBK <td>
+ <tr> <td> GB2312 <td> GBK <td>
<a href=#refsGB2312>[GB2312]</a><!-- XXX ? -->
<a href=#refsGBK>[GBK]</a><!-- http://www.iana.org/assignments/charset-reg/GBK -->
- <tr><td> GB_2312-80 <td> GBK <td>
+ <tr> <td> GB_2312-80 <td> GBK <td>
<a href=#refsRFC1345>[RFC1345]</a><!-- XXX consider more direct reference? -->
<a href=#refsGBK>[GBK]</a><!-- http://www.iana.org/assignments/charset-reg/GBK -->
- <tr><td> ISO-8859-1 <td> Windows-1252 <td>
+ <tr> <td> ISO-8859-1 <td> Windows-1252 <td>
<a href=#refsRFC1345>[RFC1345]</a><!-- XXX consider more direct reference? -->
<a href=#refsWin1252>[WIN1252]</a><!-- http://www.microsoft.com/globaldev/reference/sbcs/1252.htm -->
- <tr><td> ISO-8859-9 <td> Windows-1254 <td>
+ <tr> <td> ISO-8859-9 <td> Windows-1254 <td>
<a href=#refsRFC1345>[RFC1345]</a><!-- XXX consider more direct reference? -->
<a href=#refsWin1254>[WIN1254]</a><!-- http://www.microsoft.com/globaldev/reference/sbcs/1254.htm -->
- <tr><td> ISO-8859-11 <td> Windows-874 <td>
+ <tr> <td> ISO-8859-11 <td> Windows-874 <td>
<a href=#refsISO885911>[ISO885911]</a><!-- get reference from http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=28263 -->
<a href=#refsWin874>[WIN874]</a><!-- http://www.microsoft.com/globaldev/reference/sbcs/874.mspx -->
- <tr><td> KS_C_5601-1987 <td> Windows-949 <td>
+ <tr> <td> KS_C_5601-1987 <td> Windows-949 <td>
<a href=#refsRFC1345>[RFC1345]</a><!-- XXX consider more direct reference? -->
<a href=#refsWin949>[WIN949]</a><!-- http://www.microsoft.com/globaldev/reference/dbcs/949.mspx -->
- <tr><td> TIS-620 <td> Windows-874 <td>
+ <tr> <td> TIS-620 <td> Windows-874 <td>
<a href=#refsTIS620>[TIS620]</a> <!-- http://www.nectec.or.th/it-standards/std620/std620.htm -->
<a href=#refsWin874>[WIN874]</a><!-- http://www.microsoft.com/globaldev/reference/sbcs/874.mspx -->
- <tr><td> US-ASCII <td> Windows-1252 <td>
+ <tr> <td> US-ASCII <td> Windows-1252 <td>
<a href=#refsRFC1345>[RFC1345]</a><!-- XXX consider more direct reference? -->
<a href=#refsWin1252>[WIN1252]</a><!-- http://www.microsoft.com/globaldev/reference/sbcs/1252.htm -->
- <tr><td> x-x-big5 <td> Big5 <td>
+ <tr> <td> x-x-big5 <td> Big5 <td>
<a href=#refsBIG5>[BIG5]</a> <!-- XXX ? -->
- </table><p class=note>The requirement to treat certain encodings as other
+ </tbody>
+ </table>
+
+ <p class=note>The requirement to treat certain encodings as other
encodings according to the table above is a willful violation of the
W3C Character Model specification. <a href=#refsCHARMOD>[CHARMOD]</a></p>
@@ -48490,7 +51718,9 @@
failed to find an encoding, or if it found an encoding that was not
the actual encoding of the file.</p>
- <ol><li>If the new encoding is a UTF-16 encoding, change it to
+ <ol>
+
+ <li>If the new encoding is a UTF-16 encoding, change it to
UTF-8.</li>
<li>If the new encoding is identical or equivalent to the encoding
@@ -48528,8 +51758,12 @@
misinterpreted. User agents may notify the user of the situation,
to aid in application development.</li>
- </ol><h4 id=parse-state><span class=secno>8.2.3 </span>Parse state</h4>
+ </ol>
+
+
+ <h4 id=parse-state><span class=secno>8.2.3 </span>Parse state</h4>
+
<h5 id=the-insertion-mode><span class=secno>8.2.3.1 </span>The insertion mode</h5>
<p>The <dfn id=insertion-mode>insertion mode</dfn> is a flag that controls the primary
@@ -48583,12 +51817,16 @@
foreign content">in foreign content</a>" mode to handle HTML
(i.e. not foreign) content.</p>
- <hr><p>When the steps below require the UA to <dfn id=reset-the-insertion-mode-appropriately>reset the insertion
+ <hr>
+
+ <p>When the steps below require the UA to <dfn id=reset-the-insertion-mode-appropriately>reset the insertion
mode appropriately</dfn>, it means the UA must follow these
steps:</p>
- <ol><li>Let <var title="">last</var> be false.</li>
+ <ol>
+ <li>Let <var title="">last</var> be false.</li>
+
<li>Let <var title="">node</var> be the last node in the
<a href=#stack-of-open-elements>stack of open elements</a>.</li>
@@ -48677,8 +51915,11 @@
<li>Return to step 3.</li>
- </ol><h5 id=the-stack-of-open-elements><span class=secno>8.2.3.2 </span>The stack of open elements</h5>
+ </ol>
+
+ <h5 id=the-stack-of-open-elements><span class=secno>8.2.3.2 </span>The stack of open elements</h5>
+
<p>Initially the <dfn id=stack-of-open-elements>stack of open elements</dfn> is empty. The
stack grows downwards; the topmost node on the stack is the first
one added to the stack, and the bottommost node of the stack is the
@@ -48712,8 +51953,10 @@
<p>Elements in the stack fall into the following categories:</p>
- <dl><dt><dfn id=special>Special</dfn></dt>
+ <dl>
+ <dt><dfn id=special>Special</dfn></dt>
+
<dd><p>The following HTML elements have varying levels of special
parsing rules: <code><a href=#the-address-element>address</a></code>, <code><a href=#the-area-element>area</a></code>,
<code><a href=#the-article-element>article</a></code>, <code><a href=#the-aside-element>aside</a></code>, <code><a href=#the-base-element>base</a></code>,
@@ -48763,10 +52006,14 @@
<dd><p>All other elements found while parsing an HTML
document.</dd>
- </dl><p>The <a href=#stack-of-open-elements>stack of open elements</a> is said to <dfn id=has-an-element-in-scope title="has an element in scope">have an element in scope</dfn> when
+ </dl>
+
+ <p>The <a href=#stack-of-open-elements>stack of open elements</a> is said to <dfn id=has-an-element-in-scope title="has an element in scope">have an element in scope</dfn> when
the following algorithm terminates in a match state:</p>
- <ol><li><p>Initialize <var title="">node</var> to be the <a href=#current-node>current
+ <ol>
+
+ <li><p>Initialize <var title="">node</var> to be the <a href=#current-node>current
node</a> (the bottommost node of the stack).</li>
<li><p>If <var title="">node</var> is the target node, terminate in
@@ -48774,7 +52021,8 @@
<li><p>Otherwise, if <var title="">node</var> is one of the
following elements, terminate in a failure state:</p>
- <ul class=brief><li><code><a href=#the-applet-element>applet</a></code> in the HTML namespace</li>
+ <ul class=brief>
+ <li><code><a href=#the-applet-element>applet</a></code> in the HTML namespace</li>
<li><code><a href=#the-caption-element>caption</a></code> in the HTML namespace</li>
<li><code><a href=#the-html-element>html</a></code> in the HTML namespace</li> <!-- (This can only happen if the <var title="">node</var> is the topmost node of the <span>stack of open elements</span>, and prevents the next step from being invoked if there are no more elements in the stack.) -->
<li><code><a href=#the-table-element>table</a></code> in the HTML namespace</li>
@@ -48784,19 +52032,24 @@
<li><code><a href=#the-marquee-element-0>marquee</a></code> in the HTML namespace</li>
<li><code><a href=#the-object-element>object</a></code> in the HTML namespace</li>
<!--XXXSVG <li><code title="">foreignObject</code> in the SVG namespace</li>-->
- </ul></li>
+ </ul>
+ </li>
<li><p>Otherwise, set <var title="">node</var> to the previous
entry in the <a href=#stack-of-open-elements>stack of open elements</a> and return to step
2. (This will never fail, since the loop will always terminate in
- the previous step if the top of the stack — an
- <code><a href=#the-html-element>html</a></code> element — is reached.)</li>
+ the previous step if the top of the stack — an
+ <code><a href=#the-html-element>html</a></code> element — is reached.)</li>
- </ol><p>The <a href=#stack-of-open-elements>stack of open elements</a> is said to <dfn id=has-an-element-in-table-scope title="has an element in table scope">have an element in <em>table
+ </ol>
+
+ <p>The <a href=#stack-of-open-elements>stack of open elements</a> is said to <dfn id=has-an-element-in-table-scope title="has an element in table scope">have an element in <em>table
scope</em></dfn> when the following algorithm terminates in a match
state:</p>
- <ol><li><p>Initialize <var title="">node</var> to be the <a href=#current-node>current
+ <ol>
+
+ <li><p>Initialize <var title="">node</var> to be the <a href=#current-node>current
node</a> (the bottommost node of the stack).</li>
<li><p>If <var title="">node</var> is the target node, terminate in
@@ -48804,17 +52057,21 @@
<li><p>Otherwise, if <var title="">node</var> is one of the
following elements, terminate in a failure state:</p>
- <ul class=brief><li><code><a href=#the-html-element>html</a></code> in the HTML namespace</li> <!-- (This can only happen if the <var title="">node</var> is the topmost node of the <span>stack of open elements</span>, and prevents the next step from being invoked if there are no more elements in the stack.) -->
+ <ul class=brief>
+ <li><code><a href=#the-html-element>html</a></code> in the HTML namespace</li> <!-- (This can only happen if the <var title="">node</var> is the topmost node of the <span>stack of open elements</span>, and prevents the next step from being invoked if there are no more elements in the stack.) -->
<li><code><a href=#the-table-element>table</a></code> in the HTML namespace</li>
- </ul></li>
+ </ul>
+ </li>
<li><p>Otherwise, set <var title="">node</var> to the previous
entry in the <a href=#stack-of-open-elements>stack of open elements</a> and return to step
2. (This will never fail, since the loop will always terminate in
- the previous step if the top of the stack — an
- <code><a href=#the-html-element>html</a></code> element — is reached.)</li>
+ the previous step if the top of the stack — an
+ <code><a href=#the-html-element>html</a></code> element — is reached.)</li>
- </ol><p>Nothing happens if at any time any of the elements in the
+ </ol>
+
+ <p>Nothing happens if at any time any of the elements in the
<a href=#stack-of-open-elements>stack of open elements</a> are moved to a new location in,
or removed from, the <code>Document</code> tree. In particular, the
stack is not changed in this situation. This can cause, amongst
@@ -48841,7 +52098,9 @@
active formatting elements</dfn>, the UA must perform the following
steps:</p>
- <ol><li>If there are no entries in the <a href=#list-of-active-formatting-elements>list of active formatting
+ <ol>
+
+ <li>If there are no entries in the <a href=#list-of-active-formatting-elements>list of active formatting
elements</a>, then there is nothing to reconstruct; stop this
algorithm.</li>
@@ -48885,7 +52144,9 @@
active formatting elements</a> is not the last entry in the
list, return to step 7.</li>
- </ol><p>This has the effect of reopening all the formatting elements that
+ </ol>
+
+ <p>This has the effect of reopening all the formatting elements that
were opened in the current body, cell, or caption (whichever is
youngest) that haven't been explicitly closed.</p>
@@ -48900,7 +52161,9 @@
active formatting elements up to the last marker</dfn>, the UA must
perform the following steps:</p>
- <ol><li>Let <var title="">entry</var> be the last (most recently added)
+ <ol>
+
+ <li>Let <var title="">entry</var> be the last (most recently added)
entry in the <a href=#list-of-active-formatting-elements>list of active formatting elements</a>.</li>
<li>Remove <var title="">entry</var> from the <a href=#list-of-active-formatting-elements>list of active
@@ -48912,8 +52175,11 @@
<li>Go to step 1.</li>
- </ol><h5 id=the-element-pointers><span class=secno>8.2.3.4 </span>The element pointers</h5>
+ </ol>
+
+ <h5 id=the-element-pointers><span class=secno>8.2.3.4 </span>The element pointers</h5>
+
<p>Initially the <dfn id=head-element-pointer><code title="">head</code> element
pointer</dfn> and the <dfn id=form-element-pointer><code title="">form</code> element
pointer</dfn> are both null.</p>
@@ -49019,7 +52285,9 @@
<p>Consume the <a href=#next-input-character>next input character</a>:</p>
- <dl class=switch><dt>U+0026 AMPERSAND (&)</dt>
+ <dl class=switch>
+
+ <dt>U+0026 AMPERSAND (&)</dt>
<dd>When the <a href=#content-model-flag>content model flag</a> is set to one of the
PCDATA or RCDATA states and the <a href=#escape-flag>escape flag</a> is
false: switch to the <a href=#character-reference-data-state>character reference data
@@ -49077,8 +52345,11 @@
<dd>Emit the input character as a character token. Stay in the
<a href=#data-state>data state</a>.</dd>
- </dl><h5 id=character-reference-data-state><span class=secno>8.2.4.2 </span><dfn>Character reference data state</dfn></h5>
+ </dl>
+
+ <h5 id=character-reference-data-state><span class=secno>8.2.4.2 </span><dfn>Character reference data state</dfn></h5>
+
<p><em>(This cannot happen if the <a href=#content-model-flag>content model flag</a>
is set to the CDATA state.)</em></p>
@@ -49098,7 +52369,9 @@
<p>The behavior of this state depends on the <a href=#content-model-flag>content model
flag</a>.</p>
- <dl><dt>If the <a href=#content-model-flag>content model flag</a> is set to the RCDATA
+ <dl>
+
+ <dt>If the <a href=#content-model-flag>content model flag</a> is set to the RCDATA
or CDATA states</dt>
<dd>
@@ -49118,7 +52391,9 @@
<p>Consume the <a href=#next-input-character>next input character</a>:</p>
- <dl class=switch><dt>U+0021 EXCLAMATION MARK (!)</dt>
+ <dl class=switch>
+
+ <dt>U+0021 EXCLAMATION MARK (!)</dt>
<dd>Switch to the <a href=#markup-declaration-open-state>markup declaration open state</a>.</dd>
<dt>U+002F SOLIDUS (/)</dt>
@@ -49151,10 +52426,15 @@
character token and reconsume the <a href=#current-input-character>current input character</a> in the
<a href=#data-state>data state</a>.</dd>
- </dl></dd>
+ </dl>
- </dl><h5 id=close-tag-open-state><span class=secno>8.2.4.4 </span><dfn>Close tag open state</dfn></h5>
+ </dd>
+ </dl>
+
+
+ <h5 id=close-tag-open-state><span class=secno>8.2.4.4 </span><dfn>Close tag open state</dfn></h5>
+
<p>If the <a href=#content-model-flag>content model flag</a> is set to the RCDATA or
CDATA states but no start tag token has ever been emitted by this
instance of the tokeniser (<a href=#fragment-case>fragment case</a>), or, if the
@@ -49164,7 +52444,8 @@
case-insensitive</a> manner), or if they do but they are not
immediately followed by one of the following characters:</p>
- <ul class=brief><li>U+0009 CHARACTER TABULATION</li>
+ <ul class=brief>
+ <li>U+0009 CHARACTER TABULATION</li>
<li>U+000A LINE FEED (LF)</li>
<li>U+000C FORM FEED (FF)</li>
<!--<li>U+000D CARRIAGE RETURN (CR)</li>-->
@@ -49172,7 +52453,9 @@
<li>U+003E GREATER-THAN SIGN (>)</li>
<li>U+002F SOLIDUS (/)</li>
<li>EOF</li>
- </ul><p>...then emit a U+003C LESS-THAN SIGN character token, a U+002F
+ </ul>
+
+ <p>...then emit a U+003C LESS-THAN SIGN character token, a U+002F
SOLIDUS character token, and switch to the <a href=#data-state>data state</a>
to process the <a href=#next-input-character>next input character</a>.</p>
@@ -49180,7 +52463,9 @@
PCDATA state, or if the next few characters <em>do</em> match that tag
name, consume the <a href=#next-input-character>next input character</a>:</p>
- <dl class=switch><dt>U+0041 LATIN CAPITAL LETTER A through to U+005A LATIN CAPITAL LETTER Z</dt>
+ <dl class=switch>
+
+ <dt>U+0041 LATIN CAPITAL LETTER A through to U+005A LATIN CAPITAL LETTER Z</dt>
<dd>Create a new end tag token, set its tag name to the lowercase
version of the input character (add 0x0020 to the character's
code point), then switch to the <a href=#tag-name-state>tag name
@@ -49206,11 +52491,16 @@
<dd><a href=#parse-error>Parse error</a>. Switch to the <a href=#bogus-comment-state>bogus
comment state</a>.</dd>
- </dl><h5 id=tag-name-state><span class=secno>8.2.4.5 </span><dfn>Tag name state</dfn></h5>
+ </dl>
+
+ <h5 id=tag-name-state><span class=secno>8.2.4.5 </span><dfn>Tag name state</dfn></h5>
+
<p>Consume the <a href=#next-input-character>next input character</a>:</p>
- <dl class=switch><dt>U+0009 CHARACTER TABULATION</dt>
+ <dl class=switch>
+
+ <dt>U+0009 CHARACTER TABULATION</dt>
<dt>U+000A LINE FEED (LF)</dt>
<dt>U+000C FORM FEED (FF)</dt>
<!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
@@ -49238,11 +52528,16 @@
<dd>Append the <a href=#current-input-character>current input character</a> to the current tag token's
tag name. Stay in the <a href=#tag-name-state>tag name state</a>.</dd>
- </dl><h5 id=before-attribute-name-state><span class=secno>8.2.4.6 </span><dfn>Before attribute name state</dfn></h5>
+ </dl>
+
+ <h5 id=before-attribute-name-state><span class=secno>8.2.4.6 </span><dfn>Before attribute name state</dfn></h5>
+
<p>Consume the <a href=#next-input-character>next input character</a>:</p>
- <dl class=switch><dt>U+0009 CHARACTER TABULATION</dt>
+ <dl class=switch>
+
+ <dt>U+0009 CHARACTER TABULATION</dt>
<dt>U+000A LINE FEED (LF)</dt>
<dt>U+000C FORM FEED (FF)</dt>
<!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
@@ -49280,11 +52575,16 @@
the empty string. Switch to the <a href=#attribute-name-state>attribute name
state</a>.</dd>
- </dl><h5 id=attribute-name-state><span class=secno>8.2.4.7 </span><dfn>Attribute name state</dfn></h5>
+ </dl>
+
+ <h5 id=attribute-name-state><span class=secno>8.2.4.7 </span><dfn>Attribute name state</dfn></h5>
+
<p>Consume the <a href=#next-input-character>next input character</a>:</p>
- <dl class=switch><dt>U+0009 CHARACTER TABULATION</dt>
+ <dl class=switch>
+
+ <dt>U+0009 CHARACTER TABULATION</dt>
<dt>U+000A LINE FEED (LF)</dt>
<dt>U+000C FORM FEED (FF)</dt>
<!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
@@ -49321,7 +52621,9 @@
<dd>Append the <a href=#current-input-character>current input character</a> to the current attribute's
name. Stay in the <a href=#attribute-name-state>attribute name state</a>.</dd>
- </dl><p>When the user agent leaves the attribute name state (and before
+ </dl>
+
+ <p>When the user agent leaves the attribute name state (and before
emitting the tag token, if appropriate), the complete attribute's
name must be compared to the other attributes on the same token;
if there is already an attribute on the token with the exact same
@@ -49334,7 +52636,9 @@
<p>Consume the <a href=#next-input-character>next input character</a>:</p>
- <dl class=switch><dt>U+0009 CHARACTER TABULATION</dt>
+ <dl class=switch>
+
+ <dt>U+0009 CHARACTER TABULATION</dt>
<dt>U+000A LINE FEED (LF)</dt>
<dt>U+000C FORM FEED (FF)</dt>
<!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
@@ -49374,11 +52678,16 @@
the empty string. Switch to the <a href=#attribute-name-state>attribute name
state</a>.</dd>
- </dl><h5 id=before-attribute-value-state><span class=secno>8.2.4.9 </span><dfn>Before attribute value state</dfn></h5>
+ </dl>
+
+ <h5 id=before-attribute-value-state><span class=secno>8.2.4.9 </span><dfn>Before attribute value state</dfn></h5>
+
<p>Consume the <a href=#next-input-character>next input character</a>:</p>
- <dl class=switch><dt>U+0009 CHARACTER TABULATION</dt>
+ <dl class=switch>
+
+ <dt>U+0009 CHARACTER TABULATION</dt>
<dt>U+000A LINE FEED (LF)</dt>
<dt>U+000C FORM FEED (FF)</dt>
<!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
@@ -49413,11 +52722,16 @@
value. Switch to the <a href=#attribute-value-(unquoted)-state>attribute value (unquoted)
state</a>.</dd>
- </dl><h5 id=attribute-value-(double-quoted)-state><span class=secno>8.2.4.10 </span><dfn>Attribute value (double-quoted) state</dfn></h5>
+ </dl>
+
+ <h5 id=attribute-value-(double-quoted)-state><span class=secno>8.2.4.10 </span><dfn>Attribute value (double-quoted) state</dfn></h5>
+
<p>Consume the <a href=#next-input-character>next input character</a>:</p>
- <dl class=switch><dt>U+0022 QUOTATION MARK (")</dt>
+ <dl class=switch>
+
+ <dt>U+0022 QUOTATION MARK (")</dt>
<dd>Switch to the <a href=#after-attribute-value-(quoted)-state>after attribute value (quoted)
state</a>.</dd>
@@ -49436,11 +52750,16 @@
value. Stay in the <a href=#attribute-value-(double-quoted)-state>attribute value (double-quoted)
state</a>.</dd>
- </dl><h5 id=attribute-value-(single-quoted)-state><span class=secno>8.2.4.11 </span><dfn>Attribute value (single-quoted) state</dfn></h5>
+ </dl>
+
+ <h5 id=attribute-value-(single-quoted)-state><span class=secno>8.2.4.11 </span><dfn>Attribute value (single-quoted) state</dfn></h5>
+
<p>Consume the <a href=#next-input-character>next input character</a>:</p>
- <dl class=switch><dt>U+0027 APOSTROPHE (')</dt>
+ <dl class=switch>
+
+ <dt>U+0027 APOSTROPHE (')</dt>
<dd>Switch to the <a href=#after-attribute-value-(quoted)-state>after attribute value (quoted)
state</a>.</dd>
@@ -49459,11 +52778,16 @@
value. Stay in the <a href=#attribute-value-(single-quoted)-state>attribute value (single-quoted)
state</a>.</dd>
- </dl><h5 id=attribute-value-(unquoted)-state><span class=secno>8.2.4.12 </span><dfn>Attribute value (unquoted) state</dfn></h5>
+ </dl>
+
+ <h5 id=attribute-value-(unquoted)-state><span class=secno>8.2.4.12 </span><dfn>Attribute value (unquoted) state</dfn></h5>
+
<p>Consume the <a href=#next-input-character>next input character</a>:</p>
- <dl class=switch><dt>U+0009 CHARACTER TABULATION</dt>
+ <dl class=switch>
+
+ <dt>U+0009 CHARACTER TABULATION</dt>
<dt>U+000A LINE FEED (LF)</dt>
<dt>U+000C FORM FEED (FF)</dt>
<!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
@@ -49495,8 +52819,11 @@
value. Stay in the <a href=#attribute-value-(unquoted)-state>attribute value (unquoted)
state</a>.</dd>
- </dl><h5 id=character-reference-in-attribute-value-state><span class=secno>8.2.4.13 </span><dfn>Character reference in attribute value state</dfn></h5>
+ </dl>
+
+ <h5 id=character-reference-in-attribute-value-state><span class=secno>8.2.4.13 </span><dfn>Character reference in attribute value state</dfn></h5>
+
<p>Attempt to <a href=#consume-a-character-reference>consume a character reference</a>.</p>
<p>If nothing is returned, append a U+0026 AMPERSAND character to
@@ -49513,7 +52840,9 @@
<p>Consume the <a href=#next-input-character>next input character</a>:</p>
- <dl class=switch><dt>U+0009 CHARACTER TABULATION</dt>
+ <dl class=switch>
+
+ <dt>U+0009 CHARACTER TABULATION</dt>
<dt>U+000A LINE FEED (LF)</dt>
<dt>U+000C FORM FEED (FF)</dt>
<!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
@@ -49536,11 +52865,16 @@
<dd><a href=#parse-error>Parse error</a>. Reconsume the character in
the <a href=#before-attribute-name-state>before attribute name state</a>.</dd>
- </dl><h5 id=self-closing-start-tag-state><span class=secno>8.2.4.15 </span><dfn>Self-closing start tag state</dfn></h5>
+ </dl>
+
+ <h5 id=self-closing-start-tag-state><span class=secno>8.2.4.15 </span><dfn>Self-closing start tag state</dfn></h5>
+
<p>Consume the <a href=#next-input-character>next input character</a>:</p>
- <dl class=switch><dt>U+003E GREATER-THAN SIGN (>)</dt>
+ <dl class=switch>
+
+ <dt>U+003E GREATER-THAN SIGN (>)</dt>
<dd>Set the <i>self-closing flag</i> of the current tag
token. Emit the current tag token. Switch to the <a href=#data-state>data
state</a>.</dd>
@@ -49554,8 +52888,11 @@
<dd><a href=#parse-error>Parse error</a>. Reconsume the character in
the <a href=#before-attribute-name-state>before attribute name state</a>.</dd>
- </dl><h5 id=bogus-comment-state><span class=secno>8.2.4.16 </span><dfn>Bogus comment state</dfn></h5>
+ </dl>
+
+ <h5 id=bogus-comment-state><span class=secno>8.2.4.16 </span><dfn>Bogus comment state</dfn></h5>
+
<p><em>(This can only happen if the <a href=#content-model-flag>content model
flag</a> is set to the PCDATA state.)</em></p>
@@ -49608,7 +52945,9 @@
<p>Consume the <a href=#next-input-character>next input character</a>:</p>
- <dl class=switch><dt>U+002D HYPHEN-MINUS (-)</dt>
+ <dl class=switch>
+
+ <dt>U+002D HYPHEN-MINUS (-)</dt>
<dd>Switch to the <a href=#comment-start-dash-state>comment start dash state</a>.</dd>
<dt>U+003E GREATER-THAN SIGN (>)</dt>
@@ -49623,11 +52962,16 @@
<dd>Append the input character to the comment token's
data. Switch to the <a href=#comment-state>comment state</a>.</dd>
- </dl><h5 id=comment-start-dash-state><span class=secno>8.2.4.19 </span><dfn>Comment start dash state</dfn></h5>
+ </dl>
+
+ <h5 id=comment-start-dash-state><span class=secno>8.2.4.19 </span><dfn>Comment start dash state</dfn></h5>
+
<p>Consume the <a href=#next-input-character>next input character</a>:</p>
- <dl class=switch><dt>U+002D HYPHEN-MINUS (-)</dt>
+ <dl class=switch>
+
+ <dt>U+002D HYPHEN-MINUS (-)</dt>
<dd>Switch to the <a href=#comment-end-state>comment end state</a></dd>
<dt>U+003E GREATER-THAN SIGN (>)</dt>
@@ -49643,11 +52987,16 @@
character to the comment token's data. Switch to the
<a href=#comment-state>comment state</a>.</dd>
- </dl><h5 id=comment-state><span class=secno>8.2.4.20 </span><dfn id=comment>Comment state</dfn></h5>
+ </dl>
+
+ <h5 id=comment-state><span class=secno>8.2.4.20 </span><dfn id=comment>Comment state</dfn></h5>
+
<p>Consume the <a href=#next-input-character>next input character</a>:</p>
- <dl class=switch><dt>U+002D HYPHEN-MINUS (-)</dt>
+ <dl class=switch>
+
+ <dt>U+002D HYPHEN-MINUS (-)</dt>
<dd>Switch to the <a href=#comment-end-dash-state>comment end dash state</a></dd>
<dt>EOF</dt>
@@ -49662,11 +53011,16 @@
<dd>Append the input character to the comment token's data. Stay
in the <a href=#comment-state>comment state</a>.</dd>
- </dl><h5 id=comment-end-dash-state><span class=secno>8.2.4.21 </span><dfn>Comment end dash state</dfn></h5>
+ </dl>
+
+ <h5 id=comment-end-dash-state><span class=secno>8.2.4.21 </span><dfn>Comment end dash state</dfn></h5>
+
<p>Consume the <a href=#next-input-character>next input character</a>:</p>
- <dl class=switch><dt>U+002D HYPHEN-MINUS (-)</dt>
+ <dl class=switch>
+
+ <dt>U+002D HYPHEN-MINUS (-)</dt>
<dd>Switch to the <a href=#comment-end-state>comment end state</a></dd>
<dt>EOF</dt>
@@ -49682,11 +53036,16 @@
character to the comment token's data. Switch to the
<a href=#comment-state>comment state</a>.</dd>
- </dl><h5 id=comment-end-state><span class=secno>8.2.4.22 </span><dfn>Comment end state</dfn></h5>
+ </dl>
+
+ <h5 id=comment-end-state><span class=secno>8.2.4.22 </span><dfn>Comment end state</dfn></h5>
+
<p>Consume the <a href=#next-input-character>next input character</a>:</p>
- <dl class=switch><dt>U+003E GREATER-THAN SIGN (>)</dt>
+ <dl class=switch>
+
+ <dt>U+003E GREATER-THAN SIGN (>)</dt>
<dd>Emit the comment token. Switch to the <a href=#data-state>data
state</a>.</dd>
@@ -49708,11 +53067,16 @@
characters and the input character to the comment token's
data. Switch to the <a href=#comment-state>comment state</a>.</dd>
- </dl><h5 id=doctype-state><span class=secno>8.2.4.23 </span><dfn>DOCTYPE state</dfn></h5>
+ </dl>
+
+ <h5 id=doctype-state><span class=secno>8.2.4.23 </span><dfn>DOCTYPE state</dfn></h5>
+
<p>Consume the <a href=#next-input-character>next input character</a>:</p>
- <dl class=switch><dt>U+0009 CHARACTER TABULATION</dt>
+ <dl class=switch>
+
+ <dt>U+0009 CHARACTER TABULATION</dt>
<dt>U+000A LINE FEED (LF)</dt>
<dt>U+000C FORM FEED (FF)</dt>
<!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
@@ -49723,11 +53087,16 @@
<dd><a href=#parse-error>Parse error</a>. Reconsume the current
character in the <a href=#before-doctype-name-state>before DOCTYPE name state</a>.</dd>
- </dl><h5 id=before-doctype-name-state><span class=secno>8.2.4.24 </span><dfn>Before DOCTYPE name state</dfn></h5>
+ </dl>
+
+ <h5 id=before-doctype-name-state><span class=secno>8.2.4.24 </span><dfn>Before DOCTYPE name state</dfn></h5>
+
<p>Consume the <a href=#next-input-character>next input character</a>:</p>
- <dl class=switch><dt>U+0009 CHARACTER TABULATION</dt>
+ <dl class=switch>
+
+ <dt>U+0009 CHARACTER TABULATION</dt>
<dt>U+000A LINE FEED (LF)</dt>
<dt>U+000C FORM FEED (FF)</dt>
<!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
@@ -49755,11 +53124,16 @@
<a href=#current-input-character>current input character</a>. Switch to the <a href=#doctype-name-state>DOCTYPE name
state</a>.</dd>
- </dl><h5 id=doctype-name-state><span class=secno>8.2.4.25 </span><dfn>DOCTYPE name state</dfn></h5>
+ </dl>
+
+ <h5 id=doctype-name-state><span class=secno>8.2.4.25 </span><dfn>DOCTYPE name state</dfn></h5>
+
<p>Consume the <a href=#next-input-character>next input character</a>:</p>
- <dl class=switch><dt>U+0009 CHARACTER TABULATION</dt>
+ <dl class=switch>
+
+ <dt>U+0009 CHARACTER TABULATION</dt>
<dt>U+000A LINE FEED (LF)</dt>
<dt>U+000C FORM FEED (FF)</dt>
<!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
@@ -49784,11 +53158,16 @@
<dd>Append the <a href=#current-input-character>current input character</a> to the current DOCTYPE
token's name. Stay in the <a href=#doctype-name-state>DOCTYPE name state</a>.</dd>
- </dl><h5 id=after-doctype-name-state><span class=secno>8.2.4.26 </span><dfn>After DOCTYPE name state</dfn></h5>
+ </dl>
+
+ <h5 id=after-doctype-name-state><span class=secno>8.2.4.26 </span><dfn>After DOCTYPE name state</dfn></h5>
+
<p>Consume the <a href=#next-input-character>next input character</a>:</p>
- <dl class=switch><dt>U+0009 CHARACTER TABULATION</dt>
+ <dl class=switch>
+
+ <dt>U+0009 CHARACTER TABULATION</dt>
<dt>U+000A LINE FEED (LF)</dt>
<dt>U+000C FORM FEED (FF)</dt>
<!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
@@ -49824,11 +53203,16 @@
</dd>
- </dl><h5 id=before-doctype-public-identifier-state><span class=secno>8.2.4.27 </span><dfn>Before DOCTYPE public identifier state</dfn></h5>
+ </dl>
+
+ <h5 id=before-doctype-public-identifier-state><span class=secno>8.2.4.27 </span><dfn>Before DOCTYPE public identifier state</dfn></h5>
+
<p>Consume the <a href=#next-input-character>next input character</a>:</p>
- <dl class=switch><dt>U+0009 CHARACTER TABULATION</dt>
+ <dl class=switch>
+
+ <dt>U+0009 CHARACTER TABULATION</dt>
<dt>U+000A LINE FEED (LF)</dt>
<dt>U+000C FORM FEED (FF)</dt>
<!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
@@ -49860,11 +53244,16 @@
<i>force-quirks flag</i> to <i>on</i>. Switch to the <a href=#bogus-doctype-state>bogus
DOCTYPE state</a>.</dd>
- </dl><h5 id=doctype-public-identifier-(double-quoted)-state><span class=secno>8.2.4.28 </span><dfn>DOCTYPE public identifier (double-quoted) state</dfn></h5>
+ </dl>
+
+ <h5 id=doctype-public-identifier-(double-quoted)-state><span class=secno>8.2.4.28 </span><dfn>DOCTYPE public identifier (double-quoted) state</dfn></h5>
+
<p>Consume the <a href=#next-input-character>next input character</a>:</p>
- <dl class=switch><dt>U+0022 QUOTATION MARK (")</dt>
+ <dl class=switch>
+
+ <dt>U+0022 QUOTATION MARK (")</dt>
<dd>Switch to the <a href=#after-doctype-public-identifier-state>after DOCTYPE public identifier state</a>.</dd>
<dt>U+003E GREATER-THAN SIGN (>)</dt>
@@ -49882,11 +53271,16 @@
token's public identifier. Stay in the <a href=#doctype-public-identifier-(double-quoted)-state>DOCTYPE public
identifier (double-quoted) state</a>.</dd>
- </dl><h5 id=doctype-public-identifier-(single-quoted)-state><span class=secno>8.2.4.29 </span><dfn>DOCTYPE public identifier (single-quoted) state</dfn></h5>
+ </dl>
+
+ <h5 id=doctype-public-identifier-(single-quoted)-state><span class=secno>8.2.4.29 </span><dfn>DOCTYPE public identifier (single-quoted) state</dfn></h5>
+
<p>Consume the <a href=#next-input-character>next input character</a>:</p>
- <dl class=switch><dt>U+0027 APOSTROPHE (')</dt>
+ <dl class=switch>
+
+ <dt>U+0027 APOSTROPHE (')</dt>
<dd>Switch to the <a href=#after-doctype-public-identifier-state>after DOCTYPE public identifier state</a>.</dd>
<dt>U+003E GREATER-THAN SIGN (>)</dt>
@@ -49904,11 +53298,16 @@
token's public identifier. Stay in the <a href=#doctype-public-identifier-(single-quoted)-state>DOCTYPE public
identifier (single-quoted) state</a>.</dd>
- </dl><h5 id=after-doctype-public-identifier-state><span class=secno>8.2.4.30 </span><dfn>After DOCTYPE public identifier state</dfn></h5>
+ </dl>
+
+ <h5 id=after-doctype-public-identifier-state><span class=secno>8.2.4.30 </span><dfn>After DOCTYPE public identifier state</dfn></h5>
+
<p>Consume the <a href=#next-input-character>next input character</a>:</p>
- <dl class=switch><dt>U+0009 CHARACTER TABULATION</dt>
+ <dl class=switch>
+
+ <dt>U+0009 CHARACTER TABULATION</dt>
<dt>U+000A LINE FEED (LF)</dt>
<dt>U+000C FORM FEED (FF)</dt>
<!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
@@ -49939,11 +53338,16 @@
<i>force-quirks flag</i> to <i>on</i>. Switch to the <a href=#bogus-doctype-state>bogus
DOCTYPE state</a>.</dd>
- </dl><h5 id=before-doctype-system-identifier-state><span class=secno>8.2.4.31 </span><dfn>Before DOCTYPE system identifier state</dfn></h5>
+ </dl>
+
+ <h5 id=before-doctype-system-identifier-state><span class=secno>8.2.4.31 </span><dfn>Before DOCTYPE system identifier state</dfn></h5>
+
<p>Consume the <a href=#next-input-character>next input character</a>:</p>
- <dl class=switch><dt>U+0009 CHARACTER TABULATION</dt>
+ <dl class=switch>
+
+ <dt>U+0009 CHARACTER TABULATION</dt>
<dt>U+000A LINE FEED (LF)</dt>
<dt>U+000C FORM FEED (FF)</dt>
<!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
@@ -49975,11 +53379,16 @@
<i>force-quirks flag</i> to <i>on</i>. Switch to the <a href=#bogus-doctype-state>bogus
DOCTYPE state</a>.</dd>
- </dl><h5 id=doctype-system-identifier-(double-quoted)-state><span class=secno>8.2.4.32 </span><dfn>DOCTYPE system identifier (double-quoted) state</dfn></h5>
+ </dl>
+
+ <h5 id=doctype-system-identifier-(double-quoted)-state><span class=secno>8.2.4.32 </span><dfn>DOCTYPE system identifier (double-quoted) state</dfn></h5>
+
<p>Consume the <a href=#next-input-character>next input character</a>:</p>
- <dl class=switch><dt>U+0022 QUOTATION MARK (")</dt>
+ <dl class=switch>
+
+ <dt>U+0022 QUOTATION MARK (")</dt>
<dd>Switch to the <a href=#after-doctype-system-identifier-state>after DOCTYPE system identifier state</a>.</dd>
<dt>U+003E GREATER-THAN SIGN (>)</dt>
@@ -49997,11 +53406,16 @@
token's system identifier. Stay in the <a href=#doctype-system-identifier-(double-quoted)-state>DOCTYPE system
identifier (double-quoted) state</a>.</dd>
- </dl><h5 id=doctype-system-identifier-(single-quoted)-state><span class=secno>8.2.4.33 </span><dfn>DOCTYPE system identifier (single-quoted) state</dfn></h5>
+ </dl>
+
+ <h5 id=doctype-system-identifier-(single-quoted)-state><span class=secno>8.2.4.33 </span><dfn>DOCTYPE system identifier (single-quoted) state</dfn></h5>
+
<p>Consume the <a href=#next-input-character>next input character</a>:</p>
- <dl class=switch><dt>U+0027 APOSTROPHE (')</dt>
+ <dl class=switch>
+
+ <dt>U+0027 APOSTROPHE (')</dt>
<dd>Switch to the <a href=#after-doctype-system-identifier-state>after DOCTYPE system identifier state</a>.</dd>
<dt>U+003E GREATER-THAN SIGN (>)</dt>
@@ -50019,11 +53433,16 @@
token's system identifier. Stay in the <a href=#doctype-system-identifier-(single-quoted)-state>DOCTYPE system
identifier (single-quoted) state</a>.</dd>
- </dl><h5 id=after-doctype-system-identifier-state><span class=secno>8.2.4.34 </span><dfn>After DOCTYPE system identifier state</dfn></h5>
+ </dl>
+
+ <h5 id=after-doctype-system-identifier-state><span class=secno>8.2.4.34 </span><dfn>After DOCTYPE system identifier state</dfn></h5>
+
<p>Consume the <a href=#next-input-character>next input character</a>:</p>
- <dl class=switch><dt>U+0009 CHARACTER TABULATION</dt>
+ <dl class=switch>
+
+ <dt>U+0009 CHARACTER TABULATION</dt>
<dt>U+000A LINE FEED (LF)</dt>
<dt>U+000C FORM FEED (FF)</dt>
<!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
@@ -50044,11 +53463,16 @@
state</a>. (This does <em>not</em> set the DOCTYPE token's
<i>force-quirks flag</i> to <i>on</i>.)</dd>
- </dl><h5 id=bogus-doctype-state><span class=secno>8.2.4.35 </span><dfn>Bogus DOCTYPE state</dfn></h5>
+ </dl>
+
+ <h5 id=bogus-doctype-state><span class=secno>8.2.4.35 </span><dfn>Bogus DOCTYPE state</dfn></h5>
+
<p>Consume the <a href=#next-input-character>next input character</a>:</p>
- <dl class=switch><dt>U+003E GREATER-THAN SIGN (>)</dt>
+ <dl class=switch>
+
+ <dt>U+003E GREATER-THAN SIGN (>)</dt>
<dd>Emit the DOCTYPE token. Switch to the <a href=#data-state>data
state</a>.</dd>
@@ -50059,8 +53483,11 @@
<dt>Anything else</dt>
<dd>Stay in the <a href=#bogus-doctype-state>bogus DOCTYPE state</a>.</dd>
- </dl><h5 id=cdata-section-state><span class=secno>8.2.4.36 </span><dfn>CDATA section state</dfn></h5>
+ </dl>
+
+ <h5 id=cdata-section-state><span class=secno>8.2.4.36 </span><dfn>CDATA section state</dfn></h5>
+
<p><em>(This can only happen if the <a href=#content-model-flag>content model
flag</a> is set to the PCDATA state, and is unrelated to the
<a href=#content-model-flag>content model flag</a>'s CDATA state.)</em></p>
@@ -50091,7 +53518,9 @@
<p>The behavior depends on the identity of the next character (the
one immediately after the U+0026 AMPERSAND character):</p>
- <dl class=switch><dt>U+0009 CHARACTER TABULATION</dt>
+ <dl class=switch>
+
+ <dt>U+0009 CHARACTER TABULATION</dt>
<dt>U+000A LINE FEED (LF)</dt>
<dt>U+000C FORM FEED (FF)</dt>
<!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
@@ -50114,7 +53543,9 @@
<p>The behavior further depends on the character after the U+0023
NUMBER SIGN:</p>
- <dl class=switch><dt>U+0078 LATIN SMALL LETTER X</dt>
+ <dl class=switch>
+
+ <dt>U+0078 LATIN SMALL LETTER X</dt>
<dt>U+0058 LATIN CAPITAL LETTER X</dt>
<dd>
@@ -50146,7 +53577,9 @@
</dd>
- </dl><p>Consume as many characters as match the range of characters
+ </dl>
+
+ <p>Consume as many characters as match the range of characters
given above.</p>
<p>If no characters match the range, then don't consume any
@@ -50168,42 +53601,48 @@
token for the Unicode character given in the second column of that
row.</p>
- <table><thead><tr><th>Number <th colspan=2>Unicode character
- <tbody><tr><td>0x0D <td>U+000A <td>LINE FEED (LF)
- <tr><td>0x80 <td>U+20AC <td>EURO SIGN ('€')
+ <table>
+ <thead>
+ <tr><th>Number <th colspan=2>Unicode character
+ <tbody>
+ <tr><td>0x0D <td>U+000A <td>LINE FEED (LF)
+ <tr><td>0x80 <td>U+20AC <td>EURO SIGN ('€')
<tr><td>0x81 <td>U+FFFD <td>REPLACEMENT CHARACTER
- <tr><td>0x82 <td>U+201A <td>SINGLE LOW-9 QUOTATION MARK ('‚')
- <tr><td>0x83 <td>U+0192 <td>LATIN SMALL LETTER F WITH HOOK ('ƒ')
- <tr><td>0x84 <td>U+201E <td>DOUBLE LOW-9 QUOTATION MARK ('„')
- <tr><td>0x85 <td>U+2026 <td>HORIZONTAL ELLIPSIS ('…')
- <tr><td>0x86 <td>U+2020 <td>DAGGER ('†')
- <tr><td>0x87 <td>U+2021 <td>DOUBLE DAGGER ('‡')
- <tr><td>0x88 <td>U+02C6 <td>MODIFIER LETTER CIRCUMFLEX ACCENT ('ˆ')
- <tr><td>0x89 <td>U+2030 <td>PER MILLE SIGN ('‰')
- <tr><td>0x8A <td>U+0160 <td>LATIN CAPITAL LETTER S WITH CARON ('Š')
- <tr><td>0x8B <td>U+2039 <td>SINGLE LEFT-POINTING ANGLE QUOTATION MARK ('‹')
- <tr><td>0x8C <td>U+0152 <td>LATIN CAPITAL LIGATURE OE ('Œ')
+ <tr><td>0x82 <td>U+201A <td>SINGLE LOW-9 QUOTATION MARK ('‚')
+ <tr><td>0x83 <td>U+0192 <td>LATIN SMALL LETTER F WITH HOOK ('ƒ')
+ <tr><td>0x84 <td>U+201E <td>DOUBLE LOW-9 QUOTATION MARK ('„')
+ <tr><td>0x85 <td>U+2026 <td>HORIZONTAL ELLIPSIS ('…')
+ <tr><td>0x86 <td>U+2020 <td>DAGGER ('†')
+ <tr><td>0x87 <td>U+2021 <td>DOUBLE DAGGER ('‡')
+ <tr><td>0x88 <td>U+02C6 <td>MODIFIER LETTER CIRCUMFLEX ACCENT ('ˆ')
+ <tr><td>0x89 <td>U+2030 <td>PER MILLE SIGN ('‰')
+ <tr><td>0x8A <td>U+0160 <td>LATIN CAPITAL LETTER S WITH CARON ('Š')
+ <tr><td>0x8B <td>U+2039 <td>SINGLE LEFT-POINTING ANGLE QUOTATION MARK ('‹')
+ <tr><td>0x8C <td>U+0152 <td>LATIN CAPITAL LIGATURE OE ('Œ')
<tr><td>0x8D <td>U+FFFD <td>REPLACEMENT CHARACTER
- <tr><td>0x8E <td>U+017D <td>LATIN CAPITAL LETTER Z WITH CARON ('Ž')
+ <tr><td>0x8E <td>U+017D <td>LATIN CAPITAL LETTER Z WITH CARON ('Ž')
<tr><td>0x8F <td>U+FFFD <td>REPLACEMENT CHARACTER
<tr><td>0x90 <td>U+FFFD <td>REPLACEMENT CHARACTER
- <tr><td>0x91 <td>U+2018 <td>LEFT SINGLE QUOTATION MARK ('‘')
- <tr><td>0x92 <td>U+2019 <td>RIGHT SINGLE QUOTATION MARK ('’')
- <tr><td>0x93 <td>U+201C <td>LEFT DOUBLE QUOTATION MARK ('“')
- <tr><td>0x94 <td>U+201D <td>RIGHT DOUBLE QUOTATION MARK ('”')
- <tr><td>0x95 <td>U+2022 <td>BULLET ('•')
- <tr><td>0x96 <td>U+2013 <td>EN DASH ('–')
- <tr><td>0x97 <td>U+2014 <td>EM DASH ('—')
- <tr><td>0x98 <td>U+02DC <td>SMALL TILDE ('˜')
- <tr><td>0x99 <td>U+2122 <td>TRADE MARK SIGN ('™')
- <tr><td>0x9A <td>U+0161 <td>LATIN SMALL LETTER S WITH CARON ('š')
- <tr><td>0x9B <td>U+203A <td>SINGLE RIGHT-POINTING ANGLE QUOTATION MARK ('›')
- <tr><td>0x9C <td>U+0153 <td>LATIN SMALL LIGATURE OE ('œ')
+ <tr><td>0x91 <td>U+2018 <td>LEFT SINGLE QUOTATION MARK ('‘')
+ <tr><td>0x92 <td>U+2019 <td>RIGHT SINGLE QUOTATION MARK ('’')
+ <tr><td>0x93 <td>U+201C <td>LEFT DOUBLE QUOTATION MARK ('“')
+ <tr><td>0x94 <td>U+201D <td>RIGHT DOUBLE QUOTATION MARK ('”')
+ <tr><td>0x95 <td>U+2022 <td>BULLET ('•')
+ <tr><td>0x96 <td>U+2013 <td>EN DASH ('–')
+ <tr><td>0x97 <td>U+2014 <td>EM DASH ('—')
+ <tr><td>0x98 <td>U+02DC <td>SMALL TILDE ('˜')
+ <tr><td>0x99 <td>U+2122 <td>TRADE MARK SIGN ('™')
+ <tr><td>0x9A <td>U+0161 <td>LATIN SMALL LETTER S WITH CARON ('š')
+ <tr><td>0x9B <td>U+203A <td>SINGLE RIGHT-POINTING ANGLE QUOTATION MARK ('›')
+ <tr><td>0x9C <td>U+0153 <td>LATIN SMALL LIGATURE OE ('œ')
<tr><td>0x9D <td>U+FFFD <td>REPLACEMENT CHARACTER
- <tr><td>0x9E <td>U+017E <td>LATIN SMALL LETTER Z WITH CARON ('ž')
- <tr><td>0x9F <td>U+0178 <td>LATIN CAPITAL LETTER Y WITH DIAERESIS ('Ÿ')
- </table><!-- this is the same as the equivalent list in the input stream
- section, except it has 0x0000 included in the first range. --><p>Otherwise, if the number is in the range 0x0000 to 0x0008, <!--
+ <tr><td>0x9E <td>U+017E <td>LATIN SMALL LETTER Z WITH CARON ('ž')
+ <tr><td>0x9F <td>U+0178 <td>LATIN CAPITAL LETTER Y WITH DIAERESIS ('Ÿ')
+ </table>
+
+ <!-- this is the same as the equivalent list in the input stream
+ section, except it has 0x0000 included in the first range. -->
+ <p>Otherwise, if the number is in the range 0x0000 to 0x0008, <!--
HT, LF allowed --> <!-- U+000B is in the next list --> <!-- FF, CR
allowed --> 0x000E to 0x001F, <!-- ASCII allowed --> 0x007F <!--to
0x0084, (0x0085 NEL not allowed), 0x0086--> to 0x009F, 0xD800 to
@@ -50257,17 +53696,21 @@
<p>If the markup contains <code title="">I'm ¬it; I tell
you</code>, the character reference is parsed as "not", as in,
- <code title="">I'm ¬it; I tell you</code>. But if the markup
+ <code title="">I'm ¬it; I tell you</code>. But if the markup
was <code title="">I'm ∉ I tell you</code>, the
character reference would be parsed as "notin;", resulting in
- <code title="">I'm ∉ I tell you</code>.</p>
+ <code title="">I'm ∉ I tell you</code>.</p>
</div>
</dd>
- </dl><h4 id=tree-construction><span class=secno>8.2.5 </span><dfn>Tree construction</dfn></h4>
+ </dl>
+
+
+ <h4 id=tree-construction><span class=secno>8.2.5 </span><dfn>Tree construction</dfn></h4>
+
<p>The input to the tree construction stage is a sequence of tokens
from the <a href=#tokenization>tokenization</a> stage. The tree construction
stage is associated with a DOM <code>Document</code> object when a
@@ -50336,7 +53779,9 @@
<a href=#concept-fe-value title=concept-fe-value>value</a> and <a href=#concept-fe-checked title=concept-fe-checked>checkedness</a> based on the element's
attributes.)</p>
- <hr><p>When the steps below require the UA to <dfn id=insert-an-html-element>insert an HTML
+ <hr>
+
+ <p>When the steps below require the UA to <dfn id=insert-an-html-element>insert an HTML
element</dfn> for a token, the UA must first <a href=#create-an-element-for-the-token>create an element
for the token</a> in the <a href=#html-namespace-0>HTML namespace</a>, and then
append this node to the <a href=#current-node>current node</a>, and push it onto
@@ -50359,7 +53804,9 @@
<a href=#form-element-pointer><code title="">form</code> element pointer</a> before
inserting it wherever it is to be inserted.</p>
- <hr><p>When the steps below require the UA to <dfn id=insert-a-foreign-element>insert a foreign
+ <hr>
+
+ <p>When the steps below require the UA to <dfn id=insert-a-foreign-element>insert a foreign
element</dfn> for a token, the UA must first <a href=#create-an-element-for-the-token>create an element
for the token</a> in the given namespace, and then append this
node to the <a href=#current-node>current node</a>, and push it onto the
@@ -50463,26 +53910,35 @@
column. (This fixes the use of namespaced attributes, in particular
<code title="">xml:lang</code>.)</p>
- <table><thead><tr><th> Attribute name <th> Prefix <th> Local name <th> Namespace
- <tbody><tr><td> <code title="">xlink:actuate</code> <td> <code title="">xlink</code> <td> <code title="">actuate</code> <td> <a href=#xlink-namespace>XLink namespace</a>
- <tr><td> <code title="">xlink:arcrole</code> <td> <code title="">xlink</code> <td> <code title="">arcrole</code> <td> <a href=#xlink-namespace>XLink namespace</a>
- <tr><td> <code title="">xlink:href</code> <td> <code title="">xlink</code> <td> <code title="">href</code> <td> <a href=#xlink-namespace>XLink namespace</a>
- <tr><td> <code title="">xlink:role</code> <td> <code title="">xlink</code> <td> <code title="">role</code> <td> <a href=#xlink-namespace>XLink namespace</a>
- <tr><td> <code title="">xlink:show</code> <td> <code title="">xlink</code> <td> <code title="">show</code> <td> <a href=#xlink-namespace>XLink namespace</a>
- <tr><td> <code title="">xlink:title</code> <td> <code title="">xlink</code> <td> <code title="">title</code> <td> <a href=#xlink-namespace>XLink namespace</a>
- <tr><td> <code title="">xlink:type</code> <td> <code title="">xlink</code> <td> <code title="">type</code> <td> <a href=#xlink-namespace>XLink namespace</a>
- <tr><td> <code title="">xml:base</code> <td> <code title="">xml</code> <td> <code title="">base</code> <td> <a href=#xml-namespace>XML namespace</a> <!-- attr-xml-base -->
- <tr><td> <code title="">xml:lang</code> <td> <code title="">xml</code> <td> <code title="">lang</code> <td> <a href=#xml-namespace>XML namespace</a>
- <tr><td> <code title="">xml:space</code> <td> <code title="">xml</code> <td> <code title="">space</code> <td> <a href=#xml-namespace>XML namespace</a>
- <tr><td> <code title="">xmlns</code> <td> (none) <td> <code title="">xmlns</code> <td> <a href=#xmlns-namespace>XMLNS namespace</a>
- <tr><td> <code title="">xmlns:xlink</code> <td> <code title="">xmlns</code> <td> <code title="">xlink</code> <td> <a href=#xmlns-namespace>XMLNS namespace</a>
- </table><hr><p>The <dfn id=generic-cdata-element-parsing-algorithm>generic CDATA element parsing algorithm</dfn> and the
+ <table>
+ <thead>
+ <tr> <th> Attribute name <th> Prefix <th> Local name <th> Namespace
+ <tbody>
+ <tr> <td> <code title="">xlink:actuate</code> <td> <code title="">xlink</code> <td> <code title="">actuate</code> <td> <a href=#xlink-namespace>XLink namespace</a>
+ <tr> <td> <code title="">xlink:arcrole</code> <td> <code title="">xlink</code> <td> <code title="">arcrole</code> <td> <a href=#xlink-namespace>XLink namespace</a>
+ <tr> <td> <code title="">xlink:href</code> <td> <code title="">xlink</code> <td> <code title="">href</code> <td> <a href=#xlink-namespace>XLink namespace</a>
+ <tr> <td> <code title="">xlink:role</code> <td> <code title="">xlink</code> <td> <code title="">role</code> <td> <a href=#xlink-namespace>XLink namespace</a>
+ <tr> <td> <code title="">xlink:show</code> <td> <code title="">xlink</code> <td> <code title="">show</code> <td> <a href=#xlink-namespace>XLink namespace</a>
+ <tr> <td> <code title="">xlink:title</code> <td> <code title="">xlink</code> <td> <code title="">title</code> <td> <a href=#xlink-namespace>XLink namespace</a>
+ <tr> <td> <code title="">xlink:type</code> <td> <code title="">xlink</code> <td> <code title="">type</code> <td> <a href=#xlink-namespace>XLink namespace</a>
+ <tr> <td> <code title="">xml:base</code> <td> <code title="">xml</code> <td> <code title="">base</code> <td> <a href=#xml-namespace>XML namespace</a> <!-- attr-xml-base -->
+ <tr> <td> <code title="">xml:lang</code> <td> <code title="">xml</code> <td> <code title="">lang</code> <td> <a href=#xml-namespace>XML namespace</a>
+ <tr> <td> <code title="">xml:space</code> <td> <code title="">xml</code> <td> <code title="">space</code> <td> <a href=#xml-namespace>XML namespace</a>
+ <tr> <td> <code title="">xmlns</code> <td> (none) <td> <code title="">xmlns</code> <td> <a href=#xmlns-namespace>XMLNS namespace</a>
+ <tr> <td> <code title="">xmlns:xlink</code> <td> <code title="">xmlns</code> <td> <code title="">xlink</code> <td> <a href=#xmlns-namespace>XMLNS namespace</a>
+ </table>
+
+ <hr>
+
+ <p>The <dfn id=generic-cdata-element-parsing-algorithm>generic CDATA element parsing algorithm</dfn> and the
<dfn id=generic-rcdata-element-parsing-algorithm>generic RCDATA element parsing algorithm</dfn> consist of the
following steps. These algorithms are always invoked in response to
a start tag token.</p>
- <ol><li><p><a href=#insert-an-html-element>Insert an HTML element</a> for the token.</li>
+ <ol>
+ <li><p><a href=#insert-an-html-element>Insert an HTML element</a> for the token.</li>
+
<li><p>If the algorithm that was invoked is the <a href=#generic-cdata-element-parsing-algorithm>generic CDATA
element parsing algorithm</a>, switch the tokeniser's
<a href=#content-model-flag>content model flag</a> to the CDATA state; otherwise the
@@ -50496,8 +53952,12 @@
<li><p>Then, switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-incdata title="insertion mode: in CDATA/RCDATA">in
CDATA/RCDATA</a>".</li>
- </ol><h5 id=closing-elements-that-have-implied-end-tags><span class=secno>8.2.5.2 </span>Closing elements that have implied end tags</h5>
+ </ol>
+
+
+ <h5 id=closing-elements-that-have-implied-end-tags><span class=secno>8.2.5.2 </span>Closing elements that have implied end tags</h5>
+
<p>When the steps below require the UA to <dfn id=generate-implied-end-tags>generate implied end
tags</dfn>, then, while the <a href=#current-node>current node</a> is a
<code><a href=#the-dd-element>dd</a></code> element, a <code><a href=#the-dt-element>dt</a></code> element, an
@@ -50549,7 +54009,9 @@
<p>When the <a href=#insertion-mode>insertion mode</a> is "<a href=#the-initial-insertion-mode title="insertion
mode: initial">initial</a>", tokens must be handled as follows:</p>
- <dl class=switch><dt>A character token that is one of U+0009 CHARACTER
+ <dl class=switch>
+
+ <dt>A character token that is one of U+0009 CHARACTER
TABULATION, U+000A LINE FEED (LF), U+000C FORM FEED (FF),
<!--U+000D CARRIAGE RETURN (CR),--> or U+0020 SPACE</dt>
<dd>
@@ -50597,7 +54059,8 @@
token matches one of the conditions in the following list, then
set the document to <a href=#quirks-mode>quirks mode</a>:</p>
- <ul class=brief><li> The <i>force-quirks flag</i> is set to <i>on</i>. </li>
+ <ul class=brief>
+ <li> The <i>force-quirks flag</i> is set to <i>on</i>. </li>
<li> The name is set to anything other than "<code title="">HTML</code>". </li>
<li> The public identifier starts with: "<code title="">+//Silmaril//dtd html Pro v0r11 19970101//<!--EN--></code>" </li>
<li> The public identifier starts with: "<code title="">-//AdvaSoft Ltd//DTD HTML 3.0 asWedit + extensions//<!--EN--></code>" </li>
@@ -50674,15 +54137,20 @@
<li> The system identifier is set to: "<code title="">http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd</code>" </li>
<li> The system identifier is missing and the public identifier starts with: "<code title="">-//W3C//DTD HTML 4.01 Frameset//<!--EN--></code>" </li>
<li> The system identifier is missing and the public identifier starts with: "<code title="">-//W3C//DTD HTML 4.01 Transitional//<!--EN--></code>" </li>
- </ul><p>Otherwise, if the DOCTYPE
+ </ul>
+
+ <p>Otherwise, if the DOCTYPE
token matches one of the conditions in the following list, then
set the document to <a href=#limited-quirks-mode>limited quirks mode</a>:</p>
- <ul class=brief><li> The public identifier starts with: "<code title="">-//W3C//DTD XHTML 1.0 Frameset//<!--EN--></code>" </li>
+ <ul class=brief>
+ <li> The public identifier starts with: "<code title="">-//W3C//DTD XHTML 1.0 Frameset//<!--EN--></code>" </li>
<li> The public identifier starts with: "<code title="">-//W3C//DTD XHTML 1.0 Transitional//<!--EN--></code>" </li>
<li> The system identifier is not missing and the public identifier starts with: "<code title="">-//W3C//DTD HTML 4.01 Frameset//<!--EN--></code>" </li>
<li> The system identifier is not missing and the public identifier starts with: "<code title="">-//W3C//DTD HTML 4.01 Transitional//<!--EN--></code>" </li>
- </ul><p>The name, system identifier, and public identifier strings must
+ </ul>
+
+ <p>The name, system identifier, and public identifier strings must
be compared to the values given in the lists above in an
<a href=#ascii-case-insensitive>ASCII case-insensitive</a> manner. A system identifier
whose value is the empty string is not considered missing for the
@@ -50704,12 +54172,17 @@
</dd>
- </dl><h5 id=the-before-html-insertion-mode><span class=secno>8.2.5.5 </span>The "<dfn title="insertion mode: before html">before html</dfn>" insertion mode</h5>
+ </dl>
+
+ <h5 id=the-before-html-insertion-mode><span class=secno>8.2.5.5 </span>The "<dfn title="insertion mode: before html">before html</dfn>" insertion mode</h5>
+
<p>When the <a href=#insertion-mode>insertion mode</a> is "<a href=#the-before-html-insertion-mode title="insertion
mode: before html">before html</a>", tokens must be handled as follows:</p>
- <dl class=switch><dt>A DOCTYPE token</dt>
+ <dl class=switch>
+
+ <dt>A DOCTYPE token</dt>
<dd>
<p><a href=#parse-error>Parse error</a>. Ignore the token.</p>
</dd>
@@ -50774,7 +54247,9 @@
</dd>
- </dl><p>The root element can end up being removed from the
+ </dl>
+
+ <p>The root element can end up being removed from the
<code>Document</code> object, e.g. by scripts; nothing in particular
happens in such cases, content continues being appended to the nodes
as described in the next section.</p>
@@ -50785,7 +54260,9 @@
<p>When the <a href=#insertion-mode>insertion mode</a> is "<a href=#the-before-head-insertion-mode title="insertion
mode: before head">before head</a>", tokens must be handled as follows:</p>
- <dl class=switch><dt>A character token that is one of U+0009 CHARACTER
+ <dl class=switch>
+
+ <dt>A character token that is one of U+0009 CHARACTER
TABULATION, U+000A LINE FEED (LF), U+000C FORM FEED (FF),
<!--U+000D CARRIAGE RETURN (CR),--> or U+0020 SPACE</dt>
<dd>
@@ -50851,12 +54328,17 @@
</dd>
- </dl><h5 id=parsing-main-inhead><span class=secno>8.2.5.7 </span>The "<dfn title="insertion mode: in head">in head</dfn>" insertion mode</h5>
+ </dl>
+
+ <h5 id=parsing-main-inhead><span class=secno>8.2.5.7 </span>The "<dfn title="insertion mode: in head">in head</dfn>" insertion mode</h5>
+
<p>When the <a href=#insertion-mode>insertion mode</a> is "<a href=#parsing-main-inhead title="insertion
mode: in head">in head</a>", tokens must be handled as follows:</p>
- <dl class=switch><dt>A character token that is one of U+0009 CHARACTER
+ <dl class=switch>
+
+ <dt>A character token that is one of U+0009 CHARACTER
TABULATION, U+000A LINE FEED (LF), U+000C FORM FEED (FF),
<!--U+000D CARRIAGE RETURN (CR),--> or U+0020 SPACE</dt>
<dd>
@@ -50944,7 +54426,9 @@
<dt id=scriptTag>A start tag whose tag name is "script"</dt>
<dd>
- <ol><li><p><a href=#create-an-element-for-the-token>Create an element for the token</a> in the
+ <ol>
+
+ <li><p><a href=#create-an-element-for-the-token>Create an element for the token</a> in the
<a href=#html-namespace-0>HTML namespace</a>.</li>
<li>
@@ -50978,8 +54462,10 @@
<li><p>Switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-incdata title="insertion mode: in CDATA/RCDATA">in
CDATA/RCDATA</a>".</li>
- </ol></dd>
+ </ol>
+ </dd>
+
<dt>An end tag whose tag name is "head"</dt>
<dd>
@@ -51017,12 +54503,17 @@
</dd>
- </dl><h5 id=parsing-main-inheadnoscript><span class=secno>8.2.5.8 </span>The "<dfn title="insertion mode: in head noscript">in head noscript</dfn>" insertion mode</h5>
+ </dl>
+
+ <h5 id=parsing-main-inheadnoscript><span class=secno>8.2.5.8 </span>The "<dfn title="insertion mode: in head noscript">in head noscript</dfn>" insertion mode</h5>
+
<p>When the <a href=#insertion-mode>insertion mode</a> is "<a href=#parsing-main-inheadnoscript title="insertion
mode: in head noscript">in head noscript</a>", tokens must be handled as follows:</p>
- <dl class=switch><dt>A DOCTYPE token</dt>
+ <dl class=switch>
+
+ <dt>A DOCTYPE token</dt>
<dd>
<p><a href=#parse-error>Parse error</a>. Ignore the token.</p>
</dd>
@@ -51077,12 +54568,17 @@
</dd>
- </dl><h5 id=the-after-head-insertion-mode><span class=secno>8.2.5.9 </span>The "<dfn title="insertion mode: after head">after head</dfn>" insertion mode</h5>
+ </dl>
+
+ <h5 id=the-after-head-insertion-mode><span class=secno>8.2.5.9 </span>The "<dfn title="insertion mode: after head">after head</dfn>" insertion mode</h5>
+
<p>When the <a href=#insertion-mode>insertion mode</a> is "<a href=#the-after-head-insertion-mode title="insertion
mode: after head">after head</a>", tokens must be handled as follows:</p>
- <dl class=switch><dt>A character token that is one of U+0009 CHARACTER
+ <dl class=switch>
+
+ <dt>A character token that is one of U+0009 CHARACTER
TABULATION, U+000A LINE FEED (LF), U+000C FORM FEED (FF),
<!--U+000D CARRIAGE RETURN (CR),--> or U+0020 SPACE</dt>
<dd>
@@ -51161,12 +54657,17 @@
token.</p>
</dd>
- </dl><h5 id=parsing-main-inbody><span class=secno>8.2.5.10 </span>The "<dfn title="insertion mode: in body">in body</dfn>" insertion mode</h5>
+ </dl>
+
+ <h5 id=parsing-main-inbody><span class=secno>8.2.5.10 </span>The "<dfn title="insertion mode: in body">in body</dfn>" insertion mode</h5>
+
<p>When the <a href=#insertion-mode>insertion mode</a> is "<a href=#parsing-main-inbody title="insertion
mode: in body">in body</a>", tokens must be handled as follows:</p>
- <dl class=switch><dt>A character token</dt>
+ <dl class=switch>
+
+ <dt>A character token</dt>
<dd>
<p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if
@@ -51243,7 +54744,9 @@
<p>Otherwise, run the following steps:</p>
- <ol><li><p>Remove the second element on the <a href=#stack-of-open-elements>stack of open
+ <ol>
+
+ <li><p>Remove the second element on the <a href=#stack-of-open-elements>stack of open
elements</a> from its parent node, if it has one.</li>
<li><p>Pop all the nodes from the bottom of the <a href=#stack-of-open-elements>stack of
@@ -51255,8 +54758,10 @@
<li><p>Switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-inframeset title="insertion mode: in frameset">in frameset</a>".</p>
- </ol></dd>
+ </ol>
+ </dd>
+
<dt>An end-of-file token</dt>
<dd>
@@ -51402,8 +54907,10 @@
<p>Run the following algorithm:</p>
- <ol><li><p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</li>
+ <ol>
+ <li><p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</li>
+
<li><p>Initialize <var title="">node</var> to be the <a href=#current-node>current
node</a> (the bottommost node of the stack).</li>
@@ -51442,16 +54949,20 @@
</li>
- </ol></dd>
+ </ol>
+ </dd>
+
<!-- as normal, but imply </dt> or </dd> when there's another <dt> or <dd> open in weird cases -->
<dt>A start tag whose tag name is one of: "dd", "dt"</dt>
<dd>
<p>Run the following algorithm:</p>
- <ol><li><p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</li>
+ <ol>
+ <li><p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</li>
+
<li><p>Initialize <var title="">node</var> to be the <a href=#current-node>current
node</a> (the bottommost node of the stack).</li>
@@ -51491,8 +55002,10 @@
</li>
- </ol></dd>
+ </ol>
+ </dd>
+
<!-- same as normal, but effectively ends parsing -->
<dt>A start tag whose tag name is "plaintext"</dt>
<dd>
@@ -51530,8 +55043,10 @@
<p>Otherwise, run these steps:</p>
- <ol><li><p><a href=#generate-implied-end-tags>Generate implied end tags</a>.</li>
+ <ol>
+ <li><p><a href=#generate-implied-end-tags>Generate implied end tags</a>.</li>
+
<li><p>If the <a href=#current-node>current node</a> is not an element with
the same tag name as that of the token, then this is a
<a href=#parse-error>parse error</a>.</li>
@@ -51540,8 +55055,10 @@
until an element with the same tag name as the token has been
popped from the stack.</li>
- </ol></dd>
+ </ol>
+ </dd>
+
<!-- removes the form element pointer instead of the matching node -->
<dt>An end tag whose tag name is "form"</dt>
<dd>
@@ -51560,16 +55077,20 @@
<p>Otherwise, run these steps:</p>
- <ol><li><p><a href=#generate-implied-end-tags>Generate implied end tags</a>.</li>
+ <ol>
+ <li><p><a href=#generate-implied-end-tags>Generate implied end tags</a>.</li>
+
<li><p>If the <a href=#current-node>current node</a> is not <var title="">node</var>, then this is a <a href=#parse-error>parse
error</a>.</li>
<li><p>Remove <var title="">node</var> from the <a href=#stack-of-open-elements>stack of
open elements</a>.</li>
- </ol></dd>
+ </ol>
+ </dd>
+
<!-- as normal, except </p> implies <p> if there's no <p> in scope, and needs care as the elements have optional tags -->
<dt>An end tag whose tag name is "p"</dt>
<dd>
@@ -51581,7 +55102,9 @@
<p>Otherwise, run these steps:</p>
- <ol><li><p><a href=#generate-implied-end-tags>Generate implied end tags</a>, except
+ <ol>
+
+ <li><p><a href=#generate-implied-end-tags>Generate implied end tags</a>, except
for elements with the same tag name as the token.</li>
<li><p>If the <a href=#current-node>current node</a> is not an element with
@@ -51592,8 +55115,10 @@
until an element with the same tag name as the token has been
popped from the stack.</li>
- </ol></dd>
+ </ol>
+ </dd>
+
<!-- as normal, but needs care as the elements have optional tags -->
<dt>An end tag whose tag name is one of: "dd", "dt", "li"</dt>
<dd>
@@ -51604,7 +55129,9 @@
<p>Otherwise, run these steps:</p>
- <ol><li><p><a href=#generate-implied-end-tags>Generate implied end tags</a>, except
+ <ol>
+
+ <li><p><a href=#generate-implied-end-tags>Generate implied end tags</a>, except
for elements with the same tag name as the token.</li>
<li><p>If the <a href=#current-node>current node</a> is not an element with
@@ -51615,8 +55142,10 @@
until an element with the same tag name as the token has been
popped from the stack.</li>
- </ol></dd>
+ </ol>
+ </dd>
+
<!-- as normal, except acts as a closer for any of the h1-h6 elements -->
<dt>An end tag whose tag name is one of: "h1", "h2", "h3", "h4", "h5", "h6"</dt>
<dd>
@@ -51629,8 +55158,10 @@
<p>Otherwise, run these steps:</p>
- <ol><li><p><a href=#generate-implied-end-tags>Generate implied end tags</a>.</li>
+ <ol>
+ <li><p><a href=#generate-implied-end-tags>Generate implied end tags</a>.</li>
+
<li><p>If the <a href=#current-node>current node</a> is not an element with
the same tag name as that of the token, then this is a
<a href=#parse-error>parse error</a>.</li>
@@ -51639,8 +55170,10 @@
until an element whose tag name is one of "h1", "h2", "h3", "h4",
"h5", or "h6" has been popped from the stack.</li>
- </ol></dd>
+ </ol>
+ </dd>
+
<dt>An end tag whose tag name is "sarcasm"</dt>
<dd>
<p>Take a deep breath, then act as described in the "any other end
@@ -51668,7 +55201,7 @@
scope</a>).</p>
<p class=example>In the non-conforming stream
- <code><a href="a">a<table><a href="b">b</table>x</code>,
+ <code><a href="a">a<table><a href="b">b</table>x</code>,
the first <code><a href=#the-a-element>a</a></code> element would be closed upon seeing
the second one, and the "x" character would be inside a link
to "b", not to "a". This is despite the fact that the outer
@@ -51724,19 +55257,25 @@
<p>Follow these steps:</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>Let the <var title="">formatting element</var> be the
last element in the <a href=#list-of-active-formatting-elements>list of active formatting
elements</a> that:</p>
- <ul><li>is between the end of the list and the last scope
+ <ul>
+
+ <li>is between the end of the list and the last scope
marker in the list, if any, or the start of the list
otherwise, and</li>
<li>has the same tag name as the token.</li>
- </ul><p>If there is no such node, or, if that node is also in the
+ </ul>
+
+ <p>If there is no such node, or, if that node is also in the
<a href=#stack-of-open-elements>stack of open elements</a> but the element is not <a href=#has-an-element-in-scope title="has an element in scope">in scope</a>, then this is a
<a href=#parse-error>parse error</a>; ignore the token, and abort these
steps.</p>
@@ -51784,7 +55323,9 @@
<p>Let <var title="">node</var> and <var title="">last node</var> be the
<var title="">furthest block</var>. Follow these steps:</p>
- <ol><li>Let <var title="">node</var> be the element immediately
+ <ol>
+
+ <li>Let <var title="">node</var> be the element immediately
above <var title="">node</var> in the <a href=#stack-of-open-elements>stack of open
elements</a>.</li>
@@ -51814,8 +55355,10 @@
<li>Return to step 1 of this inner set of steps.</li>
- </ol></li>
+ </ol>
+ </li>
+
<li>
<p>If the <var title="">common ancestor</var> node is a
@@ -51856,7 +55399,9 @@
<li><p>Jump back to step 1 in this series of steps.</li>
- </ol><p class=note>The way these steps are defined, only elements
+ </ol>
+
+ <p class=note>The way these steps are defined, only elements
in the <a href=#formatting>formatting</a> category ever get cloned by
this algorithm.</p>
@@ -51923,8 +55468,10 @@
<p>Otherwise, run these steps:</p>
- <ol><li><p><a href=#generate-implied-end-tags>Generate implied end tags</a>.</li>
+ <ol>
+ <li><p><a href=#generate-implied-end-tags>Generate implied end tags</a>.</li>
+
<li><p>If the <a href=#current-node>current node</a> is not an element with
the same tag name as that of the token, then this is a
<a href=#parse-error>parse error</a>.</li>
@@ -51936,8 +55483,10 @@
<li><a href=#clear-the-list-of-active-formatting-elements-up-to-the-last-marker>Clear the list of active formatting elements up to the
last marker</a>.</li>
- </ol></dd>
+ </ol>
+ </dd>
+
<dt>A start tag whose tag name is "table"</dt>
<dd>
@@ -52090,7 +55639,9 @@
<dt>A start tag whose tag name is "textarea"</dt>
<dd>
- <ol><li><p><a href=#insert-an-html-element>Insert an HTML element</a> for the
+ <ol>
+
+ <li><p><a href=#insert-an-html-element>Insert an HTML element</a> for the
token.</li>
<li><p>If the next token is a U+000A LINE FEED (LF) character
@@ -52110,8 +55661,10 @@
<li><p>Switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-incdata title="insertion mode: in CDATA/RCDATA">in
CDATA/RCDATA</a>".</li>
- </ol></dd>
+ </ol>
+ </dd>
+
<dt>A start tag whose tag name is "xmp"</dt>
<dd>
@@ -52312,14 +55865,18 @@
<p>Run the following steps:</p>
- <ol><li><p>Initialize <var title="">node</var> to be the <a href=#current-node>current
+ <ol>
+
+ <li><p>Initialize <var title="">node</var> to be the <a href=#current-node>current
node</a> (the bottommost node of the stack).</li>
<li><p>If <var title="">node</var> has the same tag name as
the end tag token, then:</p>
- <ol><li><p><a href=#generate-implied-end-tags>Generate implied end tags</a>.</li>
+ <ol>
+ <li><p><a href=#generate-implied-end-tags>Generate implied end tags</a>.</li>
+
<li><p>If the tag name of the end tag token does not match
the tag name of the <a href=#current-node>current node</a>, this is a
<a href=#parse-error>parse error</a>.</li>
@@ -52327,8 +55884,10 @@
<li><p>Pop all the nodes from the <a href=#current-node>current node</a> up
to <var title="">node</var>, including <var title="">node</var>, then stop these steps.</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>Otherwise, if <var title="">node</var> is in neither the
<a href=#formatting>formatting</a> category nor the <a href=#phrasing>phrasing</a>
category, then this is a <a href=#parse-error>parse error</a>; ignore the
@@ -52339,15 +55898,23 @@
<li><p>Return to step 2.</li>
- </ol></dd>
+ </ol>
- </dl><h5 id=parsing-main-incdata><span class=secno>8.2.5.11 </span>The "<dfn title="insertion mode: in CDATA/RCDATA">in CDATA/RCDATA</dfn>" insertion mode</h5>
+ </dd>
+ </dl>
+
+
+
+ <h5 id=parsing-main-incdata><span class=secno>8.2.5.11 </span>The "<dfn title="insertion mode: in CDATA/RCDATA">in CDATA/RCDATA</dfn>" insertion mode</h5>
+
<p>When the <a href=#insertion-mode>insertion mode</a> is "<a href=#parsing-main-incdata title="insertion
mode: in CDATA/RCDATA">in CDATA/RCDATA</a>", tokens must be
handled as follows:</p>
- <dl class=switch><dt>A character token</dt>
+ <dl class=switch>
+
+ <dt>A character token</dt>
<dd>
<p><a href=#insert-a-character title="insert a character">Insert the token's
@@ -52411,7 +55978,9 @@
<p id=scriptTagParserResumes>At this stage, if there is a
<a href=#pending-external-script>pending external script</a>, then:</p>
- <dl class=switch><dt>If the tree construction stage is <a href=#nestedParsing>being called reentrantly</a>, say from a
+ <dl class=switch>
+
+ <dt>If the tree construction stage is <a href=#nestedParsing>being called reentrantly</a>, say from a
call to <code title=dom-document-write><a href=#dom-document-write>document.write()</a></code>:</dt>
<dd><p>Set the <a href=#parser-pause-flag>parser pause flag</a> to true, and abort
@@ -52427,7 +55996,9 @@
<p>Follow these steps:</p>
- <ol><li><p>Let <var title="">the script</var> be the <a href=#pending-external-script>pending
+ <ol>
+
+ <li><p>Let <var title="">the script</var> be the <a href=#pending-external-script>pending
external script</a>. There is no longer a <a href=#pending-external-script>pending
external script</a>.</li>
@@ -52446,10 +56017,14 @@
<li><p>If there is once again a <a href=#pending-external-script>pending external
script</a>, then repeat these steps from step 1.</li>
- </ol></dd>
+ </ol>
- </dl></dd>
+ </dd>
+ </dl>
+
+ </dd>
+
<dt>Any other end tag</dt>
<dd>
@@ -52461,12 +56036,17 @@
</dd>
- </dl><h5 id=parsing-main-intable><span class=secno>8.2.5.12 </span>The "<dfn title="insertion mode: in table">in table</dfn>" insertion mode</h5>
+ </dl>
+
+ <h5 id=parsing-main-intable><span class=secno>8.2.5.12 </span>The "<dfn title="insertion mode: in table">in table</dfn>" insertion mode</h5>
+
<p>When the <a href=#insertion-mode>insertion mode</a> is "<a href=#parsing-main-intable title="insertion
mode: in table">in table</a>", tokens must be handled as follows:</p>
- <dl class=switch><dt>A character token that is one of U+0009 CHARACTER
+ <dl class=switch>
+
+ <dt>A character token that is one of U+0009 CHARACTER
TABULATION, U+000A LINE FEED (LF), U+000C FORM FEED (FF),
<!--U+000D CARRIAGE RETURN (CR),--> or U+0020 SPACE</dt>
<dd>
@@ -52636,7 +56216,9 @@
</dd>
- </dl><p>When the steps above require the UA to <dfn id=clear-the-stack-back-to-a-table-context>clear the stack
+ </dl>
+
+ <p>When the steps above require the UA to <dfn id=clear-the-stack-back-to-a-table-context>clear the stack
back to a table context</dfn>, it means that the UA must, while
the <a href=#current-node>current node</a> is not a <code><a href=#the-table-element>table</a></code>
element or an <code><a href=#the-html-element>html</a></code> element, pop elements from the
@@ -52652,7 +56234,9 @@
<p>When the <a href=#insertion-mode>insertion mode</a> is "<a href=#parsing-main-incaption title="insertion
mode: in caption">in caption</a>", tokens must be handled as follows:</p>
- <dl class=switch><dt>An end tag whose tag name is "caption"</dt>
+ <dl class=switch>
+
+ <dt>An end tag whose tag name is "caption"</dt>
<dd>
<p>If the <a href=#stack-of-open-elements>stack of open elements</a> does not <a href=#has-an-element-in-table-scope title="has an element in table scope">have an element in table
@@ -52705,12 +56289,17 @@
mode</a>.</p>
</dd>
- </dl><h5 id=parsing-main-incolgroup><span class=secno>8.2.5.14 </span>The "<dfn title="insertion mode: in column group">in column group</dfn>" insertion mode</h5>
+ </dl>
+
+ <h5 id=parsing-main-incolgroup><span class=secno>8.2.5.14 </span>The "<dfn title="insertion mode: in column group">in column group</dfn>" insertion mode</h5>
+
<p>When the <a href=#insertion-mode>insertion mode</a> is "<a href=#parsing-main-incolgroup title="insertion
mode: in column group">in column group</a>", tokens must be handled as follows:</p>
- <dl class=switch><dt>A character token that is one of U+0009 CHARACTER
+ <dl class=switch>
+
+ <dt>A character token that is one of U+0009 CHARACTER
TABULATION, U+000A LINE FEED (LF), U+000C FORM FEED (FF),
<!--U+000D CARRIAGE RETURN (CR),--> or U+0020 SPACE</dt>
<dd>
@@ -52792,12 +56381,17 @@
</dd>
- </dl><h5 id=parsing-main-intbody><span class=secno>8.2.5.15 </span>The "<dfn title="insertion mode: in table body">in table body</dfn>" insertion mode</h5>
+ </dl>
+
+ <h5 id=parsing-main-intbody><span class=secno>8.2.5.15 </span>The "<dfn title="insertion mode: in table body">in table body</dfn>" insertion mode</h5>
+
<p>When the <a href=#insertion-mode>insertion mode</a> is "<a href=#parsing-main-intbody title="insertion
mode: in table body">in table body</a>", tokens must be handled as follows:</p>
- <dl class=switch><dt>A start tag whose tag name is "tr"</dt>
+ <dl class=switch>
+
+ <dt>A start tag whose tag name is "tr"</dt>
<dd>
<p><a href=#clear-the-stack-back-to-a-table-body-context>Clear the stack back to a table body
@@ -52869,7 +56463,9 @@
mode</a>.</p>
</dd>
- </dl><p>When the steps above require the UA to <dfn id=clear-the-stack-back-to-a-table-body-context>clear the stack
+ </dl>
+
+ <p>When the steps above require the UA to <dfn id=clear-the-stack-back-to-a-table-body-context>clear the stack
back to a table body context</dfn>, it means that the UA must,
while the <a href=#current-node>current node</a> is not a <code><a href=#the-tbody-element>tbody</a></code>,
<code><a href=#the-tfoot-element>tfoot</a></code>, <code><a href=#the-thead-element>thead</a></code>, or <code><a href=#the-html-element>html</a></code>
@@ -52886,7 +56482,9 @@
<p>When the <a href=#insertion-mode>insertion mode</a> is "<a href=#parsing-main-intr title="insertion
mode: in row">in row</a>", tokens must be handled as follows:</p>
- <dl class=switch><dt>A start tag whose tag name is one of: "th", "td"</dt>
+ <dl class=switch>
+
+ <dt>A start tag whose tag name is one of: "th", "td"</dt>
<dd>
<p><a href=#clear-the-stack-back-to-a-table-row-context>Clear the stack back to a table row
@@ -52961,7 +56559,9 @@
mode</a>.</p>
</dd>
- </dl><p>When the steps above require the UA to <dfn id=clear-the-stack-back-to-a-table-row-context>clear the stack
+ </dl>
+
+ <p>When the steps above require the UA to <dfn id=clear-the-stack-back-to-a-table-row-context>clear the stack
back to a table row context</dfn>, it means that the UA must,
while the <a href=#current-node>current node</a> is not a <code><a href=#the-tr-element>tr</a></code>
element or an <code><a href=#the-html-element>html</a></code> element, pop elements from the
@@ -52977,7 +56577,9 @@
<p>When the <a href=#insertion-mode>insertion mode</a> is "<a href=#parsing-main-intd title="insertion
mode: in cell">in cell</a>", tokens must be handled as follows:</p>
- <dl class=switch><dt>An end tag whose tag name is one of: "td", "th"</dt>
+ <dl class=switch>
+
+ <dt>An end tag whose tag name is one of: "td", "th"</dt>
<dd>
<p>If the <a href=#stack-of-open-elements>stack of open elements</a> does not <a href=#has-an-element-in-table-scope title="has an element in table scope">have an element in table
@@ -53047,10 +56649,14 @@
mode</a>.</p>
</dd>
- </dl><p>Where the steps above say to <dfn id=close-the-cell>close the cell</dfn>, they
+ </dl>
+
+ <p>Where the steps above say to <dfn id=close-the-cell>close the cell</dfn>, they
mean to run the following algorithm:</p>
- <ol><li><p>If the <a href=#stack-of-open-elements>stack of open elements</a> <a href=#has-an-element-in-table-scope title="has an element in table scope">has a <code>td</code>
+ <ol>
+
+ <li><p>If the <a href=#stack-of-open-elements>stack of open elements</a> <a href=#has-an-element-in-table-scope title="has an element in table scope">has a <code>td</code>
element in table scope</a>, then act as if an end tag token
with the tag name "td" had been seen.</li>
@@ -53059,7 +56665,9 @@
<code>th</code> element in table scope</a>; act as if an end
tag token with the tag name "th" had been seen.</li>
- </ol><p class=note>The <a href=#stack-of-open-elements>stack of open elements</a> cannot
+ </ol>
+
+ <p class=note>The <a href=#stack-of-open-elements>stack of open elements</a> cannot
have both a <code><a href=#the-td-element>td</a></code> and a <code><a href=#the-th-element>th</a></code> element <a href=#has-an-element-in-table-scope title="has an element in table scope">in table scope</a> at
the same time, nor can it have neither when the <a href=#insertion-mode>insertion
mode</a> is "<a href=#parsing-main-intd title="insertion mode: in cell">in
@@ -53071,7 +56679,9 @@
<p>When the <a href=#insertion-mode>insertion mode</a> is "<a href=#parsing-main-inselect title="insertion
mode: in select">in select</a>", tokens must be handled as follows:</p>
- <dl class=switch><dt>A character token</dt>
+ <dl class=switch>
+
+ <dt>A character token</dt>
<dd>
<p><a href=#insert-a-character title="insert a character">Insert the token's
character</a> into the <a href=#current-node>current node</a>.</p>
@@ -53204,12 +56814,17 @@
<p><a href=#parse-error>Parse error</a>. Ignore the token.</p>
</dd>
- </dl><h5 id=parsing-main-inselectintable><span class=secno>8.2.5.19 </span>The "<dfn title="insertion mode: in select in table">in select in table</dfn>" insertion mode</h5>
+ </dl>
+
+ <h5 id=parsing-main-inselectintable><span class=secno>8.2.5.19 </span>The "<dfn title="insertion mode: in select in table">in select in table</dfn>" insertion mode</h5>
+
<p>When the <a href=#insertion-mode>insertion mode</a> is "<a href=#parsing-main-inselectintable title="insertion
mode: in select in table">in select in table</a>", tokens must be handled as follows:</p>
- <dl class=switch><dt>A start tag whose tag name is one of: "caption", "table",
+ <dl class=switch>
+
+ <dt>A start tag whose tag name is one of: "caption", "table",
"tbody", "tfoot", "thead", "tr", "td", "th"</dt>
<dd>
<p><a href=#parse-error>Parse error</a>. Act as if an end tag with the tag
@@ -53236,13 +56851,18 @@
mode</a>.</p>
</dd>
- </dl><h5 id=parsing-main-inforeign><span class=secno>8.2.5.20 </span>The "<dfn title="insertion mode: in foreign content">in foreign content</dfn>" insertion mode</h5>
+ </dl>
+
+ <h5 id=parsing-main-inforeign><span class=secno>8.2.5.20 </span>The "<dfn title="insertion mode: in foreign content">in foreign content</dfn>" insertion mode</h5>
+
<p>When the <a href=#insertion-mode>insertion mode</a> is "<a href=#parsing-main-inforeign title="insertion
mode: in foreign content">in foreign content</a>", tokens must be
handled as follows:</p>
- <dl class=switch><dt>A character token</dt>
+ <dl class=switch>
+
+ <dt>A character token</dt>
<dd>
<p><a href=#insert-a-character title="insert a character">Insert the token's
character</a> into the <a href=#current-node>current node</a>.</p>
@@ -53401,12 +57021,17 @@
</dd>
- </dl><h5 id=parsing-main-afterbody><span class=secno>8.2.5.21 </span>The "<dfn title="insertion mode: after body">after body</dfn>" insertion mode</h5>
+ </dl>
+
+ <h5 id=parsing-main-afterbody><span class=secno>8.2.5.21 </span>The "<dfn title="insertion mode: after body">after body</dfn>" insertion mode</h5>
+
<p>When the <a href=#insertion-mode>insertion mode</a> is "<a href=#parsing-main-afterbody title="insertion
mode: after body">after body</a>", tokens must be handled as follows:</p>
- <dl class=switch><dt>A character token that is one of U+0009 CHARACTER
+ <dl class=switch>
+
+ <dt>A character token that is one of U+0009 CHARACTER
TABULATION, U+000A LINE FEED (LF), U+000C FORM FEED (FF),
<!--U+000D CARRIAGE RETURN (CR),--> or U+0020 SPACE</dt>
<dd>
@@ -53459,12 +57084,17 @@
</dd>
- </dl><h5 id=parsing-main-inframeset><span class=secno>8.2.5.22 </span>The "<dfn title="insertion mode: in frameset">in frameset</dfn>" insertion mode</h5>
+ </dl>
+
+ <h5 id=parsing-main-inframeset><span class=secno>8.2.5.22 </span>The "<dfn title="insertion mode: in frameset">in frameset</dfn>" insertion mode</h5>
+
<p>When the <a href=#insertion-mode>insertion mode</a> is "<a href=#parsing-main-inframeset title="insertion
mode: in frameset">in frameset</a>", tokens must be handled as follows:</p>
- <dl class=switch><dt>A character token that is one of U+0009 CHARACTER
+ <dl class=switch>
+
+ <dt>A character token that is one of U+0009 CHARACTER
TABULATION, U+000A LINE FEED (LF), U+000C FORM FEED (FF),
<!--U+000D CARRIAGE RETURN (CR),--> or U+0020 SPACE</dt>
<dd>
@@ -53552,13 +57182,18 @@
<p><a href=#parse-error>Parse error</a>. Ignore the token.</p>
</dd>
- </dl><h5 id=parsing-main-afterframeset><span class=secno>8.2.5.23 </span>The "<dfn title="insertion mode: after frameset">after frameset</dfn>" insertion mode</h5>
+ </dl>
+
+ <h5 id=parsing-main-afterframeset><span class=secno>8.2.5.23 </span>The "<dfn title="insertion mode: after frameset">after frameset</dfn>" insertion mode</h5>
+
<p>When the <a href=#insertion-mode>insertion mode</a> is "<a href=#parsing-main-afterframeset title="insertion
mode: after frameset">after frameset</a>", tokens must be handled as follows:</p>
<!-- due to rules in the "in frameset" mode, this can't be entered in the fragment case -->
- <dl class=switch><dt>A character token that is one of U+0009 CHARACTER
+ <dl class=switch>
+
+ <dt>A character token that is one of U+0009 CHARACTER
TABULATION, U+000A LINE FEED (LF), U+000C FORM FEED (FF),
<!--U+000D CARRIAGE RETURN (CR),--> or U+0020 SPACE</dt>
<dd>
@@ -53606,7 +57241,9 @@
<p><a href=#parse-error>Parse error</a>. Ignore the token.</p>
</dd>
- </dl><p class=XXX>This doesn't handle UAs that don't support
+ </dl>
+
+ <p class=XXX>This doesn't handle UAs that don't support
frames, or that do support frames but want to show the NOFRAMES
content. Supporting the former is easy; supporting the latter is
harder.</p>
@@ -53617,7 +57254,9 @@
<p>When the <a href=#insertion-mode>insertion mode</a> is "<a href=#the-after-after-body-insertion-mode title="insertion
mode: after after body">after after body</a>", tokens must be handled as follows:</p>
- <dl class=switch><dt>A comment token</dt>
+ <dl class=switch>
+
+ <dt>A comment token</dt>
<dd>
<p>Append a <code>Comment</code> node to the <code>Document</code>
object with the <code title="">data</code> attribute set to the
@@ -53646,12 +57285,17 @@
reprocess the token.</p>
</dd>
- </dl><h5 id=the-after-after-frameset-insertion-mode><span class=secno>8.2.5.25 </span>The "<dfn title="insertion mode: after after frameset">after after frameset</dfn>" insertion mode</h5>
+ </dl>
+
+ <h5 id=the-after-after-frameset-insertion-mode><span class=secno>8.2.5.25 </span>The "<dfn title="insertion mode: after after frameset">after after frameset</dfn>" insertion mode</h5>
+
<p>When the <a href=#insertion-mode>insertion mode</a> is "<a href=#the-after-after-frameset-insertion-mode title="insertion
mode: after after frameset">after after frameset</a>", tokens must be handled as follows:</p>
- <dl class=switch><dt>A comment token</dt>
+ <dl class=switch>
+
+ <dt>A comment token</dt>
<dd>
<p>Append a <code>Comment</code> node to the <code>Document</code>
object with the <code title="">data</code> attribute set to the
@@ -53684,8 +57328,11 @@
<p><a href=#parse-error>Parse error</a>. Ignore the token.</p>
</dd>
- </dl><h4 id=the-end><span class=secno>8.2.6 </span>The end</h4>
+ </dl>
+
+ <h4 id=the-end><span class=secno>8.2.6 </span>The end</h4>
+
<p>Once the user agent <dfn id=stop-parsing title="stop parsing">stops parsing</dfn>
the document, the user agent must follow the steps in this
section.</p>
@@ -53721,7 +57368,9 @@
load event</dfn> has completed, the user agent must run the
following steps:</p>
- <ol><li><a href=#queue-a-task>Queue a task</a> to set the <a href=#current-document-readiness>current document
+ <ol>
+
+ <li><a href=#queue-a-task>Queue a task</a> to set the <a href=#current-document-readiness>current document
readiness</a> to "complete".</li>
<li>If the <code>Document</code> is in a <a href=#browsing-context>browsing
@@ -53737,7 +57386,9 @@
current value of the <a href=#pending-state-object>pending state object</a>. This event
must bubble but not be cancelable and has no default action.</li>
- </ol><p>The <a href=#task-source>task source</a> for these tasks is the <a href=#dom-manipulation-task-source>DOM
+ </ol>
+
+ <p>The <a href=#task-source>task source</a> for these tasks is the <a href=#dom-manipulation-task-source>DOM
manipulation task source</a>.</p>
<!-- XXX make sure things "delay the load event" -->
@@ -53884,14 +57535,18 @@
<p>If the tool has no way to convey out-of-band information, then
the tool may drop the following information:</p>
- <ul><li>Whether the document is set to <i><a href=#no-quirks-mode>no quirks mode</a></i>,
+ <ul>
+
+ <li>Whether the document is set to <i><a href=#no-quirks-mode>no quirks mode</a></i>,
<i><a href=#limited-quirks-mode>limited quirks mode</a></i>, or <i><a href=#quirks-mode>quirks mode</a></i></li>
<li>The association between form controls and forms that aren't
their nearest <code><a href=#the-form-element>form</a></code> element ancestor (use of the
<a href=#form-element-pointer><code>form</code> element pointer</a> in the parser)</li>
- </ul><p class=note>The mutations allowed by this section apply
+ </ul>
+
+ <p class=note>The mutations allowed by this section apply
<em>after</em> the <a href=#html-parser>HTML parser</a>'s rules have been
applied. For example, a <code title=""><a::></code> start tag
will be closed by a <code title=""></a::></code> end tag, and
@@ -53915,7 +57570,9 @@
<p>The <dfn id=xmlns-namespace>XMLNS namespace</dfn> is: <code>http://www.w3.org/2000/xmlns/</code></p>
- <hr><p>Data mining tools and other user agents that perform operations
+ <hr>
+
+ <p>Data mining tools and other user agents that perform operations
on <code title="">text/html</code> content without running scripts,
evaluating CSS or XPath expressions, or otherwise exposing the
resulting DOM to arbitrary content, may "support namespaces" by just
@@ -53935,7 +57592,9 @@
<p class=note>This algorithm serializes the <em>children</em> of
the node being serialized, not the node itself.</p>
- <ol><li><p>Let <var title="">s</var> be a string, and initialize it to
+ <ol>
+
+ <li><p>Let <var title="">s</var> be a string, and initialize it to
the empty string.</li>
<li>
@@ -53943,7 +57602,9 @@
<p>For each child node of <var title="">the node</var>, in
<a href=#tree-order>tree order</a>, run the following steps:
- <ol><li><p>Let <var title="">current node</var> be the child node
+ <ol>
+
+ <li><p>Let <var title="">current node</var> be the child node
being processed.</li>
<li>
@@ -53951,8 +57612,10 @@
<p>Append the appropriate string from the following list to
<var title="">s</var>:</p>
- <dl class=switch><dt>If <var title="">current node</var> is an <code title="">Element</code></dt>
+ <dl class=switch>
+ <dt>If <var title="">current node</var> is an <code title="">Element</code></dt>
+
<dd>
<p>Append a U+003C LESS-THAN SIGN (<code title=""><</code>)
@@ -54071,18 +57734,24 @@
</dd>
- </dl><p>Other node types (e.g. <code title="">Attr</code>) cannot
+ </dl>
+
+ <p>Other node types (e.g. <code title="">Attr</code>) cannot
occur as children of elements. If, despite this, they somehow do
occur, this algorithm must raise an
<code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> exception.</p>
</li>
- </ol></li>
+ </ol>
+ </li>
+
<li><p>The result of the algorithm is the string <var title="">s</var>.</li>
- </ol><p><dfn id=escapingString>Escaping a string</dfn> (for the
+ </ol>
+
+ <p><dfn id=escapingString>Escaping a string</dfn> (for the
purposes of the algorithm above) consists of replacing any
occurrences of the "<code title="">&</code>" character by the
string "<code title="">&</code>", any occurrences of the
@@ -54128,8 +57797,10 @@
parser wasn't created for the purposes of handling this algorithm,
then that is an error in the specification.</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>Create a new <code>Document</code> node, and mark it as being
an <a href=#html-documents title="HTML documents">HTML document</a>.</p>
@@ -54147,12 +57818,16 @@
<p>If there is a <var title="">context</var> element, run these
substeps:</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>Set the <a href=#html-parser>HTML parser</a>'s <a href=#tokenization>tokenization</a>
stage's <a href=#content-model-flag>content model flag</a> according to the <var title="">context</var> element, as follows:</p>
- <dl class=switch><dt>If it is a <code><a href=#the-title-element>title</a></code> or <code><a href=#the-textarea-element>textarea</a></code>
+ <dl class=switch>
+
+ <dt>If it is a <code><a href=#the-title-element>title</a></code> or <code><a href=#the-textarea-element>textarea</a></code>
element</dt>
<dd>Set the <a href=#content-model-flag>content model flag</a> to
@@ -54186,8 +57861,10 @@
<dd>Leave the <a href=#content-model-flag>content model flag</a> in the PCDATA
state.</dd>
- </dl></li>
+ </dl>
+ </li>
+
<li>
<p>Let <var title="">root</var> be a new <code><a href=#the-html-element>html</a></code> element
@@ -54229,8 +57906,10 @@
</li>
- </ol></li>
+ </ol>
+ </li>
+
<li>
<p>Place into the <a href=#the-input-stream>input stream</a> for the <a href=#html-parser>HTML
@@ -54258,14 +57937,22 @@
</li>
- </ol><h3 id=named-character-references><span class=secno>8.6 </span><dfn>Named character references</dfn></h3>
+ </ol>
+
+
+ <h3 id=named-character-references><span class=secno>8.6 </span><dfn>Named character references</dfn></h3>
+
<p>This table lists the character reference names that are supported
by HTML, and the code points to which they refer. It is referenced
by the previous sections.</p>
<div class=tall-and-narrow>
- <table><thead><tr><th> Name </th> <th> Character </th> </thead><tbody>
+ <table>
+ <thead>
+ <tr> <th> Name </th> <th> Character </th> </tr>
+ </thead>
+<tbody>
<tr> <td> <code title="">AElig;</code> </td> <td> U+000C6 </td> </tr>
<tr> <td> <code title="">AElig</code> </td> <td> U+000C6 </td> </tr> <!-- (invalid entity with missing semicolon for legacy support only) -->
<tr> <td> <code title="">AMP;</code> </td> <td> U+00026 </td> </tr>
@@ -56403,13 +60090,16 @@
<tr> <td> <code title="">zscr;</code> </td> <td> U+1D4CF </td> </tr>
<tr> <td> <code title="">zwj;</code> </td> <td> U+0200D </td> </tr>
<tr> <td> <code title="">zwnj;</code> </td> <td> U+0200C </td> </tr>
-</table><!--
+
+ </table>
+ <!--
If we want to add character references, Almorca suggests:
> I would add &sub1; (character U+2081), &sub2;
> (character U+2082) and &sub3; (character U+2083). They
> would are the equivalent to ¹, ², and ³.
See also: http://www.w3.org/2003/entities/
- --></div>
+ -->
+ </div>
@@ -56532,8 +60222,10 @@
<code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> exception instead of returning a
string:</p>
- <ul><li>A <code>Document</code> node with no child element nodes.</li>
+ <ul>
+ <li>A <code>Document</code> node with no child element nodes.</li>
+
<li>A <code>DocumentType</code> node that has an external subset
public identifier that contains characters that are not matched by
the XML <code title="">PubidChar</code> production. <a href=#refsXML>[XML]</a></li>
@@ -56566,7 +60258,9 @@
<li>A <code>ProcessingInstruction</code> node whose data contains
the string "<code title="">?></code>".</li>
- </ul><p class=note>These are the only ways to make a DOM
+ </ul>
+
+ <p class=note>These are the only ways to make a DOM
unserializable. The DOM enforces all the other XML constraints; for
example, trying to set an attribute with a name that contains an
equals sign (=) will raised an <code><a href=#invalid_character_err>INVALID_CHARACTER_ERR</a></code>
@@ -56582,8 +60276,10 @@
context element <var title="">context</var>, the algorithm is as
follows:</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>Create a new <a href=#xml-parser>XML parser</a>.</p>
</li>
@@ -56639,8 +60335,12 @@
</li>
- </ol><h2 id=rendering><span class=secno>10 </span>Rendering</h2>
+ </ol>
+
+
+ <h2 id=rendering><span class=secno>10 </span>Rendering</h2>
+
<p><em>User agents are not required present HTML documents in any
particular way. However, this section provides a set of suggestions
for rendering HTML documents that, if followed, are likely to lead
@@ -56689,7 +60389,9 @@
are expected to be flipped around on elements whose 'direction'
property is 'rtl'. These are marked "<dfn id=ltr-specific>LTR-specific</dfn>".</p>
- <hr><p>When the text below says that an attribute <var title="">attribute</var> on an element <var title="">element</var>
+ <hr>
+
+ <p>When the text below says that an attribute <var title="">attribute</var> on an element <var title="">element</var>
<dfn id=maps-to-the-pixel-length-property>maps to the pixel length property</dfn> (or properties) <var title="">properties</var>, it means that if <var title="">element</var> has an attribute <var title="">attribute</var> set, and parsing that attribute's value
using the <a href=#rules-for-parsing-non-negative-integers>rules for parsing non-negative integers</a>
doesn't generate an error, then the user agent is expected to use
@@ -56814,25 +60516,46 @@
<!-- XXX so, uh, about the cross-site-styling hole below... -->
- <table><thead><tr><th>Property
+ <table>
+ <thead>
+ <tr>
+ <th>Property
<th>Source
- <tbody><tr><td rowspan=3>'margin-top'
+ <tbody>
+ <tr>
+ <td rowspan=3>'margin-top'
<td><code><a href=#the-body-element>body</a></code> element's <code title=attr-body-marginheight>marginheight</code> attribute
- <tr><td>The <code><a href=#the-body-element>body</a></code> element's <a href=#container-frame-element>container frame element</a>'s <code title=attr-frame-marginheight>marginheight</code> attribute
- <tr><td><code><a href=#the-body-element>body</a></code> element's <code title=attr-body-topmargin>topmargin</code> attribute
- <tbody><tr><td rowspan=3>'margin-right'
+ <tr>
+ <td>The <code><a href=#the-body-element>body</a></code> element's <a href=#container-frame-element>container frame element</a>'s <code title=attr-frame-marginheight>marginheight</code> attribute
+ <tr>
+ <td><code><a href=#the-body-element>body</a></code> element's <code title=attr-body-topmargin>topmargin</code> attribute
+ <tbody>
+ <tr>
+ <td rowspan=3>'margin-right'
<td><code><a href=#the-body-element>body</a></code> element's <code title=attr-body-marginwidth>marginwidth</code> attribute
- <tr><td>The <code><a href=#the-body-element>body</a></code> element's <a href=#container-frame-element>container frame element</a>'s <code title=attr-frame-marginwidth>marginwidth</code> attribute
- <tr><td><code><a href=#the-body-element>body</a></code> element's <code title=attr-body-rightmargin>rightmargin</code> attribute
- <tbody><tr><td rowspan=3>'margin-bottom'
+ <tr>
+ <td>The <code><a href=#the-body-element>body</a></code> element's <a href=#container-frame-element>container frame element</a>'s <code title=attr-frame-marginwidth>marginwidth</code> attribute
+ <tr>
+ <td><code><a href=#the-body-element>body</a></code> element's <code title=attr-body-rightmargin>rightmargin</code> attribute
+ <tbody>
+ <tr>
+ <td rowspan=3>'margin-bottom'
<td><code><a href=#the-body-element>body</a></code> element's <code title=attr-body-marginheight>marginheight</code> attribute
- <tr><td>The <code><a href=#the-body-element>body</a></code> element's <a href=#container-frame-element>container frame element</a>'s <code title=attr-frame-marginheight>marginheight</code> attribute
- <tr><td><code><a href=#the-body-element>body</a></code> element's <code title=attr-body-bottommargin>topmargin</code> attribute
- <tbody><tr><td rowspan=3>'margin-left'
+ <tr>
+ <td>The <code><a href=#the-body-element>body</a></code> element's <a href=#container-frame-element>container frame element</a>'s <code title=attr-frame-marginheight>marginheight</code> attribute
+ <tr>
+ <td><code><a href=#the-body-element>body</a></code> element's <code title=attr-body-bottommargin>topmargin</code> attribute
+ <tbody>
+ <tr>
+ <td rowspan=3>'margin-left'
<td><code><a href=#the-body-element>body</a></code> element's <code title=attr-body-marginwidth>marginwidth</code> attribute
- <tr><td>The <code><a href=#the-body-element>body</a></code> element's <a href=#container-frame-element>container frame element</a>'s <code title=attr-frame-marginwidth>marginwidth</code> attribute
- <tr><td><code><a href=#the-body-element>body</a></code> element's <code title=attr-body-leftmargin>rightmargin</code> attribute
- </table><p>If the <code><a href=#the-body-element>body</a></code> element's <code>Document</code>'s
+ <tr>
+ <td>The <code><a href=#the-body-element>body</a></code> element's <a href=#container-frame-element>container frame element</a>'s <code title=attr-frame-marginwidth>marginwidth</code> attribute
+ <tr>
+ <td><code><a href=#the-body-element>body</a></code> element's <code title=attr-body-leftmargin>rightmargin</code> attribute
+ </table>
+
+ <p>If the <code><a href=#the-body-element>body</a></code> element's <code>Document</code>'s
<a href=#browsing-context>browsing context</a> is a <a href=#nested-browsing-context>nested browsing
context</a>, and the <a href=#browsing-context-container>browsing context container</a> of
that <a href=#nested-browsing-context>nested browsing context</a> is a <code>frame</code> or
@@ -56841,7 +60564,9 @@
<code>frame</code> or <code><a href=#the-iframe-element>iframe</a></code> element. Otherwise, there
is no <a href=#container-frame-element>container frame element</a>.</p>
- <hr><p>If the <code>Document</code> has a <a href=#root-element>root element</a>, and
+ <hr>
+
+ <p>If the <code>Document</code> has a <a href=#root-element>root element</a>, and
the <code>Document</code>'s <a href=#browsing-context>browsing context</a> is a
<a href=#nested-browsing-context>nested browsing context</a>, and the <a href=#browsing-context-container>browsing context
container</a> of that <a href=#nested-browsing-context>nested browsing context</a> is a
@@ -56856,23 +60581,38 @@
property, setting it to the value given in the corresponding cell on
the same row in the second column:</p>
- <table><thead><tr><th> Attribute value
+ <table>
+ <thead>
+ <tr>
+ <th> Attribute value
<th> 'overflow' value
- <tbody><tr><td><code title="">on</code>
+ <tbody>
+ <tr>
+ <td><code title="">on</code>
<td>'scroll'
- <tr><td><code title="">scroll</code>
+ <tr>
+ <td><code title="">scroll</code>
<td>'scroll'
- <tr><td><code title="">yes</code>
+ <tr>
+ <td><code title="">yes</code>
<td>'scroll'
- <tr><td><code title="">off</code>
+ <tr>
+ <td><code title="">off</code>
<td>'hidden'
- <tr><td><code title="">noscroll</code>
+ <tr>
+ <td><code title="">noscroll</code>
<td>'hidden'
- <tr><td><code title="">no</code>
+ <tr>
+ <td><code title="">no</code>
<td>'hidden'
- <tr><td><code title="">auto</code>
+ <tr>
+ <td><code title="">auto</code>
<td>'auto'
- </table><hr><p>The <code><a href=#the-table-element>table</a></code> element's <code title=attr-table-cellspacing>cellspacing</code> attribute
+ </table>
+
+ <hr>
+
+ <p>The <code><a href=#the-table-element>table</a></code> element's <code title=attr-table-cellspacing>cellspacing</code> attribute
<a href=#maps-to-the-pixel-length-property>maps to the pixel length property</a> 'border-spacing' on the
element.</p>
@@ -56916,7 +60656,9 @@
to the dimension property">map to the dimension property</a> 'width'
on the element.</p>
- <hr><p>In <a href=#quirks-mode>quirks mode</a>, the following rules are also
+ <hr>
+
+ <p>In <a href=#quirks-mode>quirks mode</a>, the following rules are also
expected to apply:</p>
<pre class=css>@namespace url(http://www.w3.org/1999/xhtml);
@@ -56940,7 +60682,9 @@
sup { vertical-align: super; }
th { text-align: center; }</pre>
- <hr><p>The following rules are also expected to apply, as
+ <hr>
+
+ <p>The following rules are also expected to apply, as
<a href=#presentational-hints>presentational hints</a>:</p>
<pre class=css>@namespace url(http://www.w3.org/1999/xhtml);
@@ -57119,12 +60863,16 @@
</pre>
- <hr><p>The initial value for the 'color' property is expected to be
+ <hr>
+
+ <p>The initial value for the 'color' property is expected to be
black. The initial value for the 'background-color' property is
expected to be 'transparent'. The canvas's background is expected to
be white.</p>
- <hr><p>The <code><a href=#the-article-element>article</a></code>, <code><a href=#the-aside-element>aside</a></code>, <code><a href=#the-nav-element>nav</a></code>,
+ <hr>
+
+ <p>The <code><a href=#the-article-element>article</a></code>, <code><a href=#the-aside-element>aside</a></code>, <code><a href=#the-nav-element>nav</a></code>,
and <code><a href=#the-section-element>section</a></code> elements are expected to affect the styling
of <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h1</a></code> elements, based on the nesting depth. If <var title="">x</var> is a selector that matches elements that are either
<code><a href=#the-article-element>article</a></code>, <code><a href=#the-aside-element>aside</a></code>, <code><a href=#the-nav-element>nav</a></code>, or
@@ -57141,7 +60889,9 @@
<var title="">x</var> <var title="">x</var> <var title="">x</var> <var title="">x</var> h1 { font-size: 0.83em; }
<var title="">x</var> <var title="">x</var> <var title="">x</var> <var title="">x</var> <var title="">x</var> h1 { font-size: 0.67em; }</pre>
- <hr><p>When a <code><a href=#the-body-element>body</a></code>, <code><a href=#the-table-element>table</a></code>, <code><a href=#the-thead-element>thead</a></code>,
+ <hr>
+
+ <p>When a <code><a href=#the-body-element>body</a></code>, <code><a href=#the-table-element>table</a></code>, <code><a href=#the-thead-element>thead</a></code>,
<code><a href=#the-tbody-element>tbody</a></code>, <code><a href=#the-tfoot-element>tfoot</a></code>, <code><a href=#the-tr-element>tr</a></code>,
<code><a href=#the-td-element>td</a></code>, or <code><a href=#the-th-element>th</a></code> element has a <code title=attr-background>background</code> attribute set to a
non-empty value, the new value is expected to be <a href=#resolve-a-url title="resolve a url">resolved</a> relative to the element, and
@@ -57198,7 +60948,9 @@
'border-right-color', 'border-bottom-color', and
'border-right-color' properties to the resulting color.</p>
- <hr><p>When a <code>font</code> element has a <code title=attr-font-color>color</code> attribute, its value is
+ <hr>
+
+ <p>When a <code>font</code> element has a <code title=attr-font-color>color</code> attribute, its value is
expected to be parsed using the <a href=#rules-for-parsing-a-legacy-color-value>rules for parsing a legacy
color value</a>, and the user agent is expected to treat the
attribute as a <a href=#presentational-hints title="presentational hints">presentational
@@ -57222,7 +60974,9 @@
<a href=#presentational-hints title="presentational hints">presentational hint</a>
setting the element's 'font-size' property:</p>
- <ol><li><p>Let <var title="">input</var> be the attribute's
+ <ol>
+
+ <li><p>Let <var title="">input</var> be the attribute's
value.</li>
<li><p>Let <var title="">position</var> be a pointer into <var title="">input</var>, initially pointing at the start of the
@@ -57275,37 +61029,53 @@
<p>Set 'font-size' to the keyword corresponding to the value of
<var title="">value</var> according to the following table:</p>
- <table><thead><tr><th><var title="">value</var>
+ <table>
+ <thead>
+ <tr>
+ <th><var title="">value</var>
<th>'font-size' keyword
<th>Notes
- <tbody><tr><td>1
+ <tbody>
+ <tr>
+ <td>1
<td>xx-small
<td>
- <tr><td>2
+ <tr>
+ <td>2
<td>small
<td>
- <tr><td>3
+ <tr>
+ <td>3
<td>medium
<td>
- <tr><td>4
+ <tr>
+ <td>4
<td>large
<td>
- <tr><td>5
+ <tr>
+ <td>5
<td>x-large
<td>
- <tr><td>6
+ <tr>
+ <td>6
<td>xx-large
<td>
- <tr><td>7
+ <tr>
+ <td>7
<td>x<!---->xx-large
<td><i>see below</i>
- </table><p>The 'x<!---->xx-large' value is a non-CSS value used here to
+ </table>
+
+ <p>The 'x<!---->xx-large' value is a non-CSS value used here to
indicate a font size one "step" larger than 'xx-large'.</p>
</li>
- </ol><h4 id=punctuation-and-decorations><span class=secno>10.2.6 </span>Punctuation and decorations</h4>
+ </ol>
+
+ <h4 id=punctuation-and-decorations><span class=secno>10.2.6 </span>Punctuation and decorations</h4>
+
<pre class=css>@namespace url(http://www.w3.org/1999/xhtml);
:link, :visited, ins, u { text-decoration: underline; }
@@ -57362,7 +61132,9 @@
for the locales and languages understood by the user are expected to
be present.</p>
- <hr><p>The following rules are also expected to apply, as
+ <hr>
+
+ <p>The following rules are also expected to apply, as
<a href=#presentational-hints>presentational hints</a>:</p>
<pre class=css>@namespace url(http://www.w3.org/1999/xhtml);
@@ -57596,16 +61368,27 @@
property on this element has a computed value of 'rtl', and on the
left otherwise.</p>
- <table><thead><tr><th>Attribute value
+ <table>
+ <thead>
+ <tr>
+ <th>Attribute value
<th>Alignment position
- <tbody><tr><td><code title="">left</code>
+ <tbody>
+ <tr>
+ <td><code title="">left</code>
<td>On the left
- <tr><td><code title="">right</code>
+ <tr>
+ <td><code title="">right</code>
<td>On the right
- <tr><td><code title="">center</code>
+ <tr>
+ <td><code title="">center</code>
<td>In the middle
- </table><h3 id=replaced-elements><span class=secno>10.3 </span>Replaced elements</h3>
+ </table>
+
+
+ <h3 id=replaced-elements><span class=secno>10.3 </span>Replaced elements</h3>
+
<h4 id=embedded-content-1><span class=secno>10.3.1 </span>Embedded content</h4>
<p>The <code><a href=#the-applet-element>applet</a></code>, <code><a href=#the-canvas-element>canvas</a></code>, <code><a href=#the-embed-element>embed</a></code>,
@@ -57622,8 +61405,10 @@
to be treated as a replaced element about one line high, as wide as
is necessary to expose the user agent's user interface features.</p>
- <hr><p>The following CSS rules are expected to apply:</p>
+ <hr>
+ <p>The following CSS rules are expected to apply:</p>
+
<pre class=css>@namespace url(http://www.w3.org/1999/xhtml);
iframe { border: 2px inset; }</pre>
@@ -57688,7 +61473,9 @@
expected to provide access to the context menu that would have come
up if the user interacted with the actual image.</p>
- <hr><p>The following CSS rules are expected to apply when the
+ <hr>
+
+ <p>The following CSS rules are expected to apply when the
<code>Document</code> is in <a href=#quirks-mode>quirks mode</a>:</p>
<pre class=css>@namespace url(http://www.w3.org/1999/xhtml);
@@ -57838,8 +61625,10 @@
implement any relevant animations, etc, that are appropriate for the
platform. <a href=#refsCSSUI>[CSSUI]</a></p>
- <hr><p>The <dfn id=converting-a-character-width-to-pixels>converting a character width to pixels</dfn> algorithm,
- used by some of the bindings below, returns <span>(<var title="">size-1</var>)×<var title="">avg</var> + <var title="">max</var></span>, where
+ <hr>
+
+ <p>The <dfn id=converting-a-character-width-to-pixels>converting a character width to pixels</dfn> algorithm,
+ used by some of the bindings below, returns <span>(<var title="">size-1</var>)×<var title="">avg</var> + <var title="">max</var></span>, where
<var title="">size</var> is the character width to convert, <var title="">avg</var> is the average character width of the primary
font for the element for which the algorithm is being run, in
pixels, and <var title="">max</var> is the maximum character width
@@ -57894,7 +61683,7 @@
<code><a href=#the-details-element>details</a></code> element, the element is expected to render as a
'block' box with its 'padding-left' property set to '40px'. The
element's shadow tree is expected to take a child element that
- matches the selector <code title="">:bound-element > legend:first-child</code> and
+ matches the selector <code title="">:bound-element > legend:first-child</code> and
place it in a first 'block' box container, and then take the
remaining child nodes and place them in a later 'block' box
container.</p>
@@ -58267,8 +62056,10 @@
<p>When rendering a <code>frameset</code> on a surface, the user
agent is expected to use the following layout algorithm:</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>The <var title="">cols</var> and <var title="">rows</var>
variables are lists of zero or more pairs consisting of a number
and a unit, the unit being one of <i>percentage</i>,
@@ -58323,7 +62114,7 @@
<li>
- <p>Split the surface into a grid of <span title=""><var title="">w</var>×<var title="">h</var></span> rectangles,
+ <p>Split the surface into a grid of <span title=""><var title="">w</var>×<var title="">h</var></span> rectangles,
where <var title="">w</var> is the number of entries in <var title="">sized cols</var> and <var title="">h</var> is the number
of entries in <var title="">sized rows</var>.</p>
@@ -58351,13 +62142,17 @@
<p>For each row of the grid of rectangles created in the previous
step, from top to bottom, run these substeps:</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>For each rectangle in the row, from left to right, run these
substeps:</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>If there are any elements left in <var title="">children</var>, take the first element in the list,
and assign it to the rectangle.</p>
@@ -58376,10 +62171,14 @@
<p>If there are any elements left in <var title="">children</var>, remove the first element from <var title="">children</var>.</p>
- </ol></li>
+ </ol>
- </ol></li>
+ </li>
+ </ol>
+
+ </li>
+
<li>
<p>If the <code>frameset</code> element <a href=#has-a-border>has a border</a>,
@@ -58401,7 +62200,9 @@
<p>A <code>frameset</code> or <code>frame</code> element <dfn id=has-a-border>has
a border</dfn> if the following algorithm returns true:</p>
- <ol><li><p>If the element has a <code title=attr-frames-frameborder>frameborder</code> attribute
+ <ol>
+
+ <li><p>If the element has a <code title=attr-frames-frameborder>frameborder</code> attribute
whose value is not the empty string and whose first character is
either a U+0031 DIGIT ONE (1), a U+0079 LATIN SMALL LETTER Y, or
a U+0059 LATIN CAPITAL LETTER Y, then return true.</li>
@@ -58416,11 +62217,15 @@
<li><p>Otherwise, return true.</li>
- </ol><p>The <dfn id=frame-border-color>frame border color</dfn> of a <code>frameset</code> or
+ </ol>
+
+ <p>The <dfn id=frame-border-color>frame border color</dfn> of a <code>frameset</code> or
<code>frame</code> element is the color obtained from the
following algorithm:</p>
- <ol><li><p>If the element has a <code title=attr-frames-bordercolor>bordercolor</code> attribute,
+ <ol>
+
+ <li><p>If the element has a <code title=attr-frames-bordercolor>bordercolor</code> attribute,
then return the color obtained from applying the <a href=#rules-for-parsing-a-legacy-color-value>rules for
parsing a legacy color value</a> to that attribute's
value.</li>
@@ -58431,13 +62236,19 @@
<li><p>Otherwise, return gray.</li>
- </ol></li>
+ </ol>
- </ol><p>The algorithm to <dfn id=convert-a-list-of-dimensions-to-a-list-of-pixel-values>convert a list of dimensions to a list of
+ </li>
+
+ </ol>
+
+ <p>The algorithm to <dfn id=convert-a-list-of-dimensions-to-a-list-of-pixel-values>convert a list of dimensions to a list of
pixel values</dfn> consists of the following steps:</p>
- <ol><li>
+ <ol>
+ <li>
+
<p>Let <var title="">input list</var> be the list of numbers and
units passed to the algorithm.</p>
@@ -58525,7 +62336,9 @@
<li><p>Return <var title="">output list</var>.</li>
- </ol><p>User agents working with integer values for frame widths (as
+ </ol>
+
+ <p>User agents working with integer values for frame widths (as
opposed to user agents that can lay frames out with subpixel
accuracy) are expected to distribute the remainder first the last
entry whose unit is <i>relative</i>, then equally (not
@@ -58683,20 +62496,30 @@
whatsoever or have no requirements beyond those described elsewhere
in this specification:</p>
- <ul><li><dfn id=center><code>center</code></dfn></li>
+ <ul>
- </ul><hr><p>The following attributes are obsolete and either have no meaning
+ <li><dfn id=center><code>center</code></dfn></li>
+
+ </ul>
+
+ <hr>
+
+ <p>The following attributes are obsolete and either have no meaning
whatsoever or have no requirements beyond those described elsewhere
in this specification:</p>
- <ul><li><dfn id=attr-a-name title=attr-a-name><code>name</code></dfn> on <code><a href=#the-a-element>a</a></code> elements</li>
+ <ul>
+ <li><dfn id=attr-a-name title=attr-a-name><code>name</code></dfn> on <code><a href=#the-a-element>a</a></code> elements</li>
<li><dfn id=attr-body-alink title=attr-body-alink><code>alink</code></dfn> on <code><a href=#the-body-element>body</a></code> elements</li>
<li><dfn id=attr-body-bgcolor title=attr-body-bgcolor><code>bgcolor</code></dfn> on <code><a href=#the-body-element>body</a></code> elements</li>
<li><dfn id=attr-body-link title=attr-body-link><code>link</code></dfn> on <code><a href=#the-body-element>body</a></code> elements</li>
<li><dfn id=attr-body-text title=attr-body-text><code>text</code></dfn> on <code><a href=#the-body-element>body</a></code> elements</li>
<li><dfn id=attr-body-vlink title=attr-body-vlink><code>vlink</code></dfn> on <code><a href=#the-body-element>body</a></code> elements</li>
- </ul><h3 id=other-dom-apis><span class=secno>11.3 </span>Other DOM APIs</h3>
+ </ul>
+
+ <h3 id=other-dom-apis><span class=secno>11.3 </span>Other DOM APIs</h3>
+
<p>These APIs expose obsolete content attributes.</p>
<p class=XXX>The [XXX] below is for some annotation meaning "this
@@ -58789,36 +62612,44 @@
<p>The following errors may be categorised as described above:</p>
- <ul><li>
+ <ul>
+ <li>
+
<p>The <a href=#doctype-parse-error>DOCTYPE parse error</a>, if the DOCTYPE token's
<code title="">name</code> is an <a href=#ascii-case-insensitive>ASCII
case-insensitive</a> match for the string "<code title="">HTML</code>", and either:</p>
- <ul><li>the token's public identifier is the
- <a href=#case-sensitive>case-sensitive</a> string "<code title="">-//W3C//DTD HTML 4.0//EN</code>" and the
+ <ul>
+
+ <li>the token's public identifier is the
+ <a href=#case-sensitive>case-sensitive</a> string "<code title="">-//W3C//DTD HTML 4.0//EN</code>" and the
token's system identifier is either missing or the
<a href=#case-sensitive>case-sensitive</a> string "<code title="">http://www.w3.org/TR/REC-html40/strict.dtd</code>", or</li>
<li>the token's public identifier is the
- <a href=#case-sensitive>case-sensitive</a> string "<code title="">-//W3C//DTD HTML 4.01//EN</code>" and the
+ <a href=#case-sensitive>case-sensitive</a> string "<code title="">-//W3C//DTD HTML 4.01//EN</code>" and the
token's system identifier is either missing or the
<a href=#case-sensitive>case-sensitive</a> string "<code title="">http://www.w3.org/TR/html4/strict.dtd</code>", or</li>
<li>the token's public identifier is the
- <a href=#case-sensitive>case-sensitive</a> string "<code title="">-//W3C//DTD XHTML 1.0 Strict//EN</code>"
+ <a href=#case-sensitive>case-sensitive</a> string "<code title="">-//W3C//DTD XHTML 1.0 Strict//EN</code>"
and the token's system identifier is either missing or the
<a href=#case-sensitive>case-sensitive</a> string "<code title="">http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</code>",
or</li>
<li>the token's public identifier is the
- <a href=#case-sensitive>case-sensitive</a> string "<code title="">-//W3C//DTD XHTML 1.1//EN</code>"
+ <a href=#case-sensitive>case-sensitive</a> string "<code title="">-//W3C//DTD XHTML 1.1//EN</code>"
and the token's system identifier is either missing or the
<a href=#case-sensitive>case-sensitive</a> string "<code title="">http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd</code>".</li>
- </ul><!-- only things that trigger no-quirks mode and were valid in
- some other spec are allowed in this list --></li>
+ </ul>
+ <!-- only things that trigger no-quirks mode and were valid in
+ some other spec are allowed in this list -->
+
+ </li>
+
<li><p>The presence of a <code title=attr-head-profile>profile</code> attribute on the
<code><a href=#the-head-element>head</a></code> element, if its value is an <a href=#unordered-set-of-unique-space-separated-tokens>unordered set
of unique space-separated tokens</a> where the words are all
@@ -58852,7 +62683,13 @@
<li><p>The presence of a <code>noframes</code> element.</li>
- </ul><h2 id=no><span class=secno>12 </span>Things that you can't do with this specification because
+ </ul>
+
+
+
+
+
+ <h2 id=no><span class=secno>12 </span>Things that you can't do with this specification because
they are better handled using other technologies that are further
described herein</h2>
@@ -59026,33 +62863,33 @@
<p>Thanks to Aankhen, Aaron Boodman, Aaron Leventhal, Adam Barth,
Adam Roben, Addison Phillips, Adele Peterson, Adrian Sutton,
- Agustín Fernández, Ajai Tirumali, Alastair Campbell,
+ Agustín Fernández, Ajai Tirumali, Alastair Campbell,
Alex Nicolaou, Alexey Feldgendler, Anders Carlsson, Andrew Gove,
Andrew Sidwell, Anne van Kesteren, Anthony Hickson, Anthony Ricaud,
- Antti Koivisto, Arphen Lin, Asbjørn Ulsberg, Ashley Sheridan,
+ Antti Koivisto, Arphen Lin, Asbjørn Ulsberg, Ashley Sheridan,
Aurelien Levy, Ben Boyle, Ben Godfrey, Ben Meadowcroft, Ben Millard,
Benjamin Hawkes-Lewis, Bert Bos, Bijan Parsia, Bill Mason, Billy
Wong, Bjoern Hoehrmann, Boris Zbarsky, Brad Fults, Brad Neuberg,
Brady Eidson, Brendan Eich, Brett Wilson, Brian Campbell, Brian
Smith, Bruce Lawson, Bruce Miller, Cameron McCormack, Cao Yipeng,
- Carlos Perelló Marín, Chao Cai,
- 윤석찬 (Channy Yun), Charl van Niekerk, Charles
+ Carlos Perelló Marín, Chao Cai,
+ 윤석찬 (Channy Yun), Charl van Niekerk, Charles
Iliya Krempeaux, Charles McCathieNevile, Christian Biesinger,
Christian Johansen, Christian Schmidt, Chriswa, Cole Robison, Colin
Fine, Collin Jackson, Daniel Barclay, Daniel Brumbaugh Keeney,
- Daniel Glazman, Daniel Peng, Daniel Spång, Daniel Steinberg,
+ Daniel Glazman, Daniel Peng, Daniel Spång, Daniel Steinberg,
Danny Sullivan, Darin Adler, Darin Fisher, Dave Camp, Dave Singer,
Dave Townsend<!-- Mossop on moz irc -->, David Baron, David Bloom,
- David Carlisle, David Flanagan, David Håsäther, David
+ David Carlisle, David Flanagan, David Håsäther, David
Hyatt, David Smith, David Woolley, Dean Edridge, Debi Orton, Derek
Featherstone, DeWitt Clinton, Dimitri Glazkov, dolphinling, Doron
Rosenberg, Doug Kramer, Edward O'Connor, Edward Z. Yang, Eira
Monstad, Elliotte Harold, Eric Carlson, Eric Law, Erik Arvidsson,
Evan Martin, Evan Prodromou, fantasai, Felix Sasaki, Franck 'Shift'
- Quélain, Garrett Smith, Geoffrey Garen, Geoffrey Sneddon,
- George Lund, Håkon Wium Lie, Hans S. Tømmerhalt, Henri
+ Quélain, Garrett Smith, Geoffrey Garen, Geoffrey Sneddon,
+ George Lund, Håkon Wium Lie, Hans S. Tømmerhalt, Henri
Sivonen, Henrik Lied, Henry Mason, Hugh Winkler, Ignacio Javier, Ivo
- Emanuel Gonçalves, J. King, Jacques Distler, James Craig,
+ Emanuel Gonçalves, J. King, Jacques Distler, James Craig,
James Graham, James Justin Harrell, James M Snell, James Perrett,
Jan-Klaas Kollhof, Jason White, Jasper Bryant-Greene, Jed Hartman,
Jeff Cutsinger, Jeff Schiller, Jeff Walden, Jens Bannmann, Jens
@@ -59061,27 +62898,27 @@
Herland, John Boyer, John Bussjaeger, John Harding, Johnny Stenback,
Jon Gibbins, Jon Perlow, Jonathan Worent, Jorgen Horstink, Josh
Levenberg, Joshua Randall, Jukka K. Korpela, Jules
- Clément-Ripoche, Julian Reschke, Kai Hendry, Kartikaya Gupta,
+ Clément-Ripoche, Julian Reschke, Kai Hendry, Kartikaya Gupta,
<!-- Keryx Web, = Lars Gunther --> Kornel Lesinski,
- 黒澤剛志 (KUROSAWA Takeshi), Kristof
+ 黒澤剛志 (KUROSAWA Takeshi), Kristof
Zelechovski, Kyle Hofmann, Lachlan Hunt, Larry Page, Lars Gunther,
Laura L. Carlson, Laura Wisewell, Laurens Holst, Lee Kowalkowski,
- Leif Halvard Silli, Lenny Domnitser, Léonard Bouchet, Leons
+ Leif Halvard Silli, Lenny Domnitser, Léonard Bouchet, Leons
Petrazickis, Logan<!-- on moz irc -->, Loune, Maciej Stachowiak,
Magnus Kristiansen<!-- Dashiva -->, Maik Merten, Malcolm Rowe, Mark
Nottingham, Mark Rowe<!--bdash-->, Mark Schenk, Martijn Wargers,
- Martin Atkins, Martin Dürst, Martin Honnen, Masataka Yakura,
+ Martin Atkins, Martin Dürst, Martin Honnen, Masataka Yakura,
Mathieu Henri, Matthew Gregan, Matthew Mastracci, Matthew Raymond,
Matthew Thomas, Mattias Waldau, Max Romantschuk, Michael 'Ratt'
Iannarelli, Michael A. Nachbaur, Michael A. Puls
II<!--Shadow2531-->, Michael Carter, Michael Gratton, Michael
Nordman, Michael Powers, Michael(tm) Smith, Michel Fortin, Michiel
- van der Blonk, Mihai Şucan<!-- from ROBO Design -->, Mike
+ van der Blonk, Mihai Şucan<!-- from ROBO Design -->, Mike
Brown, Mike Dierken<!-- S. Mike Dierken -->, Mike Dixon, Mike
Schinkel, Mike Shaver, Mikko Rantalainen, Neil Deakin, Neil Soiffer,
- Nicholas Shanks, Ojan Vafai, Olaf Hoffmann, Olav Junker Kjær,
+ Nicholas Shanks, Ojan Vafai, Olaf Hoffmann, Olav Junker Kjær,
Oliver Hunt, <!-- Ozob = Kyle Hofmann --> Patrick H. Lauke, Peter
- Karlsson, Peter Kasting, Philip Jägenstedt, Philip Taylor,
+ Karlsson, Peter Kasting, Philip Jägenstedt, Philip Taylor,
Philip TAYLOR<!-- a different one -->, Rachid Finge, Rajas Moonka,
Ralf Stoltze, Ralph Giles, Raphael Champeimont, Rene Saarsoo,
Richard Ishida, Rikkert Koppes, Rimantas Liubertas, Robert Blaut,
@@ -59090,11 +62927,11 @@
Shaun Inman, Shiki Okasaka, Silvia Pfeiffer, Simon Pieters, Stefan
Haustein, Steffen Meschkat, Stephen Ma, Steve Faulkner, Steve
Runyon, Steven Garrity, Stewart Brodie, Stuart Parmenter, Sunava
- Dutta, Tantek Çelik, Terrence Wood, Thomas Broyer, Thomas
+ Dutta, Tantek Çelik, Terrence Wood, Thomas Broyer, Thomas
O'Connor, Tim Altman, Tim Johansson, Tommy Thorsen, Travis Leithead,
- Tyler Close, Vladimir Vukićević, Wakaba, Wayne
+ Tyler Close, Vladimir Vukićević, Wakaba, Wayne
Pollock, Wellington Fernando de Macedo, William Swanson, Wolfram
- Kriesing, Yi-An Huang, Zhenbin Xu, and Øistein E. Andersen,
+ Kriesing, Yi-An Huang, Zhenbin Xu, and Øistein E. Andersen,
for their useful and substantial comments.</p>
<p>Thanks also to everyone who has ever posted about HTML5 to their
@@ -59432,3 +63269,5 @@
-->
+
+
More information about the Commit-Watchers
mailing list