[html5] r8106 - [e] (0) Cleanup Affected topics: DOM APIs, HTML, HTML Syntax and Parsing, Security
whatwg at whatwg.org
whatwg at whatwg.org
Wed Jul 31 12:27:36 PDT 2013
Author: ianh
Date: 2013-07-31 12:27:34 -0700 (Wed, 31 Jul 2013)
New Revision: 8106
Modified:
complete.html
index
source
Log:
[e] (0) Cleanup
Affected topics: DOM APIs, HTML, HTML Syntax and Parsing, Security
Modified: complete.html
===================================================================
--- complete.html 2013-07-31 19:11:24 UTC (rev 8105)
+++ complete.html 2013-07-31 19:27:34 UTC (rev 8106)
@@ -39349,41 +39349,32 @@
};
<a href=#htmlareaelement>HTMLAreaElement</a> implements <a href=#urlutils>URLUtils</a>;</pre>
</dd>
- </dl><!--TOPIC:HTML--><!--CLEANUP--><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>
+ </dl><!--TOPIC:HTML--><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>
- <p>An <code><a href=#the-area-element>area</a></code> element with a parent node must have a <code><a href=#the-map-element>map</a></code> element
- ancestor or a <code><a href=#the-template-element>template</a></code> element ancestor.</p>
+ <p>An <code><a href=#the-area-element>area</a></code> element with a parent node must have a <code><a href=#the-map-element>map</a></code> element ancestor
+ or a <code><a href=#the-template-element>template</a></code> element ancestor.</p>
- <p>If the <code><a href=#the-area-element>area</a></code> element has an <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute, then the
- <code><a href=#the-area-element>area</a></code> element represents a <a href=#hyperlink>hyperlink</a>. In
- this case, the <dfn id=attr-area-alt title=attr-area-alt><code>alt</code></dfn>
- attribute must be present. It specifies the text of the
- hyperlink. Its value must be text that, when presented with the
- texts specified for the other hyperlinks of the <a href=#image-map>image
- map</a>, and with the alternative text of the image, but without
- the image itself, provides the user with the same kind of choice as
- the hyperlink would when used without its text but with its shape
- applied to the image. The <code title=attr-area-alt><a href=#attr-area-alt>alt</a></code>
- attribute may be left blank if there is another <code><a href=#the-area-element>area</a></code>
- element in the same <a href=#image-map>image map</a> that points to the same
- resource and has a non-blank <code title=attr-area-alt><a href=#attr-area-alt>alt</a></code>
- attribute.</p>
+ <p>If the <code><a href=#the-area-element>area</a></code> element has an <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code>
+ attribute, then the <code><a href=#the-area-element>area</a></code> element represents a <a href=#hyperlink>hyperlink</a>. In this case,
+ the <dfn id=attr-area-alt title=attr-area-alt><code>alt</code></dfn> attribute must be present. It specifies the
+ text of the hyperlink. Its value must be text that, when presented with the texts specified for
+ the other hyperlinks of the <a href=#image-map>image map</a>, and with the alternative text of the image,
+ but without the image itself, provides the user with the same kind of choice as the hyperlink
+ would when used without its text but with its shape applied to the image. The <code title=attr-area-alt><a href=#attr-area-alt>alt</a></code> attribute may be left blank if there is another <code><a href=#the-area-element>area</a></code>
+ element in the same <a href=#image-map>image map</a> that points to the same resource and has a non-blank
+ <code title=attr-area-alt><a href=#attr-area-alt>alt</a></code> attribute.</p>
- <p>If the <code><a href=#the-area-element>area</a></code> element has no <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute, then the area
- represented by the element cannot be selected, and the <code title=attr-area-alt><a href=#attr-area-alt>alt</a></code> attribute must be omitted.</p>
+ <p>If the <code><a href=#the-area-element>area</a></code> element has no <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code>
+ attribute, then the area represented by the element cannot be selected, and the <code title=attr-area-alt><a href=#attr-area-alt>alt</a></code> attribute must be omitted.</p>
- <p>In both cases, the <code title=attr-area-shape><a href=#attr-area-shape>shape</a></code> and
- <code title=attr-area-coords><a href=#attr-area-coords>coords</a></code> attributes specify the
- area.</p>
+ <p>In both cases, the <code title=attr-area-shape><a href=#attr-area-shape>shape</a></code> and <code title=attr-area-coords><a href=#attr-area-coords>coords</a></code> attributes specify the area.</p>
- <p>The <dfn id=attr-area-shape title=attr-area-shape><code>shape</code></dfn>
- attribute is an <a href=#enumerated-attribute>enumerated attribute</a>. The following
- table lists the keywords defined for this attribute. The states
- given in the first cell of the rows with keywords give the states to
- which those keywords map. <span class=impl>Some of the keywords
- are non-conforming, as noted in the last column.</span></p>
+ <p>The <dfn id=attr-area-shape title=attr-area-shape><code>shape</code></dfn> attribute is an <a href=#enumerated-attribute>enumerated
+ attribute</a>. The following table lists the keywords defined for this attribute. The states
+ given in the first cell of the rows with keywords give the states to which those keywords map.
+ <span class=impl>Some of the keywords are non-conforming, as noted in the last
+ column.</span></p>
<table><thead><tr><th>State
<th>Keywords
@@ -39406,51 +39397,41 @@
<td class=impl>
<tr><td class=impl><dfn id=attr-area-shape-keyword-rectangle title=attr-area-shape-keyword-rectangle><code>rectangle</code></dfn>
<td class=impl>Non-conforming
- </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>
+ </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>
- attribute must, if specified, contain a <a href=#valid-list-of-integers>valid list of
- integers</a>. This attribute gives the coordinates for the shape
- described by the <code title=attr-area-shape><a href=#attr-area-shape>shape</a></code>
- attribute. <span class=impl>The processing for this attribute is
- described as part of the <a href=#image-map>image map</a> processing
+ <p>The <dfn id=attr-area-coords title=attr-area-coords><code>coords</code></dfn> attribute must, if specified,
+ contain a <a href=#valid-list-of-integers>valid list of integers</a>. This attribute gives the coordinates for the shape
+ described by the <code title=attr-area-shape><a href=#attr-area-shape>shape</a></code> attribute. <span class=impl>The
+ processing for this attribute is described as part of the <a href=#image-map>image map</a> processing
model.</span></p>
- <!-- v2: It was suggested by John S. Urban that coords should
- support percentages as well as pixels, so that one could use the
- same image map for images of various sizes. -->
+ <!-- v2: It was suggested by John S. Urban that coords should support percentages as well as
+ pixels, so that one could use the same image map for images of various sizes. -->
- <p>In the <dfn id=attr-area-shape-circle title=attr-area-shape-circle>circle state</dfn>,
- <code><a href=#the-area-element>area</a></code> elements must have a <code title=attr-area-coords><a href=#attr-area-coords>coords</a></code> attribute present, with three
- integers, the last of which must be non-negative. The first integer
- must be the distance in CSS pixels from the left edge of the image
- to the center of the circle, the second integer must be the distance
- in CSS pixels from the top edge of the image to the center of the
- circle, and the third integer must be the radius of the circle,
- again in CSS pixels.</p>
+ <p>In the <dfn id=attr-area-shape-circle title=attr-area-shape-circle>circle state</dfn>, <code><a href=#the-area-element>area</a></code> elements must
+ have a <code title=attr-area-coords><a href=#attr-area-coords>coords</a></code> attribute present, with three integers, the
+ last of which must be non-negative. The first integer must be the distance in CSS pixels from the
+ left edge of the image to the center of the circle, the second integer must be the distance in CSS
+ pixels from the top edge of the image to the center of the circle, and the third integer must be
+ the radius of the circle, again in CSS pixels.</p>
- <p>In the <dfn id=attr-area-shape-default title=attr-area-shape-default>default state</dfn>
- state, <code><a href=#the-area-element>area</a></code> elements must not have a <code title=attr-area-coords><a href=#attr-area-coords>coords</a></code> attribute. (The area is the
+ <p>In the <dfn id=attr-area-shape-default title=attr-area-shape-default>default state</dfn> state, <code><a href=#the-area-element>area</a></code>
+ elements must not have a <code title=attr-area-coords><a href=#attr-area-coords>coords</a></code> attribute. (The area is the
whole image.)</p>
- <p>In the <dfn id=attr-area-shape-poly title=attr-area-shape-poly>polygon state</dfn>,
- <code><a href=#the-area-element>area</a></code> elements must have a <code title=attr-area-coords><a href=#attr-area-coords>coords</a></code> attribute with at least six
- integers, and the number of integers must be even. Each pair of
- integers must represent a coordinate given as the distances from the
- left and the top of the image in CSS pixels respectively, and all
- the coordinates together must represent the points of the polygon,
- in order.</p>
+ <p>In the <dfn id=attr-area-shape-poly title=attr-area-shape-poly>polygon state</dfn>, <code><a href=#the-area-element>area</a></code> elements must
+ have a <code title=attr-area-coords><a href=#attr-area-coords>coords</a></code> attribute with at least six integers, and the
+ number of integers must be even. Each pair of integers must represent a coordinate given as the
+ distances from the left and the top of the image in CSS pixels respectively, and all the
+ coordinates together must represent the points of the polygon, in order.</p>
- <p>In the <dfn id=attr-area-shape-rect title=attr-area-shape-rect>rectangle state</dfn>,
- <code><a href=#the-area-element>area</a></code> elements must have a <code title=attr-area-coords><a href=#attr-area-coords>coords</a></code> attribute with exactly four
- integers, the first of which must be less than the third, and the
- second of which must be less than the fourth. The four points must
- represent, respectively, the distance from the left edge of the
- image to the left side of the rectangle, the distance from the
- top edge to the top side, the distance from the left edge to the
- right side, and the distance from the top edge to the bottom side,
- all in CSS pixels.</p>
+ <p>In the <dfn id=attr-area-shape-rect title=attr-area-shape-rect>rectangle state</dfn>, <code><a href=#the-area-element>area</a></code> elements must
+ have a <code title=attr-area-coords><a href=#attr-area-coords>coords</a></code> attribute with exactly four integers, the
+ first of which must be less than the third, and the second of which must be less than the fourth.
+ The four points must represent, respectively, the distance from the left edge of the image to the
+ left side of the rectangle, the distance from the top edge to the top side, the distance from the
+ left edge to the right side, and the distance from the top edge to the bottom side, all in CSS
+ pixels.</p>
<div class=impl>
@@ -39468,27 +39449,28 @@
attributes must be omitted if the <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute is not
present.</p>
- <p>If the <code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code> attribute is specified on an <code><a href=#the-area-element>area</a></code>
- element, then the <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute must also be
- specified.</p>
+ <p>If the <code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code> attribute is specified on an
+ <code><a href=#the-area-element>area</a></code> element, then the <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute must
+ also be specified.</p>
<div class=impl>
-<!--CLEANUP-->
<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><!-- c.f. <a>'s similar section --><li><p>If the <code><a href=#the-area-element>area</a></code> element's <code><a href=#document>Document</a></code> is not <a href=#fully-active>fully active</a>, then abort these steps.</li>
+ <ol><!-- c.f. <a>'s similar section --><li><p>If the <code><a href=#the-area-element>area</a></code> element's <code><a href=#document>Document</a></code> is not <a href=#fully-active>fully active</a>,
+ then abort these steps.</li>
<li>
- <p>If the <code><a href=#the-area-element>area</a></code> element has
- a <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code> attribute and the algorithm is not
- <a href=#allowed-to-show-a-popup>allowed to show a popup</a>, or the element's <code title=attr-hyperlink-target><a href=#attr-hyperlink-target>target</a></code> attribute is present and applying <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name>the rules for
- choosing a browsing context given a browsing context name</a>, using the value of the <code title=attr-hyperlink-target><a href=#attr-hyperlink-target>target</a></code> attribute as the browsing context name, would result
- in there not being a chosen browsing context, then run these substeps:</p>
+ <p>If the <code><a href=#the-area-element>area</a></code> element has a <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code>
+ attribute and the algorithm is not <a href=#allowed-to-show-a-popup>allowed to show a popup</a>, or the element's <code title=attr-hyperlink-target><a href=#attr-hyperlink-target>target</a></code> attribute is present and applying <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name>the rules
+ for choosing a browsing context given a browsing context name</a>, using the value of the
+ <code title=attr-hyperlink-target><a href=#attr-hyperlink-target>target</a></code> attribute as the browsing context name, would
+ result in there not being a chosen browsing context, then run these substeps:</p>
- <ol><li><p>If there is an <a href=#entry-script>entry script</a>, throw an <code><a href=#invalidaccesserror>InvalidAccessError</a></code> exception.</li>
+ <ol><li><p>If there is an <a href=#entry-script>entry script</a>, throw an <code><a href=#invalidaccesserror>InvalidAccessError</a></code>
+ exception.</li>
<li><p>Abort these steps without following the hyperlink.</li>
@@ -66525,13 +66507,13 @@
</dd>
</dl><div class=impl>
-<!--CLEANUP-->
<p>The <dfn id=dom-document-domain title=dom-document-domain><code>domain</code></dfn> attribute on
<code><a href=#document>Document</a></code> objects must be initialized to <a href="#the-document's-domain">the document's domain</a>, if it has
- one, and the empty string otherwise. If <a href="#the-document's-domain">the document's domain</a> starts with a U+005B LEFT SQUARE BRACKET
- character ([) and ends with a U+005D RIGHT SQUARE BRACKET character (]), it is an IPv6 address;
- these square brackets must be omitted when initializing the attribute's value.</p>
+ one, and the empty string otherwise. If <a href="#the-document's-domain">the document's domain</a> starts with a U+005B
+ LEFT SQUARE BRACKET character ([) and ends with a U+005D RIGHT SQUARE BRACKET character (]), it is
+ an IPv6 address; these square brackets must be omitted when initializing the attribute's
+ value.</p>
<p>On getting, the attribute must return its current value, unless the <code><a href=#document>Document</a></code> has
no <a href=#browsing-context>browsing context</a>, in which case it must return the empty string.</p>
@@ -66564,10 +66546,9 @@
<p>If <var title="">new value</var> is not exactly equal to the 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>
-<!--CLEANUP-->
- <p>If the current value is an IPv4 or IPv6 address, throw a <code><a href=#securityerror>SecurityError</a></code> exception and
- abort these steps.</p>
+ <p>If the current value is an IPv4 or IPv6 address, throw a <code><a href=#securityerror>SecurityError</a></code>
+ exception and abort these steps.</p>
</li>
@@ -72107,19 +72088,18 @@
<!-- SCRIPT EXEC -->
<h4 id=javascript-protocol><span class=secno>7.1.5 </span><dfn title="javascript protocol">The <code title="">javascript:</code> URL scheme</dfn></h4>
- <p>When a <a href=#url>URL</a> using the <code title="">javascript:</code> scheme is <dfn id=concept-js-deref title=concept-js-deref>dereferenced</dfn>, the user agent must run
- the following steps:</p>
+ <p>When a <a href=#url>URL</a> using the <code title="">javascript:</code> scheme 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
- content retrieval operation defined for <code title="">javascript:</code> URLs. <a href=#refsJSURL>[JSURL]</a></li>
+ <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>
<li>
<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>
- URL, and the <a href=#source-browsing-context>source browsing context</a> for that
- navigation, if any, has <a href=#concept-bc-noscript title=concept-bc-noscript>scripting disabled</a></dt>
+ <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=#source-browsing-context>source browsing context</a> for that navigation,
+ if any, has <a href=#concept-bc-noscript title=concept-bc-noscript>scripting disabled</a></dt>
<dd>
@@ -72127,66 +72107,50 @@
</dd>
- <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>
+ <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>
<dd>
<!-- http://www.hixie.ch/tests/adhoc/html/navigation/javascript-url/ -->
- <p>Let <var title="">address</var> be the <a href="#the-document's-address" title="the
- document's address">address</a> of the <a href=#active-document>active
- document</a> of the <a href=#browsing-context>browsing context</a> being
- navigated.</p>
+ <p>Let <var title="">address</var> be the <a href="#the-document's-address" title="the document's address">address</a>
+ of the <a href=#active-document>active document</a> of the <a href=#browsing-context>browsing context</a> being navigated.</p>
- <p>If <var title="">address</var> is <code><a href=#about:blank>about:blank</a></code>,
- and the <a href=#browsing-context>browsing context</a> being navigated has a
- <a href=#creator-browsing-context>creator browsing context</a>, then let <var title="">address</var> be the <a href="#the-document's-address" title="the document's
- address">address</a> of the <a href=#creator-document>creator
- <code>Document</code></a> instead.</p>
+ <p>If <var title="">address</var> is <code><a href=#about:blank>about:blank</a></code>, and the <a href=#browsing-context>browsing
+ context</a> being navigated has a <a href=#creator-browsing-context>creator browsing context</a>, then let <var title="">address</var> be the <a href="#the-document's-address" title="the document's address">address</a> of the
+ <a href=#creator-document>creator <code>Document</code></a> instead.</p>
- <p><a href=#create-a-script-from-a-node title="create a script from a node">Create a
- script</a> from the <code><a href=#document>Document</a></code> node of the
- <a href=#active-document>active document</a>, using the aforementioned script
- source, the <a href=#url>URL</a> of the resource where the
- <code>javascript:</code> URL, was found, and assuming the
- scripting language is JavaScript.</p>
+ <p><a href=#create-a-script-from-a-node title="create a script from a node">Create a script</a> from the
+ <code><a href=#document>Document</a></code> node of the <a href=#active-document>active document</a>, using the aforementioned
+ script source, the <a href=#url>URL</a> of the resource where the <code>javascript:</code> URL,
+ was found, and assuming the scripting language is JavaScript.</p>
- <p>Let <var title="">result</var> be the return value of the
- <i><a href=#initial-code-entry-point>initial code entry-point</a></i> of this <a href=#concept-script title=concept-script>script</a>. If an exception was
- thrown, let <var title="">result</var> be void instead. (The
- result will be void also if <a href=#concept-bc-noscript title=concept-bc-noscript>scripting is disabled</a>.)</p>
+ <p>Let <var title="">result</var> be the return value of the <i><a href=#initial-code-entry-point>initial code entry-point</a></i>
+ of this <a href=#concept-script title=concept-script>script</a>. If an exception was thrown, let <var title="">result</var> be void instead. (The result will be void also if <a href=#concept-bc-noscript title=concept-bc-noscript>scripting is disabled</a>.)</p>
- <p>When it comes time to <a href="#set-the-document's-address">set the document's address</a>
- in the <a href=#navigate title=navigate>navigation algorithm</a>, use
- <var title="">address</var> as the <a href=#override-url>override
- URL</a>.</p>
+ <p>When it comes time to <a href="#set-the-document's-address">set the document's address</a> in the <a href=#navigate title=navigate>navigation algorithm</a>, use <var title="">address</var> as the
+ <a href=#override-url>override URL</a>.</p>
</dd>
-<!--(turns out only Firefox does this, and only for <img src=""> and a
- few others, so it's commented out for now pending someone having
- a convincing use case)
+<!--(turns out only Firefox does this, and only for <img src=""> and a few others, so it's commented
+ out for now pending someone having a convincing use case)
- <dt>If the <code>Document</code> object of the element,
- attribute, or style sheet from which the <code>javascript:</code>
- URL was reached has an associated <span>browsing
+ <dt>If the <code>Document</code> object of the element, attribute, or style sheet from which
+ the <code>javascript:</code> URL was reached has an associated <span>browsing
context</span></dt>
<dd>
- <p><span>Create an impotent script</span> using the
- aforementioned script source, with the scripting language set to
- JavaScript, and with the <code>Document</code>'s object's
+ <p><span>Create an impotent script</span> using the aforementioned script source, with the
+ scripting language set to JavaScript, and with the <code>Document</code>'s object's
<span>browsing context</span> as the browsing context.</p>
- <p>Let <var title="">result</var> be the return value of the
- <i>initial code entry-point</i> of this <span
- title="concept-script">script</span>. If an exception was
- thrown, let <var title="">result</var> be void instead. (The
- result will be void also if <span
+ <p>Let <var title="">result</var> be the return value of the <i>initial code entry-point</i>
+ of this <span title="concept-script">script</span>. If an exception was thrown, let <var
+ title="">result</var> be void instead. (The result will be void also if <span
title="concept-bc-noscript">scripting is disabled</span>.)</p>
</dd>
@@ -72204,38 +72168,31 @@
<li>
- <p>If the result of executing the script is void (there is no
- return value), then the URL must be treated in a manner equivalent
- to an HTTP resource with an HTTP 204 No Content response.</p>
+ <p>If the result of executing the script is void (there is no return value), then the URL must
+ be treated in a manner equivalent to an HTTP resource with an HTTP 204 No Content response.</p>
- <p>Otherwise, the URL must be treated in a manner equivalent to an
- HTTP resource with a 200 OK response whose <a href=#content-type title=Content-Type>Content-Type metadata</a> is
- <code><a href=#text/html>text/html</a></code> and whose response body is the return value
- converted to a string value.</p>
+ <p>Otherwise, the URL must be treated in a manner equivalent to an HTTP resource with a 200 OK
+ response whose <a href=#content-type title=Content-Type>Content-Type metadata</a> is <code><a href=#text/html>text/html</a></code>
+ and whose response body is the return value converted to a string value.</p>
- <p class=note>Certain contexts, in particular <code><a href=#the-img-element>img</a></code>
- elements, ignore the <a href=#content-type title=Content-Type>Content-Type
- metadata</a>.</p>
+ <p class=note>Certain contexts, in particular <code><a href=#the-img-element>img</a></code> elements, ignore the <a href=#content-type title=Content-Type>Content-Type metadata</a>.</p>
</li>
</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
- empty object as soon as the attribute is set; it would then be
- sniffed to determine the image type and decoded as an image.</p>
+ <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 empty object as soon as the attribute is set; it would then be sniffed to
+ determine the image type and decoded as an image.</p>
- <p>A <code title="">javascript:</code> URL in an <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute of an <code><a href=#the-a-element>a</a></code>
- element would only be evaluated when the link was <a href=#following-hyperlinks title="following hyperlinks">followed</a>.</p>
+ <p>A <code title="">javascript:</code> URL in an <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code>
+ attribute of an <code><a href=#the-a-element>a</a></code> element would only be evaluated when the link was <a href=#following-hyperlinks title="following hyperlinks">followed</a>.</p>
- <p>The <code title=attr-iframe-src><a href=#attr-iframe-src>src</a></code> attribute of an
- <code><a href=#the-iframe-element>iframe</a></code> element would be evaluated in the context of
- the <code><a href=#the-iframe-element>iframe</a></code>'s own <a href=#browsing-context>browsing context</a>; once
- evaluated, its return value (if it was not void) would replace that
- <a href=#browsing-context>browsing context</a>'s document, thus changing the
- variables visible in that <a href=#browsing-context>browsing context</a>.</p>
+ <p>The <code title=attr-iframe-src><a href=#attr-iframe-src>src</a></code> attribute of an <code><a href=#the-iframe-element>iframe</a></code> element would
+ be evaluated in the context of the <code><a href=#the-iframe-element>iframe</a></code>'s own <a href=#browsing-context>browsing context</a>; once
+ evaluated, its return value (if it was not void) would replace that <a href=#browsing-context>browsing
+ context</a>'s document, thus changing the variables visible in that <a href=#browsing-context>browsing
+ context</a>.</p>
</div>
@@ -73120,8 +73077,8 @@
<dd>
- <p>Schedules a timeout to run <var title="">handler</var> after
- <var title="">timeout</var> milliseconds. Any <var title="">arguments</var> are passed straight through to the <var title="">handler</var>.</p>
+ <p>Schedules a timeout to run <var title="">handler</var> after <var title="">timeout</var>
+ milliseconds. Any <var title="">arguments</var> are passed straight through to the <var title="">handler</var>.</p>
</dd>
@@ -73129,8 +73086,7 @@
<dd>
- <p>Schedules a timeout to compile and run <var title="">code</var>
- after <var title="">timeout</var> milliseconds.</p>
+ <p>Schedules a timeout to compile and run <var title="">code</var> after <var title="">timeout</var> milliseconds.</p>
</dd>
@@ -73138,7 +73094,8 @@
<dd>
- <p>Cancels the timeout set with <code title=dom-windowtimers-setTimeout><a href=#dom-windowtimers-settimeout>setTimeout()</a></code> identified by <var title="">handle</var>.</p>
+ <p>Cancels the timeout set with <code title=dom-windowtimers-setTimeout><a href=#dom-windowtimers-settimeout>setTimeout()</a></code>
+ identified by <var title="">handle</var>.</p>
</dd>
@@ -73146,8 +73103,8 @@
<dd>
- <p>Schedules a timeout to run <var title="">handler</var> every
- <var title="">timeout</var> milliseconds. Any <var title="">arguments</var> are passed straight through to the <var title="">handler</var>.</p>
+ <p>Schedules a timeout to run <var title="">handler</var> every <var title="">timeout</var>
+ milliseconds. Any <var title="">arguments</var> are passed straight through to the <var title="">handler</var>.</p>
</dd>
@@ -73155,8 +73112,7 @@
<dd>
- <p>Schedules a timeout to compile and run <var title="">code</var>
- every <var title="">timeout</var> milliseconds.</p>
+ <p>Schedules a timeout to compile and run <var title="">code</var> every <var title="">timeout</var> milliseconds.</p>
</dd>
@@ -73425,34 +73381,31 @@
<p>Displays a modal alert with the given message, and waits for the user to dismiss it.</p>
- <p>A call to the <code title=dom-navigator-yieldForStorageUpdates><a href=#dom-navigator-yieldforstorageupdates>navigator.yieldForStorageUpdates()</a></code>
- method is implied when this method is invoked.</p>
+ <p>A call to the <code title=dom-navigator-yieldForStorageUpdates><a href=#dom-navigator-yieldforstorageupdates>navigator.yieldForStorageUpdates()</a></code> method is
+ implied when this method is invoked.</p>
</dd>
<dt><var title="">result</var> = <var title="">window</var> . <code title=dom-confirm><a href=#dom-confirm>confirm</a></code>(<var title="">message</var>)</dt>
<dd>
- <p>Displays a modal OK/Cancel prompt with the given message, waits
- for the user to dismiss it, and returns true if the user clicks OK
- and false if the user clicks Cancel.</p>
+ <p>Displays a modal OK/Cancel prompt with the given message, waits for the user to dismiss it,
+ and returns true if the user clicks OK and false if the user clicks Cancel.</p>
- <p>A call to the <code title=dom-navigator-yieldForStorageUpdates><a href=#dom-navigator-yieldforstorageupdates>navigator.yieldForStorageUpdates()</a></code>
- method is implied when this method is invoked.</p>
+ <p>A call to the <code title=dom-navigator-yieldForStorageUpdates><a href=#dom-navigator-yieldforstorageupdates>navigator.yieldForStorageUpdates()</a></code> method is
+ implied when this method is invoked.</p>
</dd>
<dt><var title="">result</var> = <var title="">window</var> . <code title=dom-prompt><a href=#dom-prompt>prompt</a></code>(<var title="">message</var> [, <var title="">default</var>] )</dt>
<dd>
- <p>Displays a modal text field prompt with the given message,
- waits for the user to dismiss it, and returns the value that the
- user entered. If the user cancels the prompt, then returns null
- instead. If the second argument is present, then the given value
- is used as a default.</p>
+ <p>Displays a modal text field prompt with the given message, waits for the user to dismiss it,
+ and returns the value that the user entered. If the user cancels the prompt, then returns null
+ instead. If the second argument is present, then the given value is used as a default.</p>
- <p>A call to the <code title=dom-navigator-yieldForStorageUpdates><a href=#dom-navigator-yieldforstorageupdates>navigator.yieldForStorageUpdates()</a></code>
- method is implied when this method is invoked.</p>
+ <p>A call to the <code title=dom-navigator-yieldForStorageUpdates><a href=#dom-navigator-yieldforstorageupdates>navigator.yieldForStorageUpdates()</a></code> method is
+ implied when this method is invoked.</p>
</dd>
@@ -73527,54 +73480,46 @@
<p>Prompts the user to print the page.</p>
- <p>A call to the <code title=dom-navigator-yieldForStorageUpdates><a href=#dom-navigator-yieldforstorageupdates>navigator.yieldForStorageUpdates()</a></code>
- method is implied when this method is invoked.</p>
+ <p>A call to the <code title=dom-navigator-yieldForStorageUpdates><a href=#dom-navigator-yieldforstorageupdates>navigator.yieldForStorageUpdates()</a></code> method is
+ implied when this method is invoked.</p>
</dd>
</dl><div class=impl>
- <p>When the <dfn id=dom-print title=dom-print><code>print()</code></dfn> method
- is invoked, if the <code><a href=#document>Document</a></code> is <a href=#ready-for-post-load-tasks>ready for
- post-load tasks</a>, then the user agent must synchronously run
- the <a href=#printing-steps>printing steps</a>. Otherwise, the user agent must only
- set the <dfn id=print-when-loaded>print when loaded</dfn> flag on the
- <code><a href=#document>Document</a></code>.</p>
+ <p>When the <dfn id=dom-print title=dom-print><code>print()</code></dfn> method is invoked, if the
+ <code><a href=#document>Document</a></code> is <a href=#ready-for-post-load-tasks>ready for post-load tasks</a>, then the user agent must
+ synchronously run the <a href=#printing-steps>printing steps</a>. Otherwise, the user agent must only set the
+ <dfn id=print-when-loaded>print when loaded</dfn> flag on the <code><a href=#document>Document</a></code>.</p>
<!--TOPIC:HTML-->
- <p>User agents should also run the <a href=#printing-steps>printing steps</a>
- whenever the user asks for the opportunity to <a href=#obtain-a-physical-form>obtain a
- physical form</a> (e.g. printed copy), or the representation of a
+ <p>User agents should also run the <a href=#printing-steps>printing steps</a> whenever the user asks for the
+ opportunity to <a href=#obtain-a-physical-form>obtain a physical form</a> (e.g. printed copy), or the representation of a
physical form (e.g. PDF copy), of a document.</p>
<p>The <dfn id=printing-steps>printing steps</dfn> are as follows:</p>
<ol><li>
- <p>The user agent may display a message to the user or
- abort these steps (or both).</p>
+ <p>The user agent may display a message to the user or abort these steps (or both).</p>
- <p class=example>For instance, a kiosk browser could silently
- ignore any invocations of the <code title=dom-print><a href=#dom-print>print()</a></code> method.</p>
+ <p class=example>For instance, a kiosk browser could silently ignore any invocations of the
+ <code title=dom-print><a href=#dom-print>print()</a></code> method.</p>
- <p class=example>For instance, a browser on a mobile device
- could detect that there are no printers in the vicinity and
- display a message saying so before continuing to offer a "save to
+ <p class=example>For instance, a browser on a mobile device could detect that there are no
+ printers in the vicinity and display a message saying so before continuing to offer a "save to
PDF" option.</p>
</li>
<li>
- <p>The user agent must <a href=#fire-a-simple-event>fire a simple event</a> named
- <code title=event-beforeprint>beforeprint</code> at the
- <code><a href=#window>Window</a></code> object of the <code><a href=#document>Document</a></code> that is
- being printed, as well as any <a href=#nested-browsing-context title="nested browsing
+ <p>The user agent must <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-beforeprint>beforeprint</code> at the <code><a href=#window>Window</a></code> object of the
+ <code><a href=#document>Document</a></code> that is being printed, as well as any <a href=#nested-browsing-context title="nested browsing
context">nested browsing contexts</a> in it.</p>
- <p class=example>The <code title=event-beforeprint>beforeprint</code> event can be used
- to annotate the printed copy, for instance adding the time at
- which the document was printed.</p>
+ <p class=example>The <code title=event-beforeprint>beforeprint</code> event can be used to
+ annotate the printed copy, for instance adding the time at which the document was printed.</p>
</li>
@@ -73586,32 +73531,25 @@
<li>
- <p>The user agent should offer the user the opportunity to
- <a href=#obtain-a-physical-form>obtain a physical form</a> (or the representation of a
- physical form) of the document. The user agent may wait for the
- user to either accept or decline before returning; if so, the user
- agent must <a href=#pause>pause</a> while the method is waiting. Even if
- the user agent doesn't wait at this point, the user agent must use
- the state of the relevant documents as they are at this point in
- the algorithm if and when it eventually creates the alternate
- form.</p>
+ <p>The user agent should offer the user the opportunity to <a href=#obtain-a-physical-form>obtain a physical form</a>
+ (or the representation of a physical form) of the document. The user agent may wait for the user
+ to either accept or decline before returning; if so, the user agent must <a href=#pause>pause</a>
+ while the method is waiting. Even if the user agent doesn't wait at this point, the user agent
+ must use the state of the relevant documents as they are at this point in the algorithm if and
+ when it eventually creates the alternate form.</p>
</li>
<li>
- <p>The user agent must <a href=#fire-a-simple-event>fire a simple event</a> named
- <code title=event-afterprint>afterprint</code> at the
- <code><a href=#window>Window</a></code> object of the <code><a href=#document>Document</a></code> that is
- being printed, as well as any <a href=#nested-browsing-context title="nested browsing
+ <p>The user agent must <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-afterprint>afterprint</code> at the <code><a href=#window>Window</a></code> object of the
+ <code><a href=#document>Document</a></code> that is being printed, as well as any <a href=#nested-browsing-context title="nested browsing
context">nested browsing contexts</a> in it.</p>
- <p class=example>The <code title=event-afterprint>afterprint</code> event can be used
- to revert annotations added in the earlier event, as well as
- showing post-printing UI. For instance, if a page is walking the
- user through the steps of applying for a home loan, the script
- could automatically advance to the next step after having printed
- a form or other.</p>
+ <p class=example>The <code title=event-afterprint>afterprint</code> event can be used to
+ revert annotations added in the earlier event, as well as showing post-printing UI. For
+ instance, if a page is walking the user through the steps of applying for a home loan, the
+ script could automatically advance to the next step after having printed a form or other.</p>
</li>
@@ -73695,8 +73633,8 @@
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>
<li>have an <a href=#active-document>active document</a> whose <a href=#origin>origin</a> is the <a href=#same-origin title="same
- origin">same</a> as <var title="">incumbent origin</var>,</li> <!-- Note that changing document.domain to talk to another domain doesn't make you
- able to block that domain -->
+ origin">same</a> as <var title="">incumbent origin</var>,</li> <!-- Note that changing
+ 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
of the browsing contexts matching those conditions.</p>
@@ -73916,17 +73854,14 @@
readonly attribute DOMString <a href=#dom-navigator-useragent title=dom-navigator-userAgent>userAgent</a>;
};</pre>
- <p>In certain cases, despite the best efforts of the entire
- industry, Web browsers have bugs and limitations that Web authors
- are forced to work around.</p>
+ <p>In certain cases, despite the best efforts of the entire industry, Web browsers have bugs and
+ limitations that Web authors are forced to work around.</p>
- <p>This section defines a collection of attributes that can be used
- to determine, from script, the kind of user agent in use, in order
- to work around these issues.</p>
+ <p>This section defines a collection of attributes that can be used to determine, from script, the
+ kind of user agent in use, in order to work around these issues.</p>
- <p>Client detection should always be limited to detecting known
- current versions; future versions and unknown versions should always
- be assumed to be fully compliant.</p>
+ <p>Client detection should always be limited to detecting known current versions; future versions
+ and unknown versions should always be assumed to be fully compliant.</p>
<dl class=domintro><dt><var title="">window</var> . <code title=dom-navigator><a href=#dom-navigator>navigator</a></code> . <code title=dom-navigator-appCodeName><a href=#dom-navigator-appcodename>appCodeName</a></code></dt>
<dd>
@@ -74000,11 +73935,10 @@
<!-- vendorSub: Mozilla and Safari only; always returns "" -->
- </dl><!-- similar paragraph in next section --><p class=warning>Any information in this API that varies from user
- to user can be used to profile the user. In fact, if enough such
- information is available, a user can actually be uniquely
- identified. For this reason, user agent implementors are strongly
- urged to include as little information in this API as possible.
+ </dl><!-- similar paragraph in next section --><p class=warning>Any information in this API that varies from user to user can be used to
+ profile the user. In fact, if enough such information is available, a user can actually be
+ uniquely identified. For this reason, user agent implementors are strongly urged to include as
+ little information in this API as possible.
<a href=#fingerprinting-vector class=fingerprint title="fingerprinting vector"><img src=http://images.whatwg.org/fingerprint.png width=46 alt="(This is a fingerprinting vector.)" height=64></a>
</p>
@@ -74604,18 +74538,16 @@
<dd>
<p>If a script uses the <code title=dom-document-cookie><a href=#dom-document-cookie>document.cookie</a></code> API, or the
- <code title=dom-localStorage><a href=#dom-localstorage>localStorage</a></code> API, the
- browser will block other scripts from accessing cookies or storage
- until the first script finishes.
+ <code title=dom-localStorage><a href=#dom-localstorage>localStorage</a></code> API, the browser will block other scripts
+ from accessing cookies or storage until the first script finishes.
</p>
- <p>Calling the <code title=dom-navigator-yieldForStorageUpdates><a href=#dom-navigator-yieldforstorageupdates>navigator.yieldForStorageUpdates()</a></code>
- method tells the user agent to unblock any other scripts that may
- be blocked, even though the script hasn't returned.</p>
+ <p>Calling the <code title=dom-navigator-yieldForStorageUpdates><a href=#dom-navigator-yieldforstorageupdates>navigator.yieldForStorageUpdates()</a></code> method
+ tells the user agent to unblock any other scripts that may be blocked, even though the script
+ hasn't returned.</p>
- <p>Values of cookies and items in the <code><a href=#storage-0>Storage</a></code> objects
- of <code title=dom-localStorage><a href=#dom-localstorage>localStorage</a></code> attributes
- can change after calling this method, whence its name.
+ <p>Values of cookies and items in the <code><a href=#storage-0>Storage</a></code> objects of <code title=dom-localStorage><a href=#dom-localstorage>localStorage</a></code> attributes can change after calling this method,
+ whence its name.
</p>
</dd>
@@ -81428,7 +81360,7 @@
push</a>.</p>
-<!--CLEANUP-->
+
<h4 id=the-eventsource-interface><span class=secno>10.2.2 </span>The <code><a href=#eventsource>EventSource</a></code> interface</h4>
<pre class=idl>[<a href=#dom-eventsource title=dom-EventSource>Constructor</a>(DOMString url, optional <a href=#eventsourceinit>EventSourceInit</a> eventSourceInitDict)]
@@ -81453,16 +81385,13 @@
boolean <dfn id=dom-eventsourceinit-withcredentials title=dom-EventSourceInit-withCredentials>withCredentials</dfn> = false;
};</pre>
- <p>The <dfn id=dom-eventsource title=dom-EventSource><code>EventSource()</code></dfn>
- constructor takes one or two arguments. The first specifies the
- <a href=#url>URL</a> to which to connect. The second specifies the
- settings, if any, in the form of an <code><a href=#eventsourceinit>EventSourceInit</a></code>
- dictionary. When the <code>EventSource()</code> constructor is
- invoked, the UA must run these steps:</p>
+ <p>The <dfn id=dom-eventsource title=dom-EventSource><code>EventSource()</code></dfn> constructor takes one or two
+ arguments. The first specifies the <a href=#url>URL</a> to which to connect. The second specifies the
+ settings, if any, in the form of an <code><a href=#eventsourceinit>EventSourceInit</a></code> dictionary. When the
+ <code>EventSource()</code> constructor is invoked, the UA must run these steps:</p>
- <ol><li><p><a href=#resolve-a-url title="resolve a url">Resolve</a> the
- <a href=#url>URL</a> specified in the first argument, relative to the
- <a href=#entry-script>entry script</a>'s <a href="#script's-base-url" title="script's base URL">base
+ <ol><li><p><a href=#resolve-a-url title="resolve a url">Resolve</a> the <a href=#url>URL</a> specified in the first
+ argument, relative to the <a href=#entry-script>entry script</a>'s <a href="#script's-base-url" title="script's base URL">base
URL</a>.
</li>
@@ -81473,138 +81402,116 @@
<li><p>Let <var title="">CORS mode</var> be <a href=#attr-crossorigin-anonymous title=attr-crossorigin-anonymous>Anonymous</a>.</li>
- <li><p>If the second argument is present, and the <code title=dom-EventSourceInit-withCredentials><a href=#dom-eventsourceinit-withcredentials>withCredentials</a></code>
- dictionary member has the value true, then set <var title="">CORS
- mode</var> to <a href=#attr-crossorigin-use-credentials title=attr-crossorigin-use-credentials>Use
- Credentials</a> and initialize the new <code><a href=#eventsource>EventSource</a></code>
- object's <code title=dom-EventSource-withCredentials><a href=#dom-eventsource-withcredentials>withCredentials</a></code>
- attribute to true.</li>
+ <li><p>If the second argument is present, and the <code title=dom-EventSourceInit-withCredentials><a href=#dom-eventsourceinit-withcredentials>withCredentials</a></code> dictionary member has the
+ value true, then set <var title="">CORS mode</var> to <a href=#attr-crossorigin-use-credentials title=attr-crossorigin-use-credentials>Use Credentials</a> and initialize the new
+ <code><a href=#eventsource>EventSource</a></code> object's <code title=dom-EventSource-withCredentials><a href=#dom-eventsource-withcredentials>withCredentials</a></code> attribute to true.</li>
- <li><p>Return the new <code><a href=#eventsource>EventSource</a></code> object, but continue
- these steps asynchronously.</li>
+ <li><p>Return the new <code><a href=#eventsource>EventSource</a></code> object, but continue these steps
+ asynchronously.</li>
<li><!-- if you change this, don't forget to update the
reconnecting fetch lower down as well! -->
- <p>Do a <a href=#potentially-cors-enabled-fetch>potentially CORS-enabled fetch</a><!--FETCH--> of
- the resulting <a href=#absolute-url>absolute URL</a> using the <a href=#entry-script>entry
- script</a>'s <a href="#script's-referrer-source" title="script's referrer source">referrer
- source</a>, with the <i>mode</i> being <var title="">CORS
- mode</var>, and the <i title="">origin</i> being the <a href=#entry-script>entry
- script</a>'s <a href=#origin>origin</a><!--, and the <i>default origin
- behaviour</i> set to <i>fail</i> (though it has no effect in the
- "Anonymous" and "Use Credentials" modes)-->, and process the
- resource obtained in this fashion, if any, as described below.</p>
+ <p>Do a <a href=#potentially-cors-enabled-fetch>potentially CORS-enabled fetch</a><!--FETCH--> of the resulting <a href=#absolute-url>absolute
+ URL</a> using the <a href=#entry-script>entry script</a>'s <a href="#script's-referrer-source" title="script's referrer source">referrer
+ source</a>, with the <i>mode</i> being <var title="">CORS mode</var>, and the <i title="">origin</i> being the <a href=#entry-script>entry script</a>'s <a href=#origin>origin</a><!--, and the
+ <i>default origin behaviour</i> set to <i>fail</i> (though it has no effect in the "Anonymous"
+ and "Use Credentials" modes)-->, and process the resource obtained in this fashion, if any, as
+ described below.</p>
- <p class=note>The definition of the <a href=#fetch title=fetch>fetching</a> algorithm (which is used by CORS) is
- such that if the browser is already fetching the resource
- identified by the given <a href=#absolute-url>absolute URL</a>, that connection
- can be reused, instead of a new connection being established. All
- messages received up to this point are dispatched immediately, in
- this case.</p>
+ <p class=note>The definition of the <a href=#fetch title=fetch>fetching</a> algorithm (which is
+ used by CORS) is such that if the browser is already fetching the resource identified by the
+ given <a href=#absolute-url>absolute URL</a>, that connection can be reused, instead of a new connection
+ being established. All messages received up to this point are dispatched immediately, in this
+ case.</p>
</li>
- </ol><hr><p>The <dfn id=dom-eventsource-url title=dom-EventSource-url><code>url</code></dfn>
- attribute must return the <a href=#absolute-url>absolute URL</a> that resulted
- from <a href=#resolve-a-url title="resolve a url">resolving</a> the value that was
- passed to the constructor.</p> <!-- not the result of redirects,
- since that would introduce race conditions -->
+ </ol><hr><p>The <dfn id=dom-eventsource-url title=dom-EventSource-url><code>url</code></dfn> attribute must return the
+ <a href=#absolute-url>absolute URL</a> that resulted from <a href=#resolve-a-url title="resolve a url">resolving</a> the
+ value that was passed to the constructor.</p> <!-- not the result of redirects, since that would
+ introduce race conditions -->
- <p>The <dfn id=dom-eventsource-withcredentials title=dom-EventSource-withCredentials><code>withCredentials</code></dfn>
- attribute must return the value to which it was last initialized.
- When the object is created, it must be initialized to false.</p>
+ <p>The <dfn id=dom-eventsource-withcredentials title=dom-EventSource-withCredentials><code>withCredentials</code></dfn> attribute
+ must return the value to which it was last initialized. When the object is created, it must be
+ initialized to false.</p>
- <p>The <dfn id=dom-eventsource-readystate title=dom-EventSource-readyState><code>readyState</code></dfn>
- attribute represents the state of the connection. It can have the
- following values:</p>
+ <p>The <dfn id=dom-eventsource-readystate title=dom-EventSource-readyState><code>readyState</code></dfn> attribute represents
+ the state of the connection. It can have the following values:</p>
<dl><dt><dfn id=dom-eventsource-connecting title=dom-EventSource-CONNECTING><code>CONNECTING</code></dfn> (numeric value 0)</dt>
- <dd>The connection has not yet been established, or it was closed
- and the user agent is reconnecting.</dd>
+ <dd>The connection has not yet been established, or it was closed and the user agent is
+ reconnecting.</dd>
<dt><dfn id=dom-eventsource-open title=dom-EventSource-OPEN><code>OPEN</code></dfn> (numeric value 1)</dt>
- <dd>The user agent has an open connection and is dispatching events
- as it receives them.</dd>
+ <dd>The user agent has an open connection and is dispatching events as it receives them.</dd>
<dt><dfn id=dom-eventsource-closed title=dom-EventSource-CLOSED><code>CLOSED</code></dfn> (numeric value 2)</dt>
- <dd>The connection is not open, and the user agent is not trying to
- reconnect. Either there was a fatal error or the <code title=dom-EventSource-close><a href=#dom-eventsource-close>close()</a></code> method was
- invoked.</dd>
+ <dd>The connection is not open, and the user agent is not trying to reconnect. Either there was a
+ fatal error or the <code title=dom-EventSource-close><a href=#dom-eventsource-close>close()</a></code> method was invoked.</dd>
- </dl><p>When the object is created its <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> must be set to
- <code title=dom-EventSource-CONNECTING><a href=#dom-eventsource-connecting>CONNECTING</a></code> (0). The
- rules given below for handling the connection define when the value
- changes.</p>
+ </dl><p>When the object is created its <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> must
+ be set to <code title=dom-EventSource-CONNECTING><a href=#dom-eventsource-connecting>CONNECTING</a></code> (0). The rules given below
+ for handling the connection define when the value changes.</p>
- <p>The <dfn id=dom-eventsource-close title=dom-EventSource-close><code>close()</code></dfn>
- method must abort any instances of the <a href=#fetch>fetch</a> algorithm
- started for this <code><a href=#eventsource>EventSource</a></code> object, and must set the
- <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute
- to <code title=dom-EventSource-CLOSED><a href=#dom-eventsource-closed>CLOSED</a></code>.</p> <!-- this
- also causes all the message events to stop firing, even if they were
- queued before close() was called -->
+ <p>The <dfn id=dom-eventsource-close title=dom-EventSource-close><code>close()</code></dfn> method must abort any
+ instances of the <a href=#fetch>fetch</a> algorithm started for this <code><a href=#eventsource>EventSource</a></code> object,
+ and must set the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute to <code title=dom-EventSource-CLOSED><a href=#dom-eventsource-closed>CLOSED</a></code>.</p> <!-- this also causes all the message events to
+ stop firing, even if they were queued before close() was called -->
- <p>The following are the <a href=#event-handlers>event handlers</a> (and their
- corresponding <a href=#event-handler-event-type title="event handler event type">event handler
- event types</a>) that must be supported, as <a href=#event-handler-idl-attributes>event handler IDL attributes</a>, by
- all objects implementing the <code><a href=#eventsource>EventSource</a></code> interface:</p>
+ <p>The following are the <a href=#event-handlers>event handlers</a> (and their corresponding <a href=#event-handler-event-type title="event
+ handler event type">event handler event types</a>) that must be supported, as <a href=#event-handler-idl-attributes>event
+ handler IDL attributes</a>, by all objects implementing the <code><a href=#eventsource>EventSource</a></code>
+ interface:</p>
<table><thead><tr><th><a href=#event-handlers title="event handlers">Event handler</a> <th><a href=#event-handler-event-type>Event handler event type</a>
<tbody><tr><td><dfn id=handler-eventsource-onopen title=handler-EventSource-onopen><code>onopen</code></dfn> <td> <code title=event-open>open</code>
<tr><td><dfn id=handler-eventsource-onmessage title=handler-EventSource-onmessage><code>onmessage</code></dfn> <td> <code title=event-message><a href=#event-message>message</a></code>
<tr><td><dfn id=handler-eventsource-onerror title=handler-EventSource-onerror><code>onerror</code></dfn> <td> <code title=event-error>error</code>
- </table><hr><p>In addition to the above, each <code><a href=#eventsource>EventSource</a></code> object
- has the following associated with it:</p>
+ </table><hr><p>In addition to the above, each <code><a href=#eventsource>EventSource</a></code> object has the following associated
+ with it:</p>
- <ul><li>A <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
+ <ul><li>A <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>
- <li>A <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>
+ <li>A <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>These values are not currently exposed on the interface.</p>
<h4 id=processing-model-7><span class=secno>10.2.3 </span>Processing model</h4>
- <p>The resource indicated in the argument to the <code title=dom-EventSource><a href=#dom-eventsource>EventSource</a></code> constructor is <a href=#fetch title=fetch>fetched</a> when the constructor is run.</p>
+ <p>The resource indicated in the argument to the <code title=dom-EventSource><a href=#dom-eventsource>EventSource</a></code>
+ constructor is <a href=#fetch title=fetch>fetched</a> when the constructor is run.</p>
- <p>For HTTP connections, the <code title="">Accept</code> header may
- be included; if included, it must contain only formats of event
- framing that are supported by the user agent (one of which must be
- <code><a href=#text/event-stream>text/event-stream</a></code>, as described below).</p>
+ <p>For HTTP connections, the <code title="">Accept</code> header may be included; if included, it
+ must contain only formats of event framing that are supported by the user agent (one of which must
+ be <code><a href=#text/event-stream>text/event-stream</a></code>, as described below).</p>
<p>If the event source's <a href=#concept-event-stream-last-event-id title=concept-event-stream-last-event-id>last event ID
- string</a> is not the empty string, then a <code title=http-last-event-id><a href=#last-event-id>Last-Event-ID</a></code> HTTP header must be
- included with the request, whose value is the value of the event
- source's <a href=#concept-event-stream-last-event-id title=concept-event-stream-last-event-id>last event
- ID string</a>, encoded as UTF-8.</p>
+ string</a> is not the empty string, then a <code title=http-last-event-id><a href=#last-event-id>Last-Event-ID</a></code> HTTP header must be included with the request,
+ whose value is the value of the event source's <a href=#concept-event-stream-last-event-id title=concept-event-stream-last-event-id>last event ID string</a>, encoded as UTF-8.</p>
- <p>User agents should use the <code>Cache-Control: no-cache</code>
- header in requests to bypass any caches for requests of event
- sources. (This header is not a <a href=#custom-request-headers title="custom request
- headers">custom request header</a>, so the user agent will still
- use the CORS <a href=#simple-cross-origin-request>simple cross-origin request</a> mechanism.)
- User agents should ignore HTTP cache headers in the response, never
- caching event sources.</p>
+ <p>User agents should use the <code>Cache-Control: no-cache</code> header in requests to bypass
+ any caches for requests of event sources. (This header is not a <a href=#custom-request-headers title="custom request
+ headers">custom request header</a>, so the user agent will still use the CORS <a href=#simple-cross-origin-request>simple
+ cross-origin request</a> mechanism.) User agents should ignore HTTP cache headers in the
+ response, never caching event sources.</p>
- <hr><p>As data is received, the <a href=#concept-task title=concept-task>tasks</a>
- queued by the <a href=#networking-task-source>networking task source</a> to handle the data
- must act as follows.</p>
+ <hr><p>As data is received, the <a href=#concept-task title=concept-task>tasks</a> queued by the <a href=#networking-task-source>networking
+ task source</a> to handle the data must act as follows.</p>
- <p>HTTP 200 OK responses with a <a href=#content-type>Content-Type</a> header
- specifying the type <code><a href=#text/event-stream>text/event-stream</a></code>, ignoring any
- <a href=#mime-type>MIME type</a> parameters, must be processed line by line <a href=#event-stream-interpretation>as described below</a>.</p>
+ <p>HTTP 200 OK responses with a <a href=#content-type>Content-Type</a> header specifying the type
+ <code><a href=#text/event-stream>text/event-stream</a></code>, ignoring any <a href=#mime-type>MIME type</a> parameters, must be processed
+ line by line <a href=#event-stream-interpretation>as described below</a>.</p>
- <p>When a successful response with a supported <a href=#mime-type>MIME
- type</a> is received, such that the user agent begins parsing the
- contents of the stream, the user agent must <a href=#announce-the-connection>announce the
+ <p>When a successful response with a supported <a href=#mime-type>MIME type</a> is received, such that the
+ user agent begins parsing the contents of the stream, the user agent must <a href=#announce-the-connection>announce the
connection</a>.</p>
<p>The <a href=#concept-task title=concept-task>task</a> that the <a href=#networking-task-source>networking task source</a> places
@@ -81645,36 +81552,31 @@
<p>For non-HTTP protocols, UAs should act in equivalent ways.</p>
- <hr><p>When a user agent is to <dfn id=announce-the-connection>announce the connection</dfn>, the
- user agent must <a href=#queue-a-task>queue a task</a> which, if the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute is
- set to a value other than <code title=dom-EventSource-CLOSED><a href=#dom-eventsource-closed>CLOSED</a></code>, sets the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute to
- <code title=dom-EventSource-OPEN><a href=#dom-eventsource-open>OPEN</a></code> and <a href=#fire-a-simple-event title="fire
- a simple event">fires a simple event</a> named <code title=event-open>open</code> at the <code><a href=#eventsource>EventSource</a></code>
+ <hr><p>When a user agent is to <dfn id=announce-the-connection>announce the connection</dfn>, the user agent must <a href=#queue-a-task>queue a
+ task</a> which, if the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute is
+ set to a value other than <code title=dom-EventSource-CLOSED><a href=#dom-eventsource-closed>CLOSED</a></code>, sets the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute to <code title=dom-EventSource-OPEN><a href=#dom-eventsource-open>OPEN</a></code> and <a href=#fire-a-simple-event title="fire a simple event">fires a simple
+ event</a> named <code title=event-open>open</code> at the <code><a href=#eventsource>EventSource</a></code>
object.</p>
- <p>When a user agent is to <dfn id=reestablish-the-connection>reestablish the connection</dfn>,
- the user agent must run the following steps. These steps are run
- asynchronously, not as part of a <a href=#concept-task title=concept-task>task</a>. (The tasks that it queues, of
- course, are run like normal tasks and not asynchronously.)</p>
+ <p>When a user agent is to <dfn id=reestablish-the-connection>reestablish the connection</dfn>, the user agent must run the
+ following steps. These steps are run asynchronously, not as part of a <a href=#concept-task title=concept-task>task</a>. (The tasks that it queues, of course, are run like normal tasks
+ and not asynchronously.)</p>
<ol><li>
<p><a href=#queue-a-task>Queue a task</a> to run the following steps:</p>
- <ol><li><p>If the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute is
- set to <code title=dom-EventSource-CLOSED><a href=#dom-eventsource-closed>CLOSED</a></code>, abort
- the task.</li>
+ <ol><li><p>If the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute is set to
+ <code title=dom-EventSource-CLOSED><a href=#dom-eventsource-closed>CLOSED</a></code>, abort the task.</li>
- <li><p>Set the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute to
- <code title=dom-EventSource-CONNECTING><a href=#dom-eventsource-connecting>CONNECTING</a></code>.</li>
+ <li><p>Set the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute to <code title=dom-EventSource-CONNECTING><a href=#dom-eventsource-connecting>CONNECTING</a></code>.</li>
- <li><p><a href=#fire-a-simple-event>Fire a simple event</a> named <code title=event-error>error</code> at the <code><a href=#eventsource>EventSource</a></code>
- object.</li>
+ <li><p><a href=#fire-a-simple-event>Fire a simple event</a> named <code title=event-error>error</code> at the
+ <code><a href=#eventsource>EventSource</a></code> object.</li>
</ol></li>
- <li><p>Wait a delay equal to the reconnection time of the event
- source.</li>
+ <li><p>Wait a delay equal to the reconnection time of the event source.</li>
<li><p>Optionally, wait some more. In particular, if the previous attempt failed, then user
agents might introduce an exponential backoff delay to avoid overloading a potentially already
@@ -81682,25 +81584,20 @@
connectivity, user agents might wait for the operating system to announce that the network
connection has returned before retrying.</li>
- <li><p>Wait until the aforementioned task has run, if it has not
- yet run.</li>
+ <li><p>Wait until the aforementioned task has run, if it has not yet run.</li>
<li>
<p><a href=#queue-a-task>Queue a task</a> to run the following steps:</p>
- <ol><li><p>If the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute is
- not set to <code title=dom-EventSource-CONNECTING><a href=#dom-eventsource-connecting>CONNECTING</a></code>, abort these
- steps.</li>
+ <ol><li><p>If the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute is not set
+ to <code title=dom-EventSource-CONNECTING><a href=#dom-eventsource-connecting>CONNECTING</a></code>, abort these steps.</li>
- <li><p>Perform a <a href=#potentially-cors-enabled-fetch>potentially CORS-enabled
- fetch</a><!--FETCH--> of the <a href=#absolute-url>absolute URL</a> of the
- event source resource, using the same <i><a href=#referrer-source>referrer source</a></i>, and
- with the same <i>mode</i><!--, <i>default origin
- behaviour</i>,--> and <i title="">origin</i>, as those used in
- the original request triggered by the <code title=dom-EventSource><a href=#dom-eventsource>EventSource()</a></code> constructor, and
- process the resource obtained in this fashion, if any, as
- described earlier in this section.</li>
+ <li><p>Perform a <a href=#potentially-cors-enabled-fetch>potentially CORS-enabled fetch</a><!--FETCH--> of the <a href=#absolute-url>absolute
+ URL</a> of the event source resource, using the same <i><a href=#referrer-source>referrer source</a></i>, and with the
+ same <i>mode</i><!--, <i>default origin behaviour</i>,--> and <i title="">origin</i>, as those
+ used in the original request triggered by the <code title=dom-EventSource><a href=#dom-eventsource>EventSource()</a></code> constructor, and process the resource obtained in
+ this fashion, if any, as described earlier in this section.</li>
</ol></li>
@@ -81799,46 +81696,39 @@
<dd>
- <p><a href=#processField>Process the field</a> using the steps
- described below, using the whole line as the field name, and
- the empty string as the field value.</p>
+ <p><a href=#processField>Process the field</a> using the steps described below, using the
+ whole line as the field name, and the empty string as the field value.</p>
</dd>
- </dl><p>Once the end of the file is reached, any pending data must be
- discarded. (If the file ends in the middle of an event, before the
- final empty line, the incomplete event is not dispatched.)</p>
+ </dl><p>Once the end of the file is reached, any pending data must be discarded. (If the file ends in
+ the middle of an event, before the final empty line, the incomplete event is not dispatched.)</p>
- <hr><p id=processField>The steps to <dfn title="">process the
- field</dfn> given a field name and a field value depend on the field
- name, as given in the following list. Field names must be compared
+ <hr><p id=processField>The steps to <dfn title="">process the field</dfn> given a field name and a
+ field value depend on the field 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>
- <dd><p>Set the <var title="">event type</var> buffer to field
- value.</dd>
+ <dd><p>Set the <var title="">event type</var> buffer to field value.</dd>
<dt>If the field name is "data"</dt>
- <dd><p>Append the field value to the <var title="">data</var>
- buffer, then append a single U+000A LINE FEED (LF) character to the
- <var title="">data</var> buffer.</dd>
+ <dd><p>Append the field value to the <var title="">data</var> buffer, then append a single U+000A
+ LINE FEED (LF) character to the <var title="">data</var> buffer.</dd>
<dt>If the field name is "id"</dt>
- <dd><p>Set the <var title="">last event ID</var> buffer to the
- field value.</dd>
+ <dd><p>Set the <var title="">last event ID</var> buffer to the field value.</dd>
<dt>If the field name is "retry"</dt>
- <dd><p>If the field value consists of only <a href=#ascii-digits>ASCII digits</a>, then interpret the
- field value as an integer in base ten, and set the event stream's
- <a href=#concept-event-stream-reconnection-time title=concept-event-stream-reconnection-time>reconnection
- time</a> to that integer. Otherwise, ignore the field.</dd>
+ <dd><p>If the field value consists of only <a href=#ascii-digits>ASCII digits</a>, then interpret the field
+ value as an integer in base ten, and set the event stream's <a href=#concept-event-stream-reconnection-time title=concept-event-stream-reconnection-time>reconnection time</a> to that integer.
+ Otherwise, ignore the field.</dd>
<!-- v2 feature request from Per-Erik Brodin:
> > > Finally, it could be useful to be able to reset the reconnection
@@ -81860,11 +81750,10 @@
<dt>If the field name is "reconnect"</dt>
- <dd><p>If the field value is the empty string, then: <a
- href="#dispatchMessage">dispatch the event</a> as defined below,
- and then drop the connection and immediately reconnect as if the
- <span title="concept-event-stream-reconnection-time">reconnection
- time</span> was zero for this one time.</p></dd>
+ <dd><p>If the field value is the empty string, then: <a href="#dispatchMessage">dispatch the
+ event</a> as defined below, and then drop the connection and immediately reconnect as if the
+ <span title="concept-event-stream-reconnection-time">reconnection time</span> was zero for this
+ one time.</p></dd>
-->
@@ -81872,23 +81761,20 @@
<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
- follows:
+ </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>Set the <a href=#concept-event-stream-last-event-id title=concept-event-stream-last-event-id>last event ID
- string</a> of the event source to the value of the <var title="">last event ID</var> buffer. The buffer does not get reset,
- so the <a href=#concept-event-stream-last-event-id title=concept-event-stream-last-event-id>last event
- ID string</a> of the event source remains set to this value
- until the next time it is set by the server.</li>
+ <ol><li><p>Set the <a href=#concept-event-stream-last-event-id title=concept-event-stream-last-event-id>last event ID string</a> of
+ the event source to the value of the <var title="">last event ID</var> buffer. The buffer does
+ not get reset, so the <a href=#concept-event-stream-last-event-id title=concept-event-stream-last-event-id>last event ID
+ string</a> of the event source remains set to this value until the next time it is set by the
+ server.</li>
- <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
- type</var> buffer to the empty string and abort these
- steps.</li>
+ <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 type</var> buffer to the empty string and
+ abort these steps.</li>
- <li><p>If the <var title="">data</var> buffer's last character is a
- U+000A LINE FEED (LF) character, then remove the last character
- from the <var title="">data</var> buffer.</li>
+ <li><p>If the <var title="">data</var> buffer's last character is a U+000A LINE FEED (LF)
+ character, then remove the last character from the <var title="">data</var> buffer.</li>
<li><p>Create an event that uses the <code><a href=#messageevent>MessageEvent</a></code> interface, with the event type
<code title=event-message><a href=#event-message>message</a></code>, which does not bubble, is not cancelable, and has no
@@ -81898,22 +81784,22 @@
<a href=#concept-event-stream-last-event-id title=concept-event-stream-last-event-id>last event ID string</a> of the event source.
This event is not <a href=#concept-events-trusted title=concept-events-trusted>trusted</a>.</li>
- <li><p>If the <var title="">event type</var> buffer has a value
- other than the empty string, change the <a href=#concept-event-type title=concept-event-type>type</a> of the newly created event
- to equal the value of the <var title="">event type</var>
- buffer.</li>
+ <li><p>If the <var title="">event type</var> buffer has a value other than the empty string,
+ change the <a href=#concept-event-type title=concept-event-type>type</a> of the newly created event to equal the
+ value of the <var title="">event type</var> buffer.</li>
- <li><p>Set the <var title="">data</var> buffer and the <var title="">event type</var> buffer to the empty string.</li>
+ <li><p>Set the <var title="">data</var> buffer and the <var title="">event type</var> buffer to
+ the empty string.</li>
<li><p><a href=#queue-a-task>Queue a task</a> which, if the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute is set to a value other than <code title=dom-EventSource-CLOSED><a href=#dom-eventsource-closed>CLOSED</a></code>, <a href=#concept-event-dispatch title=concept-event-dispatch>dispatches</a> the newly created event at the
<code><a href=#eventsource>EventSource</a></code> object.</li> <!-- so calling close() drops the messages immediately.
The connection dying doesn't interfere with already-sent messages since it sets us to CLOSED via
a task, not synchronously -->
- </ol><p class=note>If an event doesn't have an "id" field, but an
- earlier event did set the event source's <a href=#concept-event-stream-last-event-id title=concept-event-stream-last-event-id>last event ID
- string</a>, 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>
+ </ol><p class=note>If an event doesn't have an "id" field, but an earlier event did set the event
+ source's <a href=#concept-event-stream-last-event-id title=concept-event-stream-last-event-id>last event ID string</a>, 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>
<div class=example>
@@ -81924,10 +81810,9 @@
data: 10</pre>
<p>...would cause an event <code title=event-message><a href=#event-message>message</a></code> with the interface
- <code><a href=#messageevent>MessageEvent</a></code> to be dispatched on the
- <code><a href=#eventsource>EventSource</a></code> object. The event's <code title=dom-MessageEvent-data><a href=#dom-messageevent-data>data</a></code> attribute would contain
- the string <code>YHOO\n+2\n10</code> (where <code>\n</code>
- represents a newline).</p>
+ <code><a href=#messageevent>MessageEvent</a></code> to be dispatched on the <code><a href=#eventsource>EventSource</a></code> object. The event's
+ <code title=dom-MessageEvent-data><a href=#dom-messageevent-data>data</a></code> attribute would contain the string
+ <code>YHOO\n+2\n10</code> (where <code>\n</code> represents a newline).</p>
<p>This could be used as follows:
<pre>var stocks = new EventSource("http://stocks.example.com/ticker.php");
@@ -81946,20 +81831,15 @@
<div class=example>
- <p>The following stream contains four blocks. The first block has
- just a comment, and will fire nothing. The second block has two
- fields with names "data" and "id" respectively; an event will be
- fired for this block, with the data "first event", and will then
- set the last event ID to "1" so that if the connection died between
- this block and the next, the server would be sent a <code title=http-last-event-id><a href=#last-event-id>Last-Event-ID</a></code> header with the
- value "1". The third block fires an event with data "second event",
- and also has an "id" field, this time with no value, which resets
- the last event ID to the empty string (meaning no <code title=http-last-event-id><a href=#last-event-id>Last-Event-ID</a></code> header will now be
- sent in the event of a reconnection being attempted). Finally, the
- last block just fires an event with the data
- " third event" (with a single leading space character).
- Note that the last still has to end with a blank line, the end of
- the stream is not enough to trigger the dispatch of the last
+ <p>The following stream contains four blocks. The first block has just a comment, and will fire
+ nothing. The second block has two fields with names "data" and "id" respectively; an event will
+ be fired for this block, with the data "first event", and will then set the last event ID to "1"
+ so that if the connection died between this block and the next, the server would be sent a <code title=http-last-event-id><a href=#last-event-id>Last-Event-ID</a></code> header with the value "1". The third block fires
+ an event with data "second event", and also has an "id" field, this time with no value, which
+ resets the last event ID to the empty string (meaning no <code title=http-last-event-id><a href=#last-event-id>Last-Event-ID</a></code> header will now be sent in the event of a
+ reconnection being attempted). Finally, the last block just fires an event with the data
+ " third event" (with a single leading space character). Note that the last still has to
+ end with a blank line, the end of the stream is not enough to trigger the dispatch of the last
event.</p>
<pre>: test stream
@@ -81985,11 +81865,9 @@
data:</pre>
- <p>The first block fires events with the data set to the empty
- string, as would the last block if it was followed by a blank line.
- The middle block fires an event with the data set to a single
- newline character. The last block is discarded because it is not
- followed by a blank line.</p>
+ <p>The first block fires events with the data set to the empty string, as would the last block if
+ it was followed by a blank line. The middle block fires an event with the data set to a single
+ newline character. The last block is discarded because it is not followed by a blank line.</p>
</div>
@@ -82002,143 +81880,117 @@
data: test
</pre>
- <p>This is because the space after the colon is ignored if
- present.</p>
+ <p>This is because the space after the colon is ignored if present.</p>
</div>
<h4 id=authoring-notes><span class=secno>10.2.6 </span>Authoring notes</h4>
- <p>Legacy proxy servers are known to, in certain cases, drop HTTP
- connections after a short timeout. To protect against such proxy
- servers, authors can include a comment line (one starting with a ':'
- character) every 15 seconds or so.</p>
+ <p>Legacy proxy servers are known to, in certain cases, drop HTTP connections after a short
+ timeout. To protect against such proxy servers, authors can include a comment line (one starting
+ with a ':' character) every 15 seconds or so.</p>
- <p>Authors wishing to relate event source connections to each other
- or to specific documents previously served might find that relying
- on IP addresses doesn't work, as individual clients can have
- multiple IP addresses (due to having multiple proxy servers) and
- individual IP addresses can have multiple clients (due to sharing a
- proxy server). It is better to include a unique identifier in the
- document when it is served and then pass that identifier as part of
- the URL when the connection is established.</p>
+ <p>Authors wishing to relate event source connections to each other or to specific documents
+ previously served might find that relying on IP addresses doesn't work, as individual clients can
+ have multiple IP addresses (due to having multiple proxy servers) and individual IP addresses can
+ have multiple clients (due to sharing a proxy server). It is better to include a unique identifier
+ in the document when it is served and then pass that identifier as part of the URL when the
+ connection is established.</p>
- <p>Authors are also cautioned that HTTP chunking can have unexpected
- negative effects on the reliability of this protocol. Where
- possible, chunking should be disabled for serving event streams
- unless the rate of messages is high enough for this not to
- matter.</p> <!-- v2 can we get a better solution? -->
+ <p>Authors are also cautioned that HTTP chunking can have unexpected negative effects on the
+ reliability of this protocol. Where possible, chunking should be disabled for serving event
+ streams unless the rate of messages is high enough for this not to matter.</p> <!-- v2 can we get
+ a better solution? -->
- <p>Clients that support HTTP's per-server connection limitation
- might run into trouble when opening multiple pages from a site if
- each page has an <code><a href=#eventsource>EventSource</a></code> to the same
- domain. Authors can avoid this using the relatively complex
- mechanism of using unique domain names per connection, or by
- allowing the user to enable or disable the <code><a href=#eventsource>EventSource</a></code>
- functionality on a per-page basis, or by sharing a single
- <code><a href=#eventsource>EventSource</a></code> object using a <a href=#sharedworkerglobalscope title=SharedWorkerGlobalScope>shared worker</a>.
- </p>
+ <p>Clients that support HTTP's per-server connection limitation might run into trouble when
+ opening multiple pages from a site if each page has an <code><a href=#eventsource>EventSource</a></code> to the same
+ domain. Authors can avoid this using the relatively complex mechanism of using unique domain names
+ per connection, or by allowing the user to enable or disable the <code><a href=#eventsource>EventSource</a></code>
+ functionality on a per-page basis, or by sharing a single <code><a href=#eventsource>EventSource</a></code> object using a
<h4 id=eventsource-push><span class=secno>10.2.7 </span>Connectionless push and other features</h4>
- <p>User agents running in controlled environments, e.g. browsers on
- mobile handsets tied to specific carriers, may offload the
- management of the connection to a proxy on the network. In such a
- situation, the user agent for the purposes of conformance is
- considered to include both the handset software and the network
- proxy.</p>
+ <p>User agents running in controlled environments, e.g. browsers on mobile handsets tied to
+ specific carriers, may offload the management of the connection to a proxy on the network. In such
+ a situation, the user agent for the purposes of conformance is considered to include both the
+ handset software and the network proxy.</p>
<div class=example>
- <p>For example, a browser on a mobile device, after having
- established a connection, might detect that it is on a supporting
- network and request that a proxy server on the network take over
- the management of the connection. The timeline for such a situation
- might be as follows:</p>
+ <p>For example, a browser on a mobile device, after having established a connection, might detect
+ that it is on a supporting network and request that a proxy server on the network take over the
+ management of the connection. The timeline for such a situation might be as follows:</p>
- <ol><li>Browser connects to a remote HTTP server and requests the
- resource specified by the author in the <code title=dom-EventSource><a href=#dom-eventsource>EventSource</a></code> constructor.</li>
+ <ol><li>Browser connects to a remote HTTP server and requests the resource specified by the author
+ in the <code title=dom-EventSource><a href=#dom-eventsource>EventSource</a></code> constructor.</li>
<li>The server sends occasional messages.</li>
- <li>In between two messages, the browser detects that it is idle
- except for the network activity involved in keeping the TCP
- connection alive, and decides to switch to sleep mode to save power.</li>
+ <li>In between two messages, the browser detects that it is idle except for the network activity
+ involved in keeping the TCP connection alive, and decides to switch to sleep mode to save
+ power.</li>
<li>The browser disconnects from the server.</li>
- <li>The browser contacts a service on the network, and requests
- that that service, a "push proxy", maintain the connection instead.</li>
+ <li>The browser contacts a service on the network, and requests that that service, a "push
+ proxy", maintain the connection instead.</li>
- <li>The "push proxy" service contacts the remote HTTP server and
- requests the resource specified by the author in the <code title=dom-EventSource><a href=#dom-eventsource>EventSource</a></code> constructor (possibly
- including a <code title=http-last-event-id><a href=#last-event-id>Last-Event-ID</a></code>
- HTTP header, etc).</li>
+ <li>The "push proxy" service contacts the remote HTTP server and requests the resource specified
+ by the author in the <code title=dom-EventSource><a href=#dom-eventsource>EventSource</a></code> constructor (possibly
+ including a <code title=http-last-event-id><a href=#last-event-id>Last-Event-ID</a></code> HTTP header, etc).</li>
<li>The browser allows the mobile device to go to sleep.</li>
<li>The server sends another message.</li>
- <li>The "push proxy" service uses a technology such as OMA push to
- convey the event to the mobile device, which wakes only
- enough to process the event and then returns to sleep.</li>
+ <li>The "push proxy" service uses a technology such as OMA push to convey the event to the
+ mobile device, which wakes only enough to process the event and then returns to sleep.</li>
</ol></div>
- <p>This can reduce the total data usage, and can therefore result in
- considerable power savings.</p>
+ <p>This can reduce the total data usage, and can therefore result in considerable power
+ savings.</p>
- <p>As well as implementing the existing API and
- <code><a href=#text/event-stream>text/event-stream</a></code> wire format as defined by this
- specification and in more distributed ways as described above,
- formats of event framing defined by <a href=#other-applicable-specifications>other applicable
- specifications</a> may be supported. This specification does not
- define how they are to be parsed or processed.</p>
+ <p>As well as implementing the existing API and <code><a href=#text/event-stream>text/event-stream</a></code> wire format as
+ defined by this specification and in more distributed ways as described above, formats of event
+ framing defined by <a href=#other-applicable-specifications>other applicable specifications</a> may be supported. This
+ specification does not define how they are to be parsed or processed.</p>
<h4 id=garbage-collection-0><span class=secno>10.2.8 </span>Garbage collection</h4>
- <p>While an <code><a href=#eventsource>EventSource</a></code> object's <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> is <code title=dom-EventSource-CONNECTING><a href=#dom-eventsource-connecting>CONNECTING</a></code>, and the object
- has one or more event listeners registered for <code title=event-open>open</code>, <code title=event-message><a href=#event-message>message</a></code> or <code title=event-error>error</code> events, there must be a strong
- reference from the <code><a href=#window>Window</a></code> or <code><a href=#workerglobalscope>WorkerGlobalScope</a></code>
- object that the <code><a href=#eventsource>EventSource</a></code> object's constructor was
- invoked from to the <code><a href=#eventsource>EventSource</a></code> object itself.</p>
+ <p>While an <code><a href=#eventsource>EventSource</a></code> object's <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> is <code title=dom-EventSource-CONNECTING><a href=#dom-eventsource-connecting>CONNECTING</a></code>, and the object has one or more event
+ listeners registered for <code title=event-open>open</code>, <code title=event-message><a href=#event-message>message</a></code> or <code title=event-error>error</code> events, there must
+ be a strong reference from the <code><a href=#window>Window</a></code> or <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> object that
+ the <code><a href=#eventsource>EventSource</a></code> object's constructor was invoked from to the <code><a href=#eventsource>EventSource</a></code>
+ object itself.</p>
- <p>While an <code><a href=#eventsource>EventSource</a></code> object's <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> is <code title=dom-EventSource-OPEN><a href=#dom-eventsource-open>OPEN</a></code>, and the object has one or
- more event listeners registered for <code title=event-message><a href=#event-message>message</a></code> or <code title=event-error>error</code> events, there must be a strong
- reference from the <code><a href=#window>Window</a></code> or <code><a href=#workerglobalscope>WorkerGlobalScope</a></code>
- object that the <code><a href=#eventsource>EventSource</a></code> object's constructor was
- invoked from to the <code><a href=#eventsource>EventSource</a></code> object itself.</p>
+ <p>While an <code><a href=#eventsource>EventSource</a></code> object's <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> is <code title=dom-EventSource-OPEN><a href=#dom-eventsource-open>OPEN</a></code>, and the object has one or more event listeners
+ registered for <code title=event-message><a href=#event-message>message</a></code> or <code title=event-error>error</code> events, there must be a strong reference from the
+ <code><a href=#window>Window</a></code> or <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> object that the <code><a href=#eventsource>EventSource</a></code>
+ object's constructor was invoked from to the <code><a href=#eventsource>EventSource</a></code> object itself.</p>
- <p>While there is a task queued by an <code><a href=#eventsource>EventSource</a></code>
- object on the <a href=#remote-event-task-source>remote event task source</a>, there must be a
- strong reference from the <code><a href=#window>Window</a></code> or
- <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> object that the <code><a href=#eventsource>EventSource</a></code>
- object's constructor was invoked from to that
- <code><a href=#eventsource>EventSource</a></code> object.</p>
+ <p>While there is a task queued by an <code><a href=#eventsource>EventSource</a></code> object on the <a href=#remote-event-task-source>remote event
+ task source</a>, there must be a strong reference from the <code><a href=#window>Window</a></code> or
+ <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> object that the <code><a href=#eventsource>EventSource</a></code> object's constructor was
+ invoked from to that <code><a href=#eventsource>EventSource</a></code> object.</p>
<p>If a user agent is to <dfn id=concept-eventsource-forcibly-close title=concept-EventSource-forcibly-close>forcibly close</dfn> an
- <code><a href=#eventsource>EventSource</a></code> object (this happens when a
- <code><a href=#document>Document</a></code> object goes away permanently), the user agent
- must abort any instances of the <a href=#fetch>fetch</a> algorithm started
- for this <code><a href=#eventsource>EventSource</a></code> object, and must set the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute to
- <code title=dom-EventSource-CLOSED><a href=#dom-eventsource-closed>CLOSED</a></code>.</p> <!-- same as
- calling close() -->
+ <code><a href=#eventsource>EventSource</a></code> object (this happens when a <code><a href=#document>Document</a></code> object goes away
+ permanently), the user agent must abort any instances of the <a href=#fetch>fetch</a> algorithm started
+ for this <code><a href=#eventsource>EventSource</a></code> object, and must set the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute to <code title=dom-EventSource-CLOSED><a href=#dom-eventsource-closed>CLOSED</a></code>.</p> <!-- same as calling close() -->
- <p>If an <code><a href=#eventsource>EventSource</a></code> object is garbage collected while
- its connection is still open, the user agent must abort any instance
- of the <a href=#fetch title=fetch>fetch</a> algorithm opened by this
- <code><a href=#eventsource>EventSource</a></code>.</p> <!-- no need to throw tasks away or
- anything; for it to get garbage collected, there can't be anything
- that would be able to receive those events -->
+ <p>If an <code><a href=#eventsource>EventSource</a></code> object is garbage collected while its connection is still open,
+ the user agent must abort any instance of the <a href=#fetch title=fetch>fetch</a> algorithm opened by
+ this <code><a href=#eventsource>EventSource</a></code>.</p> <!-- no need to throw tasks away or anything; for it to get
+ garbage collected, there can't be anything that would be able to receive those events -->
- <p class=note>It's possible for one active network connection to
- be shared by multiple <code><a href=#eventsource>EventSource</a></code> objects and their
- <a href=#fetch>fetch</a> algorithms, which is why the above is phrased in
- terms of aborting the <a href=#fetch>fetch</a> algorithm and not the
- actual underlying download.</p>
+ <p class=note>It's possible for one active network connection to be shared by multiple
+ <code><a href=#eventsource>EventSource</a></code> objects and their <a href=#fetch>fetch</a> algorithms, which is why the above
+ is phrased in terms of aborting the <a href=#fetch>fetch</a> algorithm and not the actual underlying
+ download.</p>
<h4 id=implementation-advice><span class=secno>10.2.9 </span>Implementation advice</h4>
@@ -82164,8 +82016,8 @@
<h5 id=text/event-stream><span class=secno>10.2.10.1 </span><dfn><code>text/event-stream</code></dfn></h5>
- <p>This registration is for community review and will be submitted
- to the IESG for review, approval, and registration with IANA.</p>
+ <p>This registration is for community review and will be submitted to the IESG for review,
+ approval, and registration with IANA.</p>
<!--
To: ietf-types at iana.org
@@ -82183,9 +82035,8 @@
<dl><dt><code title="">charset</code></dt>
<dd>
- <p>The <code title="">charset</code> parameter may be provided.
- The parameter's value must be "<code title="">utf-8</code>".
- This parameter serves no purpose; it is only allowed for
+ <p>The <code title="">charset</code> parameter may be provided. The parameter's value must be
+ "<code title="">utf-8</code>". This parameter serves no purpose; it is only allowed for
compatibility with legacy servers.</p>
</dd>
@@ -82196,20 +82047,17 @@
<dt>Security considerations:</dt>
<dd>
- <p>An event stream from an origin distinct from the origin of the
- content consuming the event stream can result in information
- leakage. To avoid this, user agents are required to apply CORS
+ <p>An event stream from an origin distinct from the origin of the content consuming the event
+ stream can result in information leakage. To avoid this, user agents are required to apply CORS
semantics. <a href=#refsCORS>[CORS]</a></p>
- <p>Event streams can overwhelm a user agent; a user agent is
- expected to apply suitable restrictions to avoid depleting local
- resources because of an overabundance of information from an event
- stream.</p>
+ <p>Event streams can overwhelm a user agent; a user agent is expected to apply suitable
+ restrictions to avoid depleting local resources because of an overabundance of information from
+ an event stream.</p>
- <p>Servers can be overwhelmed if a situation develops in which the
- server is causing clients to reconnect rapidly. Servers should use
- a 5xx status code to indicate capacity problems, as this will
- prevent conforming clients from reconnecting automatically.</p>
+ <p>Servers can be overwhelmed if a situation develops in which the server is causing clients to
+ reconnect rapidly. Servers should use a 5xx status code to indicate capacity problems, as this
+ will prevent conforming clients from reconnecting automatically.</p>
</dd>
<!--REMOVE-TOPIC:Security-->
@@ -91169,65 +91017,59 @@
</dd>
- <dt>A start tag whose tag name is one of: "applet",
- "marquee", "object"</dt>
+ <dt>A start tag whose tag name is one of: "applet", "marquee", "object"</dt>
<dd>
- <p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if
- any.</p>
+ <p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if any.</p>
<p><a href=#insert-an-html-element>Insert an HTML element</a> for the token.</p>
- <p>Insert a marker at the end of the <a href=#list-of-active-formatting-elements>list of active
- formatting elements</a>.</p>
+ <p>Insert a marker at the end of the <a href=#list-of-active-formatting-elements>list of active formatting elements</a>.</p>
<p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</p>
</dd>
- <dt>An end tag token whose tag name is one of: "applet",
- "marquee", "object"</dt>
+ <dt>An end tag token whose tag name is one of: "applet", "marquee", "object"</dt>
<dd>
- <p>If the <a href=#stack-of-open-elements>stack of open elements</a> does not <a href=#has-an-element-in-scope title="has an element in scope">have an element in scope</a>
- that is an <a href=#html-elements title="HTML elements">HTML element</a> and
- with the same tag name as that of the token, then this is a
- <a href=#parse-error>parse error</a>; ignore the token.</p>
+ <p>If the <a href=#stack-of-open-elements>stack of open elements</a> does not <a href=#has-an-element-in-scope title="has an element in
+ scope">have an element in scope</a> that is an <a href=#html-elements title="HTML elements">HTML
+ element</a> and with the same tag name as that of the token, then this is a <a href=#parse-error>parse
+ error</a>; ignore the token.</p>
<p>Otherwise, run these steps:</p>
<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 <a href=#html-elements title="HTML elements">HTML element</a> with
- the same tag name as that of the token, then this is a
- <a href=#parse-error>parse error</a>.</li>
+ <li><p>If the <a href=#current-node>current node</a> is not an <a href=#html-elements title="HTML elements">HTML
+ element</a> with the same tag name as that of the token, then this is a <a href=#parse-error>parse
+ error</a>.</li>
- <li><p>Pop elements from the <a href=#stack-of-open-elements>stack of open elements</a>
- until an <a href=#html-elements title="HTML elements">HTML element</a> with the same tag name as the token has been
- popped from the stack.</li>
+ <li><p>Pop elements from the <a href=#stack-of-open-elements>stack of open elements</a> until an <a href=#html-elements title="HTML
+ elements">HTML element</a> with the same tag name as the token has been popped from the
+ stack.</li>
- <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>
+ <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>
<dt>A start tag whose tag name is "table"</dt>
<dd>
- <p>If the <code><a href=#document>Document</a></code> is <em>not</em> set to
- <a href=#quirks-mode>quirks mode</a>, and the <a href=#stack-of-open-elements>stack of open
- elements</a> <a href=#has-an-element-in-button-scope title="has an element in button scope">has a
- <code>p</code> element in button scope</a>, then <a href=#close-a-p-element>close a
- <code>p</code> element</a>.</p> <!-- i hate
- myself (this quirk was basically caused by acid2; if i'd realised
- we could change the specs when i wrote acid2, we could have
- avoided having any parsing-mode quirks) -Hixie -->
+ <p>If the <code><a href=#document>Document</a></code> is <em>not</em> set to <a href=#quirks-mode>quirks mode</a>, and the
+ <a href=#stack-of-open-elements>stack of open elements</a> <a href=#has-an-element-in-button-scope title="has an element in button scope">has a
+ <code>p</code> element in button scope</a>, then <a href=#close-a-p-element>close a <code>p</code>
+ element</a>.</p> <!-- i hate myself (this quirk was basically caused by acid2; if i'd
+ realised we could change the specs when i wrote acid2, we could have avoided having any
+ parsing-mode quirks) -Hixie -->
<p><a href=#insert-an-html-element>Insert an HTML element</a> for the token.</p>
<p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</p>
- <p>Switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-intable title="insertion mode: in table">in table</a>".</p>
+ <p>Switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-intable title="insertion mode: in table">in
+ table</a>".</p>
</dd>
@@ -91245,15 +91087,13 @@
"img", "keygen", "wbr"</dt>
<dd>
- <p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if
- any.</p>
+ <p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if any.</p>
- <p><a href=#insert-an-html-element>Insert an HTML element</a> for the token. Immediately
- pop the <a href=#current-node>current node</a> off the <a href=#stack-of-open-elements>stack of open
- elements</a>.</p>
+ <p><a href=#insert-an-html-element>Insert an HTML element</a> for the token. Immediately pop the <a href=#current-node>current
+ node</a> off the <a href=#stack-of-open-elements>stack of open elements</a>.</p>
- <p><a href=#acknowledge-self-closing-flag title="acknowledge self-closing flag">Acknowledge the
- token's <i>self-closing flag</i></a>, if it is set.</p>
+ <p><a href=#acknowledge-self-closing-flag title="acknowledge self-closing flag">Acknowledge the token's <i>self-closing
+ flag</i></a>, if it is set.</p>
<p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</p>
<!-- shouldn't really do this for <area> -->
@@ -91263,48 +91103,42 @@
<dt>A start tag whose tag name is "input"</dt>
<dd>
- <p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if
- any.</p>
+ <p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if any.</p>
- <p><a href=#insert-an-html-element>Insert an HTML element</a> for the token. Immediately
- pop the <a href=#current-node>current node</a> off the <a href=#stack-of-open-elements>stack of open
- elements</a>.</p>
+ <p><a href=#insert-an-html-element>Insert an HTML element</a> for the token. Immediately pop the <a href=#current-node>current
+ node</a> off the <a href=#stack-of-open-elements>stack of open elements</a>.</p>
- <p><a href=#acknowledge-self-closing-flag title="acknowledge self-closing flag">Acknowledge the
- token's <i>self-closing flag</i></a>, if it is set.</p>
+ <p><a href=#acknowledge-self-closing-flag title="acknowledge self-closing flag">Acknowledge the token's <i>self-closing
+ flag</i></a>, if it is set.</p>
- <p>If the token does not have an attribute with the name "type",
- or if it does, but that attribute's value is not an <a href=#ascii-case-insensitive>ASCII
- case-insensitive</a> match for the string "<code title="">hidden</code>", then: set the <a href=#frameset-ok-flag>frameset-ok
- flag</a> to "not ok".</p>
+ <p>If the token does not have an attribute with the name "type", or if it does, but that
+ attribute's value is not an <a href=#ascii-case-insensitive>ASCII case-insensitive</a> match for the string "<code title="">hidden</code>", then: set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</p>
</dd>
<dt>A start tag whose tag name is one of: "menuitem", "param", "source", "track"</dt>
<dd>
- <p><a href=#insert-an-html-element>Insert an HTML element</a> for the token. Immediately
- pop the <a href=#current-node>current node</a> off the <a href=#stack-of-open-elements>stack of open
- elements</a>.</p>
+ <p><a href=#insert-an-html-element>Insert an HTML element</a> for the token. Immediately pop the <a href=#current-node>current
+ node</a> off the <a href=#stack-of-open-elements>stack of open elements</a>.</p>
- <p><a href=#acknowledge-self-closing-flag title="acknowledge self-closing flag">Acknowledge the
- token's <i>self-closing flag</i></a>, if it is set.</p>
+ <p><a href=#acknowledge-self-closing-flag title="acknowledge self-closing flag">Acknowledge the token's <i>self-closing
+ flag</i></a>, if it is set.</p>
</dd>
<dt>A start tag whose tag name is "hr"</dt>
<dd>
- <p>If the <a href=#stack-of-open-elements>stack of open elements</a> <a href=#has-an-element-in-button-scope title="has
- an element in button scope">has a <code>p</code> element in button
- scope</a>, then <a href=#close-a-p-element>close a <code>p</code> element</a>.</p>
+ <p>If the <a href=#stack-of-open-elements>stack of open elements</a> <a href=#has-an-element-in-button-scope title="has an element in button scope">has a
+ <code>p</code> element in button scope</a>, then <a href=#close-a-p-element>close a <code>p</code>
+ element</a>.</p>
- <p><a href=#insert-an-html-element>Insert an HTML element</a> for the token. Immediately
- pop the <a href=#current-node>current node</a> off the <a href=#stack-of-open-elements>stack of open
- elements</a>.</p>
+ <p><a href=#insert-an-html-element>Insert an HTML element</a> for the token. Immediately pop the <a href=#current-node>current
+ node</a> off the <a href=#stack-of-open-elements>stack of open elements</a>.</p>
- <p><a href=#acknowledge-self-closing-flag title="acknowledge self-closing flag">Acknowledge the
- token's <i>self-closing flag</i></a>, if it is set.</p>
+ <p><a href=#acknowledge-self-closing-flag title="acknowledge self-closing flag">Acknowledge the token's <i>self-closing
+ flag</i></a>, if it is set.</p>
<p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</p>
@@ -91312,10 +91146,9 @@
<dt>A start tag whose tag name is "image"</dt>
<dd>
- <p><a href=#parse-error>Parse error</a>. Change the token's tag name
- to "img" and reprocess it. (Don't ask.)</p> <!-- As of
- 2005-12, studies showed that around 0.2% of pages used the
- <image> element. -->
+ <!-- As of 2005-12, studies showed that around 0.2% of pages used the <image> element. -->
+ <p><a href=#parse-error>Parse error</a>. Change the token's tag name to "img" and reprocess it. (Don't
+ ask.)</p>
</dd>
<dt id=isindex>A start tag whose tag name is "isindex"</dt>
@@ -91323,32 +91156,28 @@
<p><a href=#parse-error>Parse error</a>.</p>
- <p>If the <a href=#form-element-pointer><code title="">form</code> element
- pointer</a> is not null, then ignore the token.</p>
+ <p>If the <a href=#form-element-pointer><code title="">form</code> element pointer</a> is not null, then ignore the
+ token.</p>
<p>Otherwise:</p>
- <p><a href=#acknowledge-self-closing-flag title="acknowledge self-closing flag">Acknowledge the
- token's <i>self-closing flag</i></a>, if it is set.</p> <!--
- purely to reduce the number of errors (we don't care if they
- included the /, they're not supposed to be including the tag at
- all! -->
+ <p><a href=#acknowledge-self-closing-flag title="acknowledge self-closing flag">Acknowledge the token's <i>self-closing
+ flag</i></a>, if it is set.</p> <!-- purely to reduce the number of errors (we don't care if
+ they included the /, they're not supposed to be including the tag at all! -->
<p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</p>
<!-- fake <form> -->
- <p>If the <a href=#stack-of-open-elements>stack of open elements</a> <a href=#has-an-element-in-button-scope title="has
- an element in button scope">has a <code>p</code> element in button
- scope</a>, then <a href=#close-a-p-element>close a <code>p</code> element</a>.</p>
+ <p>If the <a href=#stack-of-open-elements>stack of open elements</a> <a href=#has-an-element-in-button-scope title="has an element in button scope">has a
+ <code>p</code> element in button scope</a>, then <a href=#close-a-p-element>close a <code>p</code>
+ element</a>.</p>
- <p><a href=#insert-an-html-element>Insert an HTML element</a> for a "form" start tag token with no attributes, and set the
- <a href=#form-element-pointer><code title=form>form</code> element pointer</a> to
- point to the element created.</p>
+ <p><a href=#insert-an-html-element>Insert an HTML element</a> for a "form" start tag token with no attributes, and set
+ the <a href=#form-element-pointer><code title=form>form</code> element pointer</a> to point to the element
+ created.</p>
- <p>If the token has an attribute called "action", set the
- <code title=attr-fs-action><a href=#attr-fs-action>action</a></code> attribute on the
- resulting <code><a href=#the-form-element>form</a></code> element to the value of the
- "action" attribute of the token.</p>
+ <p>If the token has an attribute called "action", set the <code title=attr-fs-action><a href=#attr-fs-action>action</a></code> attribute on the resulting <code><a href=#the-form-element>form</a></code> element to the
+ value of the "action" attribute of the token.</p>
<!-- fake <hr> -->
<p><a href=#insert-an-html-element>Insert an HTML element</a> for an "hr" start tag token with no attributes.
@@ -91360,8 +91189,7 @@
<p><a href=#insert-an-html-element>Insert an HTML element</a> for a "label" start tag token with no attributes.</p>
<!-- fake text -->
- <p><a href=#insert-a-character title="insert a character">Insert characters</a> (see below for <a href=#attr-isindex-prompt title=attr-isindex-prompt>what they should
- say</a>).</p>
+ <p><a href=#insert-a-character title="insert a character">Insert characters</a> (see below for <a href=#attr-isindex-prompt title=attr-isindex-prompt>what they should say</a>).</p>
<!-- fake <input> -->
<p><a href=#insert-an-html-element>Insert an HTML element</a> for an "input" start tag token with all the attributes
@@ -91370,8 +91198,7 @@
the <a href=#stack-of-open-elements>stack of open elements</a>.</p>
<!-- fake text -->
- <p><a href=#insert-a-character title="insert a character">Insert more characters</a> (see below for <a href=#attr-isindex-prompt title=attr-isindex-prompt>what they
- should say</a>).</p>
+ <p><a href=#insert-a-character title="insert a character">Insert more characters</a> (see below for <a href=#attr-isindex-prompt title=attr-isindex-prompt>what they should say</a>).</p>
<!-- fake </label> -->
<p>Pop the <a href=#current-node>current node</a> (which will be the <code><a href=#the-label-element>label</a></code> element created
@@ -91386,13 +91213,12 @@
earlier) off the <a href=#stack-of-open-elements>stack of open elements</a>. Set the <a href=#form-element-pointer><code title=form>form</code> element pointer</a> to null.</p>
<!-- explanation of text -->
- <p><dfn id=attr-isindex-prompt title=attr-isindex-prompt><strong>Prompt</strong></dfn>: If the token has an attribute with the name "prompt", then the
- first stream of characters must be the same string as given in
- that attribute, and the second stream of characters must be
- empty. Otherwise, the two streams of character tokens together
- should, together with the <code><a href=#the-input-element>input</a></code> element, express the
- equivalent of "This is a searchable index. Enter search keywords:
- (input field)" in the user's preferred language.</p>
+ <p><dfn id=attr-isindex-prompt title=attr-isindex-prompt><strong>Prompt</strong></dfn>: If the token has an attribute
+ with the name "prompt", then the first stream of characters must be the same string as given in
+ that attribute, and the second stream of characters must be empty. Otherwise, the two streams of
+ character tokens together should, together with the <code><a href=#the-input-element>input</a></code> element, express the
+ equivalent of "This is a searchable index. Enter search keywords: (input field)" in the user's
+ preferred language.</p>
</dd>
@@ -91401,38 +91227,34 @@
<p>Run these steps:</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 <a href=#next-token>next token</a> is a U+000A LINE FEED (LF) character
- token, then ignore that token and move on to the next
- one. (Newlines at the start of <code><a href=#the-textarea-element>textarea</a></code> elements are
- ignored as an authoring convenience.)</li>
+ <li><p>If the <a href=#next-token>next token</a> is a U+000A LINE FEED (LF) character token, then ignore
+ that token and move on to the next one. (Newlines at the start of <code><a href=#the-textarea-element>textarea</a></code>
+ elements are ignored as an authoring convenience.)</li>
<!-- see comment in <pre> start tag bit -->
- <li><p>Switch the tokenizer to the <a href=#rcdata-state>RCDATA
- state</a>.</li>
+ <li><p>Switch the tokenizer to the <a href=#rcdata-state>RCDATA state</a>.</li>
- <li><p>Let the <a href=#original-insertion-mode>original insertion mode</a> be the
- current <a href=#insertion-mode>insertion mode</a>.</p>
+ <li><p>Let the <a href=#original-insertion-mode>original insertion mode</a> be the current <a href=#insertion-mode>insertion
+ mode</a>.</p>
- <li><p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not
- ok".</li>
+ <li><p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</li>
- <li><p>Switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-incdata title="insertion mode: text">text</a>".</li>
+ <li><p>Switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-incdata title="insertion mode:
+ text">text</a>".</li>
</ol></dd>
<dt>A start tag whose tag name is "xmp"</dt>
<dd>
- <p>If the <a href=#stack-of-open-elements>stack of open elements</a> <a href=#has-an-element-in-button-scope title="has
- an element in button scope">has a <code>p</code> element in button
- scope</a>, then <a href=#close-a-p-element>close a <code>p</code> element</a>.</p>
+ <p>If the <a href=#stack-of-open-elements>stack of open elements</a> <a href=#has-an-element-in-button-scope title="has an element in button scope">has a
+ <code>p</code> element in button scope</a>, then <a href=#close-a-p-element>close a <code>p</code>
+ element</a>.</p>
- <p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if
- any.</p>
+ <p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if any.</p>
<p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</p>
@@ -91460,30 +91282,28 @@
<dt>A start tag whose tag name is "select"</dt>
<dd>
- <p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if
- any.</p>
+ <p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if any.</p>
<p><a href=#insert-an-html-element>Insert an HTML element</a> for the token.</p>
<p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</p>
- <p>If the <a href=#insertion-mode>insertion mode</a> is one of "<a href=#parsing-main-intable title="insertion mode: in table">in table</a>", "<a href=#parsing-main-incaption title="insertion mode: in caption">in caption</a>", "<a href=#parsing-main-intbody title="insertion mode: in table body">in table body</a>",
- "<a href=#parsing-main-intr title="insertion mode: in row">in row</a>", or "<a href=#parsing-main-intd title="insertion mode: in cell">in cell</a>", then switch the
- <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-inselectintable title="insertion mode: in
- select in table">in select in table</a>". Otherwise, switch the
- <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-inselect title="insertion mode: in
- select">in select</a>".</p>
+ <p>If the <a href=#insertion-mode>insertion mode</a> is one of "<a href=#parsing-main-intable title="insertion mode: in table">in
+ table</a>", "<a href=#parsing-main-incaption title="insertion mode: in caption">in caption</a>", "<a href=#parsing-main-intbody title="insertion mode: in table body">in table body</a>", "<a href=#parsing-main-intr title="insertion mode: in
+ row">in row</a>", or "<a href=#parsing-main-intd title="insertion mode: in cell">in cell</a>", then switch the
+ <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-inselectintable title="insertion mode: in select in table">in select in
+ table</a>". Otherwise, switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-inselect title="insertion
+ mode: in select">in select</a>".</p>
</dd>
<dt>A start tag whose tag name is one of: "optgroup", "option"</dt>
<dd>
- <p>If the <a href=#current-node>current node</a> is an <code><a href=#the-option-element>option</a></code>
- element, then pop the <a href=#current-node>current node</a> off the <a href=#stack-of-open-elements>stack of open elements</a>.</p>
+ <p>If the <a href=#current-node>current node</a> is an <code><a href=#the-option-element>option</a></code> element, then pop the
+ <a href=#current-node>current node</a> off the <a href=#stack-of-open-elements>stack of open elements</a>.</p>
- <p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if
- any.</p>
+ <p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if any.</p>
<p><a href=#insert-an-html-element>Insert an HTML element</a> for the token.</p>
@@ -91514,11 +91334,10 @@
-->
- <p>If the <a href=#stack-of-open-elements>stack of open elements</a> <a href=#has-an-element-in-scope title="has an
- element in scope">has a <code>ruby</code> element in scope</a>,
- then <a href=#generate-implied-end-tags>generate implied end tags</a>. If the <a href=#current-node>current
- node</a> is not then a <code><a href=#the-ruby-element>ruby</a></code> element, this is a
- <a href=#parse-error>parse error</a>.</p>
+ <p>If the <a href=#stack-of-open-elements>stack of open elements</a> <a href=#has-an-element-in-scope title="has an element in scope">has a
+ <code>ruby</code> element in scope</a>, then <a href=#generate-implied-end-tags>generate implied end tags</a>. If the
+ <a href=#current-node>current node</a> is not then a <code><a href=#the-ruby-element>ruby</a></code> element, this is a <a href=#parse-error>parse
+ error</a>.</p>
<p><a href=#insert-an-html-element>Insert an HTML element</a> for the token.</p>
@@ -91527,85 +91346,74 @@
<dt>A start tag whose tag name is "math"</dt>
<dd>
- <p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if
- any.</p>
+ <p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if any.</p>
- <p><a href=#adjust-mathml-attributes>Adjust MathML attributes</a> for the token. (This
- fixes the case of MathML attributes that are not all
- lowercase.)</p>
+ <p><a href=#adjust-mathml-attributes>Adjust MathML attributes</a> for the token. (This fixes the case of MathML
+ attributes that are not all lowercase.)</p>
- <p><a href=#adjust-foreign-attributes>Adjust foreign attributes</a> for the token. (This
- fixes the use of namespaced attributes, in particular XLink.)</p>
+ <p><a href=#adjust-foreign-attributes>Adjust foreign attributes</a> for the token. (This fixes the use of namespaced
+ attributes, in particular XLink.)</p>
- <p><a href=#insert-a-foreign-element>Insert a foreign element</a> for the token, in the
- <a href=#mathml-namespace>MathML namespace</a>.</p>
+ <p><a href=#insert-a-foreign-element>Insert a foreign element</a> for the token, in the <a href=#mathml-namespace>MathML
+ namespace</a>.</p>
- <!-- If we ever change the frameset-ok flag to an insertion mode,
- the following change would be implied, except we'd have to do it
- even in the face of a self-closed tag:
+ <!-- If we ever change the frameset-ok flag to an insertion mode, the following change would be
+ implied, except we'd have to do it even in the face of a self-closed tag:
<p>Set the <span>frameset-ok flag</span> to "not ok".</p>
-->
- <p>If the token has its <i>self-closing flag</i> set, pop the
- <a href=#current-node>current node</a> off the <a href=#stack-of-open-elements>stack of open
- elements</a> and <a href=#acknowledge-self-closing-flag title="acknowledge self-closing
- flag">acknowledge the token's <i>self-closing flag</i></a>.</p>
+ <p>If the token has its <i>self-closing flag</i> set, pop the <a href=#current-node>current node</a> off the
+ <a href=#stack-of-open-elements>stack of open elements</a> and <a href=#acknowledge-self-closing-flag title="acknowledge self-closing flag">acknowledge
+ the token's <i>self-closing flag</i></a>.</p>
</dd>
<dt>A start tag whose tag name is "svg"</dt>
<dd>
- <p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if
- any.</p>
+ <p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if any.</p>
- <p><a href=#adjust-svg-attributes>Adjust SVG attributes</a> for the token. (This fixes
- the case of SVG attributes that are not all lowercase.)</p>
+ <p><a href=#adjust-svg-attributes>Adjust SVG attributes</a> for the token. (This fixes the case of SVG attributes that
+ are not all lowercase.)</p>
- <p><a href=#adjust-foreign-attributes>Adjust foreign attributes</a> for the token. (This
- fixes the use of namespaced attributes, in particular XLink in
- SVG.)</p>
+ <p><a href=#adjust-foreign-attributes>Adjust foreign attributes</a> for the token. (This fixes the use of namespaced
+ attributes, in particular XLink in SVG.)</p>
- <p><a href=#insert-a-foreign-element>Insert a foreign element</a> for the token, in the
- <a href=#svg-namespace>SVG namespace</a>.</p>
+ <p><a href=#insert-a-foreign-element>Insert a foreign element</a> for the token, in the <a href=#svg-namespace>SVG namespace</a>.</p>
- <!-- If we ever change the frameset-ok flag to an insertion mode,
- the following change would be implied, except we'd have to do it
- even in the face of a self-closed tag:
+ <!-- If we ever change the frameset-ok flag to an insertion mode, the following change would be
+ implied, except we'd have to do it even in the face of a self-closed tag:
<p>Set the <span>frameset-ok flag</span> to "not ok".</p>
-->
- <p>If the token has its <i>self-closing flag</i> set, pop the
- <a href=#current-node>current node</a> off the <a href=#stack-of-open-elements>stack of open
- elements</a> and <a href=#acknowledge-self-closing-flag title="acknowledge self-closing
- flag">acknowledge the token's <i>self-closing flag</i></a>.</p>
+ <p>If the token has its <i>self-closing flag</i> set, pop the <a href=#current-node>current node</a> off the
+ <a href=#stack-of-open-elements>stack of open elements</a> and <a href=#acknowledge-self-closing-flag title="acknowledge self-closing flag">acknowledge
+ the token's <i>self-closing flag</i></a>.</p>
</dd>
- <dt>A start <!--or end--> tag whose tag name is one of: "caption",
- "col", "colgroup", "frame", "head", "tbody", "td", "tfoot", "th",
- "thead", "tr"</dt>
- <!--<dt>An end tag whose tag name is one of: "area", "base",
- "basefont", "bgsound", "embed", "hr", "iframe", "image", "img",
- "input", "isindex", "keygen", "link", "menuitem", "meta", "noembed",
- "noframes", "param", "script", "select", "source", "style",
- "table", "textarea", "title", "track", "wbr"</dt>-->
- <!--<dt>An end tag whose tag name is "noscript", if the
- <span>scripting flag</span> is enabled</dt>-->
+ <dt>A start <!--or end--> tag whose tag name is one of: "caption", "col", "colgroup", "frame",
+ "head", "tbody", "td", "tfoot", "th", "thead", "tr"</dt>
+ <!--<dt>An end tag whose tag name is one of: "area", "base", "basefont", "bgsound", "embed",
+ "hr", "iframe", "image", "img", "input", "isindex", "keygen", "link", "menuitem", "meta",
+ "noembed", "noframes", "param", "script", "select", "source", "style", "table", "textarea",
+ "title", "track", "wbr"</dt>-->
+ <!--<dt>An end tag whose tag name is "noscript", if the <span>scripting flag</span> is
+ enabled</dt>-->
<dd>
+
<p><a href=#parse-error>Parse error</a>. Ignore the token.</p>
- <!-- end tags are commented out because since they can never end
- up on the stack anyway, the default end tag clause will
- automatically handle them. we don't want to have text in the spec
- that is just an optimisation, as that detracts from the spec
- itself -->
+
+ <!-- end tags are commented out because since they can never end up on the stack anyway, the
+ default end tag clause will automatically handle them. we don't want to have text in the spec
+ that is just an optimisation, as that detracts from the spec itself -->
+
</dd>
<dt>Any other start tag</dt>
<dd>
- <p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if
- any.</p>
+ <p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if any.</p>
<p><a href=#insert-an-html-element>Insert an HTML element</a> for the token.</p>
@@ -91619,30 +91427,29 @@
<p>Run these steps:</p>
- <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>
+ <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><i>Loop</i>: If <var title="">node</var> is an <a href=#html-elements title="HTML elements">HTML element</a> with the same tag
- name as the token, then:</p>
+ <li><p><i>Loop</i>: If <var title="">node</var> is an <a href=#html-elements title="HTML elements">HTML
+ element</a> with the same tag name as the token, then:</p>
- <ol><li><p><a href=#generate-implied-end-tags>Generate implied end tags</a>, except
- for <a href=#html-elements>HTML elements</a> with the same tag name as the token.</li>
+ <ol><li><p><a href=#generate-implied-end-tags>Generate implied end tags</a>, except for <a href=#html-elements>HTML elements</a> with the
+ same tag name as the token.</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>, or if it is not an <a href=#html-elements title="HTML elements">HTML element</a>, then this is a
- <a href=#parse-error>parse error</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>, or if it is not an <a href=#html-elements title="HTML elements">HTML element</a>, then this is
+ a <a href=#parse-error>parse error</a>.</li>
- <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>
+ <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>
- <li><p>Otherwise, if <var title="">node</var> is in the
- <a href=#special>special</a> category, then this is a <a href=#parse-error>parse
- error</a>; ignore the token, and abort these steps.</li>
+ <li><p>Otherwise, if <var title="">node</var> is in the <a href=#special>special</a> category, then
+ this is a <a href=#parse-error>parse error</a>; ignore the token, and abort these steps.</li>
- <li><p>Set <var title="">node</var> to the previous entry in the
- <a href=#stack-of-open-elements>stack of open elements</a>.</li>
+ <li><p>Set <var title="">node</var> to the previous entry in the <a href=#stack-of-open-elements>stack of open
+ elements</a>.</li>
<li><p>Return to the step labeled <i>loop</i>.</li>
@@ -91659,120 +91466,97 @@
<li><p>Pop elements from the <a href=#stack-of-open-elements>stack of open elements</a> until a <code><a href=#the-p-element>p</a></code> element
has been popped from the stack.</li>
- </ol><p id=adoptionAgency>The <dfn id=adoption-agency-algorithm>adoption agency algorithm</dfn>, which takes as its only argument a tag name <var title="">subject</var> for which the algorithm is being run, consists of the following steps:</p>
+ </ol><p id=adoptionAgency>The <dfn id=adoption-agency-algorithm>adoption agency algorithm</dfn>, which takes as its only argument
+ a tag name <var title="">subject</var> for which the algorithm is being run, consists of the
+ following steps:</p>
-<!--CLEANUP-->
- <ol><li><p>Let <var title="">outer loop counter</var> be
- zero.</li>
+ <ol><li><p>Let <var title="">outer loop counter</var> be zero.</li>
- <li><p><i>Outer loop</i>: If <var title="">outer loop
- counter</var> is greater than or equal to eight, then abort these
- steps.</li>
+ <li><p><i>Outer loop</i>: If <var title="">outer loop counter</var> is greater than or equal to
+ eight, then abort these steps.</li>
- <li><p>Increment <var title="">outer loop counter</var> by
- one.</li>
+ <li><p>Increment <var title="">outer loop counter</var> by one.</li>
<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>
+ <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
- marker in the list, if any, or the start of the list
- otherwise, and</li>
+ <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 tag name <var title="">subject</var>.</li>
- </ul><p>If there is no such node, then abort these steps and instead
- act as described in the "any other end tag" entry below.</p>
+ </ul><p>If there is no such node, then abort these steps and instead act as described in the "any
+ other end tag" entry below.</p>
- <p>Otherwise, if there is such a node, but that node is not
- in the <a href=#stack-of-open-elements>stack of open elements</a>, then this is a
- <a href=#parse-error>parse error</a>; remove the element from the list,
- and abort these steps.</p>
+ <p>Otherwise, if there is such a node, but that node is not in the <a href=#stack-of-open-elements>stack of open
+ elements</a>, then this is a <a href=#parse-error>parse error</a>; remove the element from the list, and
+ abort these steps.</p>
- <p>Otherwise, if there is such a node, and 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>; abort these
- steps.</p>
+ <p>Otherwise, if there is such a node, and 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>; abort these steps.</p>
- <p>Otherwise, there is a <var title="">formatting
- element</var> and that element is in <a href=#stack-of-open-elements title="stack of
- open elements">the stack</a> and is <a href=#has-an-element-in-scope title="has an
- element in scope">in scope</a>. If the element is not the
- <a href=#current-node>current node</a>, this is a <a href=#parse-error>parse
- error</a>. In any case, proceed with the algorithm as
- written in the following steps.</p>
+ <p>Otherwise, there is a <var title="">formatting element</var> and that element is in <a href=#stack-of-open-elements title="stack of open elements">the stack</a> and is <a href=#has-an-element-in-scope title="has an element in scope">in
+ scope</a>. If the element is not the <a href=#current-node>current node</a>, this is a <a href=#parse-error>parse
+ error</a>. In any case, proceed with the algorithm as written in the following steps.</p>
</li>
- <li><p>Let the <var title="">furthest block</var> be the topmost
- node in the <a href=#stack-of-open-elements>stack of open elements</a> that is lower in
- the stack than the <var title="">formatting element</var>, and is
- an element in the <a href=#special>special</a> category. There might not
- be one.</li>
+ <li><p>Let the <var title="">furthest block</var> be the topmost node in the <a href=#stack-of-open-elements>stack of open
+ elements</a> that is lower in the stack than the <var title="">formatting element</var>, and
+ is an element in the <a href=#special>special</a> category. There might not be one.</li>
- <li><p>If there is no <var title="">furthest block</var>, then
- the UA must first pop all the nodes from the bottom of the
- <a href=#stack-of-open-elements>stack of open elements</a>, from the <a href=#current-node>current
- node</a> up to and including the <var title="">formatting
- element</var>, then remove the <var title="">formatting
- element</var> from the <a href=#list-of-active-formatting-elements>list of active formatting
- elements</a>, and finally abort these steps.</li>
+ <li><p>If there is no <var title="">furthest block</var>, then the UA must first pop all the
+ nodes from the bottom of the <a href=#stack-of-open-elements>stack of open elements</a>, from the <a href=#current-node>current
+ node</a> up to and including the <var title="">formatting element</var>, then remove the <var title="">formatting element</var> from the <a href=#list-of-active-formatting-elements>list of active formatting elements</a>, and
+ finally abort these steps.</li>
- <li><p>Let the <var title="">common ancestor</var> be the element
- immediately above the <var title="">formatting element</var> in the
- <a href=#stack-of-open-elements>stack of open elements</a>.</li>
+ <li><p>Let the <var title="">common ancestor</var> be the element immediately above the <var title="">formatting element</var> in the <a href=#stack-of-open-elements>stack of open elements</a>.</li>
- <li><p>Let a bookmark note the position of the <var title="">formatting element</var> in the <a href=#list-of-active-formatting-elements>list of active
- formatting elements</a> relative to the elements on either
- side of it in the list.</li>
+ <li><p>Let a bookmark note the position of the <var title="">formatting element</var> in the
+ <a href=#list-of-active-formatting-elements>list of active formatting elements</a> relative to the elements on either side of it in
+ the list.</li>
<li>
- <p>Let <var title="">node</var> and <var title="">last node</var> be the <var title="">furthest block</var>. Follow these steps:</p>
+ <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><p>Let <var title="">inner loop counter</var> be zero.</li>
- <li><p><i>Inner loop</i>: If <var title="">inner loop counter</var> is greater than or equal
- to three, then go to the next step in the overall algorithm.</li>
+ <li><p><i>Inner loop</i>: If <var title="">inner loop counter</var> is greater than or equal to
+ three, then go to the next step in the overall algorithm.</li>
<li><p>Increment <var title="">inner loop counter</var> by one.</li>
- <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>, or if <var title="">node</var> is no longer in
- the <a href=#stack-of-open-elements>stack of open elements</a> (e.g. because it got
- removed by the next step), the element that was immediately
- above <var title="">node</var> in the <a href=#stack-of-open-elements>stack of open
- elements</a> before <var title="">node</var> was
- removed.</li>
+ <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>, or if <var title="">node</var> is no longer in the
+ <a href=#stack-of-open-elements>stack of open elements</a> (e.g. because it got removed by the next step), the element
+ that was immediately above <var title="">node</var> in the <a href=#stack-of-open-elements>stack of open elements</a>
+ before <var title="">node</var> was removed.</li>
- <li>If <var title="">node</var> is not in the <a href=#list-of-active-formatting-elements>list of
- active formatting elements</a>, then remove <var title="">node</var> from the <a href=#stack-of-open-elements>stack of open
- elements</a> and then go back to the step labeled <i>inner
- loop</i>.</li>
+ <li>If <var title="">node</var> is not in the <a href=#list-of-active-formatting-elements>list of active formatting elements</a>,
+ then remove <var title="">node</var> from the <a href=#stack-of-open-elements>stack of open elements</a> and then go
+ back to the step labeled <i>inner loop</i>.</li>
- <li>Otherwise, if <var title="">node</var> is the <var title="">formatting element</var>, then go to the next step
- in the overall algorithm.</li>
+ <li>Otherwise, if <var title="">node</var> is the <var title="">formatting element</var>, then
+ go to the next step in the overall algorithm.</li>
- <li><a href=#create-an-element-for-the-token>Create an element for the token</a> for which the
- element <var title="">node</var> was created, with <var title="">common ancestor</var> as the intended parent; replace the entry
- for <var title="">node</var> in the <a href=#list-of-active-formatting-elements>list of active
- formatting elements</a> with an entry for the new element,
- replace the entry for <var title="">node</var> in the
- <a href=#stack-of-open-elements>stack of open elements</a> with an entry for the new
- element, and let <var title="">node</var> be the new
- element.</li>
+ <li><a href=#create-an-element-for-the-token>Create an element for the token</a> for which the element <var title="">node</var>
+ was created, with <var title="">common ancestor</var> as the intended parent; replace the entry
+ for <var title="">node</var> in the <a href=#list-of-active-formatting-elements>list of active formatting elements</a> with an
+ entry for the new element, replace the entry for <var title="">node</var> in the <a href=#stack-of-open-elements>stack of
+ open elements</a> with an entry for the new element, and let <var title="">node</var> be the
+ new element.</li>
- <li>If <var title="">last node</var> is the <var title="">furthest block</var>, then move the aforementioned
- bookmark to be immediately after the new <var title="">node</var> in the <a href=#list-of-active-formatting-elements>list of active formatting
- elements</a>.</li>
+ <li>If <var title="">last node</var> is the <var title="">furthest block</var>, then move the
+ aforementioned bookmark to be immediately after the new <var title="">node</var> in the
+ <a href=#list-of-active-formatting-elements>list of active formatting elements</a>.</li>
- <li>Insert <var title="">last node</var> into <var title="">node</var>, first removing it from its previous
- parent node if any.</li>
+ <li>Insert <var title="">last node</var> into <var title="">node</var>, first removing it from
+ its previous parent node if any.</li>
<li>Let <var title="">last node</var> be <var title="">node</var>.</li>
@@ -91780,31 +91564,26 @@
</ol></li>
- <li><p>Insert whatever <var title="">last node</var> ended up being in the previous step at the <a href=#appropriate-place-for-inserting-a-node>appropriate
- place for inserting a node</a>, but using <var title="">common ancestor</var> as the <i>override target</i>.</li>
+ <li><p>Insert whatever <var title="">last node</var> ended up being in the previous step at the
+ <a href=#appropriate-place-for-inserting-a-node>appropriate place for inserting a node</a>, but using <var title="">common
+ ancestor</var> as the <i>override target</i>.</li>
- <li><p><a href=#create-an-element-for-the-token>Create an element for the token</a> for which the
- <var title="">formatting element</var> was created, with <var title="">furthest
- block</var> as the intended parent.</li>
+ <li><p><a href=#create-an-element-for-the-token>Create an element for the token</a> for which the <var title="">formatting
+ element</var> was created, with <var title="">furthest block</var> as the intended
+ parent.</li>
- <li><p>Take all of the child nodes of the <var title="">furthest
- block</var> and append them to the element created in the last
- step.</li>
+ <li><p>Take all of the child nodes of the <var title="">furthest block</var> and append them to
+ the element created in the last step.</li>
- <li><p>Append that new element to the <var title="">furthest
- block</var>.</li>
+ <li><p>Append that new element to the <var title="">furthest block</var>.</li>
- <li><p>Remove the <var title="">formatting element</var> from the
- <a href=#list-of-active-formatting-elements>list of active formatting elements</a>, and insert the
- new element into the <a href=#list-of-active-formatting-elements>list of active formatting
- elements</a> at the position of the aforementioned
- bookmark.</li>
+ <li><p>Remove the <var title="">formatting element</var> from the <a href=#list-of-active-formatting-elements>list of active formatting
+ elements</a>, and insert the new element into the <a href=#list-of-active-formatting-elements>list of active formatting
+ elements</a> at the position of the aforementioned bookmark.</li>
- <li><p>Remove the <var title="">formatting element</var> from the
- <a href=#stack-of-open-elements>stack of open elements</a>, and insert the new element
- into the <a href=#stack-of-open-elements>stack of open elements</a> immediately below
- the position of the <var title="">furthest block</var> in that
- stack.</li>
+ <li><p>Remove the <var title="">formatting element</var> from the <a href=#stack-of-open-elements>stack of open
+ elements</a>, and insert the new element into the <a href=#stack-of-open-elements>stack of open elements</a>
+ immediately below the position of the <var title="">furthest block</var> in that stack.</li>
<li><p>Jump back to the step labeled <i>outer loop</i>.</li>
Modified: index
===================================================================
--- index 2013-07-31 19:11:24 UTC (rev 8105)
+++ index 2013-07-31 19:27:34 UTC (rev 8106)
@@ -39349,41 +39349,32 @@
};
<a href=#htmlareaelement>HTMLAreaElement</a> implements <a href=#urlutils>URLUtils</a>;</pre>
</dd>
- </dl><!--TOPIC:HTML--><!--CLEANUP--><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>
+ </dl><!--TOPIC:HTML--><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>
- <p>An <code><a href=#the-area-element>area</a></code> element with a parent node must have a <code><a href=#the-map-element>map</a></code> element
- ancestor or a <code><a href=#the-template-element>template</a></code> element ancestor.</p>
+ <p>An <code><a href=#the-area-element>area</a></code> element with a parent node must have a <code><a href=#the-map-element>map</a></code> element ancestor
+ or a <code><a href=#the-template-element>template</a></code> element ancestor.</p>
- <p>If the <code><a href=#the-area-element>area</a></code> element has an <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute, then the
- <code><a href=#the-area-element>area</a></code> element represents a <a href=#hyperlink>hyperlink</a>. In
- this case, the <dfn id=attr-area-alt title=attr-area-alt><code>alt</code></dfn>
- attribute must be present. It specifies the text of the
- hyperlink. Its value must be text that, when presented with the
- texts specified for the other hyperlinks of the <a href=#image-map>image
- map</a>, and with the alternative text of the image, but without
- the image itself, provides the user with the same kind of choice as
- the hyperlink would when used without its text but with its shape
- applied to the image. The <code title=attr-area-alt><a href=#attr-area-alt>alt</a></code>
- attribute may be left blank if there is another <code><a href=#the-area-element>area</a></code>
- element in the same <a href=#image-map>image map</a> that points to the same
- resource and has a non-blank <code title=attr-area-alt><a href=#attr-area-alt>alt</a></code>
- attribute.</p>
+ <p>If the <code><a href=#the-area-element>area</a></code> element has an <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code>
+ attribute, then the <code><a href=#the-area-element>area</a></code> element represents a <a href=#hyperlink>hyperlink</a>. In this case,
+ the <dfn id=attr-area-alt title=attr-area-alt><code>alt</code></dfn> attribute must be present. It specifies the
+ text of the hyperlink. Its value must be text that, when presented with the texts specified for
+ the other hyperlinks of the <a href=#image-map>image map</a>, and with the alternative text of the image,
+ but without the image itself, provides the user with the same kind of choice as the hyperlink
+ would when used without its text but with its shape applied to the image. The <code title=attr-area-alt><a href=#attr-area-alt>alt</a></code> attribute may be left blank if there is another <code><a href=#the-area-element>area</a></code>
+ element in the same <a href=#image-map>image map</a> that points to the same resource and has a non-blank
+ <code title=attr-area-alt><a href=#attr-area-alt>alt</a></code> attribute.</p>
- <p>If the <code><a href=#the-area-element>area</a></code> element has no <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute, then the area
- represented by the element cannot be selected, and the <code title=attr-area-alt><a href=#attr-area-alt>alt</a></code> attribute must be omitted.</p>
+ <p>If the <code><a href=#the-area-element>area</a></code> element has no <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code>
+ attribute, then the area represented by the element cannot be selected, and the <code title=attr-area-alt><a href=#attr-area-alt>alt</a></code> attribute must be omitted.</p>
- <p>In both cases, the <code title=attr-area-shape><a href=#attr-area-shape>shape</a></code> and
- <code title=attr-area-coords><a href=#attr-area-coords>coords</a></code> attributes specify the
- area.</p>
+ <p>In both cases, the <code title=attr-area-shape><a href=#attr-area-shape>shape</a></code> and <code title=attr-area-coords><a href=#attr-area-coords>coords</a></code> attributes specify the area.</p>
- <p>The <dfn id=attr-area-shape title=attr-area-shape><code>shape</code></dfn>
- attribute is an <a href=#enumerated-attribute>enumerated attribute</a>. The following
- table lists the keywords defined for this attribute. The states
- given in the first cell of the rows with keywords give the states to
- which those keywords map. <span class=impl>Some of the keywords
- are non-conforming, as noted in the last column.</span></p>
+ <p>The <dfn id=attr-area-shape title=attr-area-shape><code>shape</code></dfn> attribute is an <a href=#enumerated-attribute>enumerated
+ attribute</a>. The following table lists the keywords defined for this attribute. The states
+ given in the first cell of the rows with keywords give the states to which those keywords map.
+ <span class=impl>Some of the keywords are non-conforming, as noted in the last
+ column.</span></p>
<table><thead><tr><th>State
<th>Keywords
@@ -39406,51 +39397,41 @@
<td class=impl>
<tr><td class=impl><dfn id=attr-area-shape-keyword-rectangle title=attr-area-shape-keyword-rectangle><code>rectangle</code></dfn>
<td class=impl>Non-conforming
- </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>
+ </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>
- attribute must, if specified, contain a <a href=#valid-list-of-integers>valid list of
- integers</a>. This attribute gives the coordinates for the shape
- described by the <code title=attr-area-shape><a href=#attr-area-shape>shape</a></code>
- attribute. <span class=impl>The processing for this attribute is
- described as part of the <a href=#image-map>image map</a> processing
+ <p>The <dfn id=attr-area-coords title=attr-area-coords><code>coords</code></dfn> attribute must, if specified,
+ contain a <a href=#valid-list-of-integers>valid list of integers</a>. This attribute gives the coordinates for the shape
+ described by the <code title=attr-area-shape><a href=#attr-area-shape>shape</a></code> attribute. <span class=impl>The
+ processing for this attribute is described as part of the <a href=#image-map>image map</a> processing
model.</span></p>
- <!-- v2: It was suggested by John S. Urban that coords should
- support percentages as well as pixels, so that one could use the
- same image map for images of various sizes. -->
+ <!-- v2: It was suggested by John S. Urban that coords should support percentages as well as
+ pixels, so that one could use the same image map for images of various sizes. -->
- <p>In the <dfn id=attr-area-shape-circle title=attr-area-shape-circle>circle state</dfn>,
- <code><a href=#the-area-element>area</a></code> elements must have a <code title=attr-area-coords><a href=#attr-area-coords>coords</a></code> attribute present, with three
- integers, the last of which must be non-negative. The first integer
- must be the distance in CSS pixels from the left edge of the image
- to the center of the circle, the second integer must be the distance
- in CSS pixels from the top edge of the image to the center of the
- circle, and the third integer must be the radius of the circle,
- again in CSS pixels.</p>
+ <p>In the <dfn id=attr-area-shape-circle title=attr-area-shape-circle>circle state</dfn>, <code><a href=#the-area-element>area</a></code> elements must
+ have a <code title=attr-area-coords><a href=#attr-area-coords>coords</a></code> attribute present, with three integers, the
+ last of which must be non-negative. The first integer must be the distance in CSS pixels from the
+ left edge of the image to the center of the circle, the second integer must be the distance in CSS
+ pixels from the top edge of the image to the center of the circle, and the third integer must be
+ the radius of the circle, again in CSS pixels.</p>
- <p>In the <dfn id=attr-area-shape-default title=attr-area-shape-default>default state</dfn>
- state, <code><a href=#the-area-element>area</a></code> elements must not have a <code title=attr-area-coords><a href=#attr-area-coords>coords</a></code> attribute. (The area is the
+ <p>In the <dfn id=attr-area-shape-default title=attr-area-shape-default>default state</dfn> state, <code><a href=#the-area-element>area</a></code>
+ elements must not have a <code title=attr-area-coords><a href=#attr-area-coords>coords</a></code> attribute. (The area is the
whole image.)</p>
- <p>In the <dfn id=attr-area-shape-poly title=attr-area-shape-poly>polygon state</dfn>,
- <code><a href=#the-area-element>area</a></code> elements must have a <code title=attr-area-coords><a href=#attr-area-coords>coords</a></code> attribute with at least six
- integers, and the number of integers must be even. Each pair of
- integers must represent a coordinate given as the distances from the
- left and the top of the image in CSS pixels respectively, and all
- the coordinates together must represent the points of the polygon,
- in order.</p>
+ <p>In the <dfn id=attr-area-shape-poly title=attr-area-shape-poly>polygon state</dfn>, <code><a href=#the-area-element>area</a></code> elements must
+ have a <code title=attr-area-coords><a href=#attr-area-coords>coords</a></code> attribute with at least six integers, and the
+ number of integers must be even. Each pair of integers must represent a coordinate given as the
+ distances from the left and the top of the image in CSS pixels respectively, and all the
+ coordinates together must represent the points of the polygon, in order.</p>
- <p>In the <dfn id=attr-area-shape-rect title=attr-area-shape-rect>rectangle state</dfn>,
- <code><a href=#the-area-element>area</a></code> elements must have a <code title=attr-area-coords><a href=#attr-area-coords>coords</a></code> attribute with exactly four
- integers, the first of which must be less than the third, and the
- second of which must be less than the fourth. The four points must
- represent, respectively, the distance from the left edge of the
- image to the left side of the rectangle, the distance from the
- top edge to the top side, the distance from the left edge to the
- right side, and the distance from the top edge to the bottom side,
- all in CSS pixels.</p>
+ <p>In the <dfn id=attr-area-shape-rect title=attr-area-shape-rect>rectangle state</dfn>, <code><a href=#the-area-element>area</a></code> elements must
+ have a <code title=attr-area-coords><a href=#attr-area-coords>coords</a></code> attribute with exactly four integers, the
+ first of which must be less than the third, and the second of which must be less than the fourth.
+ The four points must represent, respectively, the distance from the left edge of the image to the
+ left side of the rectangle, the distance from the top edge to the top side, the distance from the
+ left edge to the right side, and the distance from the top edge to the bottom side, all in CSS
+ pixels.</p>
<div class=impl>
@@ -39468,27 +39449,28 @@
attributes must be omitted if the <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute is not
present.</p>
- <p>If the <code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code> attribute is specified on an <code><a href=#the-area-element>area</a></code>
- element, then the <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute must also be
- specified.</p>
+ <p>If the <code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code> attribute is specified on an
+ <code><a href=#the-area-element>area</a></code> element, then the <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute must
+ also be specified.</p>
<div class=impl>
-<!--CLEANUP-->
<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><!-- c.f. <a>'s similar section --><li><p>If the <code><a href=#the-area-element>area</a></code> element's <code><a href=#document>Document</a></code> is not <a href=#fully-active>fully active</a>, then abort these steps.</li>
+ <ol><!-- c.f. <a>'s similar section --><li><p>If the <code><a href=#the-area-element>area</a></code> element's <code><a href=#document>Document</a></code> is not <a href=#fully-active>fully active</a>,
+ then abort these steps.</li>
<li>
- <p>If the <code><a href=#the-area-element>area</a></code> element has
- a <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code> attribute and the algorithm is not
- <a href=#allowed-to-show-a-popup>allowed to show a popup</a>, or the element's <code title=attr-hyperlink-target><a href=#attr-hyperlink-target>target</a></code> attribute is present and applying <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name>the rules for
- choosing a browsing context given a browsing context name</a>, using the value of the <code title=attr-hyperlink-target><a href=#attr-hyperlink-target>target</a></code> attribute as the browsing context name, would result
- in there not being a chosen browsing context, then run these substeps:</p>
+ <p>If the <code><a href=#the-area-element>area</a></code> element has a <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code>
+ attribute and the algorithm is not <a href=#allowed-to-show-a-popup>allowed to show a popup</a>, or the element's <code title=attr-hyperlink-target><a href=#attr-hyperlink-target>target</a></code> attribute is present and applying <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name>the rules
+ for choosing a browsing context given a browsing context name</a>, using the value of the
+ <code title=attr-hyperlink-target><a href=#attr-hyperlink-target>target</a></code> attribute as the browsing context name, would
+ result in there not being a chosen browsing context, then run these substeps:</p>
- <ol><li><p>If there is an <a href=#entry-script>entry script</a>, throw an <code><a href=#invalidaccesserror>InvalidAccessError</a></code> exception.</li>
+ <ol><li><p>If there is an <a href=#entry-script>entry script</a>, throw an <code><a href=#invalidaccesserror>InvalidAccessError</a></code>
+ exception.</li>
<li><p>Abort these steps without following the hyperlink.</li>
@@ -66525,13 +66507,13 @@
</dd>
</dl><div class=impl>
-<!--CLEANUP-->
<p>The <dfn id=dom-document-domain title=dom-document-domain><code>domain</code></dfn> attribute on
<code><a href=#document>Document</a></code> objects must be initialized to <a href="#the-document's-domain">the document's domain</a>, if it has
- one, and the empty string otherwise. If <a href="#the-document's-domain">the document's domain</a> starts with a U+005B LEFT SQUARE BRACKET
- character ([) and ends with a U+005D RIGHT SQUARE BRACKET character (]), it is an IPv6 address;
- these square brackets must be omitted when initializing the attribute's value.</p>
+ one, and the empty string otherwise. If <a href="#the-document's-domain">the document's domain</a> starts with a U+005B
+ LEFT SQUARE BRACKET character ([) and ends with a U+005D RIGHT SQUARE BRACKET character (]), it is
+ an IPv6 address; these square brackets must be omitted when initializing the attribute's
+ value.</p>
<p>On getting, the attribute must return its current value, unless the <code><a href=#document>Document</a></code> has
no <a href=#browsing-context>browsing context</a>, in which case it must return the empty string.</p>
@@ -66564,10 +66546,9 @@
<p>If <var title="">new value</var> is not exactly equal to the 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>
-<!--CLEANUP-->
- <p>If the current value is an IPv4 or IPv6 address, throw a <code><a href=#securityerror>SecurityError</a></code> exception and
- abort these steps.</p>
+ <p>If the current value is an IPv4 or IPv6 address, throw a <code><a href=#securityerror>SecurityError</a></code>
+ exception and abort these steps.</p>
</li>
@@ -72107,19 +72088,18 @@
<!-- SCRIPT EXEC -->
<h4 id=javascript-protocol><span class=secno>7.1.5 </span><dfn title="javascript protocol">The <code title="">javascript:</code> URL scheme</dfn></h4>
- <p>When a <a href=#url>URL</a> using the <code title="">javascript:</code> scheme is <dfn id=concept-js-deref title=concept-js-deref>dereferenced</dfn>, the user agent must run
- the following steps:</p>
+ <p>When a <a href=#url>URL</a> using the <code title="">javascript:</code> scheme 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
- content retrieval operation defined for <code title="">javascript:</code> URLs. <a href=#refsJSURL>[JSURL]</a></li>
+ <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>
<li>
<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>
- URL, and the <a href=#source-browsing-context>source browsing context</a> for that
- navigation, if any, has <a href=#concept-bc-noscript title=concept-bc-noscript>scripting disabled</a></dt>
+ <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=#source-browsing-context>source browsing context</a> for that navigation,
+ if any, has <a href=#concept-bc-noscript title=concept-bc-noscript>scripting disabled</a></dt>
<dd>
@@ -72127,66 +72107,50 @@
</dd>
- <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>
+ <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>
<dd>
<!-- http://www.hixie.ch/tests/adhoc/html/navigation/javascript-url/ -->
- <p>Let <var title="">address</var> be the <a href="#the-document's-address" title="the
- document's address">address</a> of the <a href=#active-document>active
- document</a> of the <a href=#browsing-context>browsing context</a> being
- navigated.</p>
+ <p>Let <var title="">address</var> be the <a href="#the-document's-address" title="the document's address">address</a>
+ of the <a href=#active-document>active document</a> of the <a href=#browsing-context>browsing context</a> being navigated.</p>
- <p>If <var title="">address</var> is <code><a href=#about:blank>about:blank</a></code>,
- and the <a href=#browsing-context>browsing context</a> being navigated has a
- <a href=#creator-browsing-context>creator browsing context</a>, then let <var title="">address</var> be the <a href="#the-document's-address" title="the document's
- address">address</a> of the <a href=#creator-document>creator
- <code>Document</code></a> instead.</p>
+ <p>If <var title="">address</var> is <code><a href=#about:blank>about:blank</a></code>, and the <a href=#browsing-context>browsing
+ context</a> being navigated has a <a href=#creator-browsing-context>creator browsing context</a>, then let <var title="">address</var> be the <a href="#the-document's-address" title="the document's address">address</a> of the
+ <a href=#creator-document>creator <code>Document</code></a> instead.</p>
- <p><a href=#create-a-script-from-a-node title="create a script from a node">Create a
- script</a> from the <code><a href=#document>Document</a></code> node of the
- <a href=#active-document>active document</a>, using the aforementioned script
- source, the <a href=#url>URL</a> of the resource where the
- <code>javascript:</code> URL, was found, and assuming the
- scripting language is JavaScript.</p>
+ <p><a href=#create-a-script-from-a-node title="create a script from a node">Create a script</a> from the
+ <code><a href=#document>Document</a></code> node of the <a href=#active-document>active document</a>, using the aforementioned
+ script source, the <a href=#url>URL</a> of the resource where the <code>javascript:</code> URL,
+ was found, and assuming the scripting language is JavaScript.</p>
- <p>Let <var title="">result</var> be the return value of the
- <i><a href=#initial-code-entry-point>initial code entry-point</a></i> of this <a href=#concept-script title=concept-script>script</a>. If an exception was
- thrown, let <var title="">result</var> be void instead. (The
- result will be void also if <a href=#concept-bc-noscript title=concept-bc-noscript>scripting is disabled</a>.)</p>
+ <p>Let <var title="">result</var> be the return value of the <i><a href=#initial-code-entry-point>initial code entry-point</a></i>
+ of this <a href=#concept-script title=concept-script>script</a>. If an exception was thrown, let <var title="">result</var> be void instead. (The result will be void also if <a href=#concept-bc-noscript title=concept-bc-noscript>scripting is disabled</a>.)</p>
- <p>When it comes time to <a href="#set-the-document's-address">set the document's address</a>
- in the <a href=#navigate title=navigate>navigation algorithm</a>, use
- <var title="">address</var> as the <a href=#override-url>override
- URL</a>.</p>
+ <p>When it comes time to <a href="#set-the-document's-address">set the document's address</a> in the <a href=#navigate title=navigate>navigation algorithm</a>, use <var title="">address</var> as the
+ <a href=#override-url>override URL</a>.</p>
</dd>
-<!--(turns out only Firefox does this, and only for <img src=""> and a
- few others, so it's commented out for now pending someone having
- a convincing use case)
+<!--(turns out only Firefox does this, and only for <img src=""> and a few others, so it's commented
+ out for now pending someone having a convincing use case)
- <dt>If the <code>Document</code> object of the element,
- attribute, or style sheet from which the <code>javascript:</code>
- URL was reached has an associated <span>browsing
+ <dt>If the <code>Document</code> object of the element, attribute, or style sheet from which
+ the <code>javascript:</code> URL was reached has an associated <span>browsing
context</span></dt>
<dd>
- <p><span>Create an impotent script</span> using the
- aforementioned script source, with the scripting language set to
- JavaScript, and with the <code>Document</code>'s object's
+ <p><span>Create an impotent script</span> using the aforementioned script source, with the
+ scripting language set to JavaScript, and with the <code>Document</code>'s object's
<span>browsing context</span> as the browsing context.</p>
- <p>Let <var title="">result</var> be the return value of the
- <i>initial code entry-point</i> of this <span
- title="concept-script">script</span>. If an exception was
- thrown, let <var title="">result</var> be void instead. (The
- result will be void also if <span
+ <p>Let <var title="">result</var> be the return value of the <i>initial code entry-point</i>
+ of this <span title="concept-script">script</span>. If an exception was thrown, let <var
+ title="">result</var> be void instead. (The result will be void also if <span
title="concept-bc-noscript">scripting is disabled</span>.)</p>
</dd>
@@ -72204,38 +72168,31 @@
<li>
- <p>If the result of executing the script is void (there is no
- return value), then the URL must be treated in a manner equivalent
- to an HTTP resource with an HTTP 204 No Content response.</p>
+ <p>If the result of executing the script is void (there is no return value), then the URL must
+ be treated in a manner equivalent to an HTTP resource with an HTTP 204 No Content response.</p>
- <p>Otherwise, the URL must be treated in a manner equivalent to an
- HTTP resource with a 200 OK response whose <a href=#content-type title=Content-Type>Content-Type metadata</a> is
- <code><a href=#text/html>text/html</a></code> and whose response body is the return value
- converted to a string value.</p>
+ <p>Otherwise, the URL must be treated in a manner equivalent to an HTTP resource with a 200 OK
+ response whose <a href=#content-type title=Content-Type>Content-Type metadata</a> is <code><a href=#text/html>text/html</a></code>
+ and whose response body is the return value converted to a string value.</p>
- <p class=note>Certain contexts, in particular <code><a href=#the-img-element>img</a></code>
- elements, ignore the <a href=#content-type title=Content-Type>Content-Type
- metadata</a>.</p>
+ <p class=note>Certain contexts, in particular <code><a href=#the-img-element>img</a></code> elements, ignore the <a href=#content-type title=Content-Type>Content-Type metadata</a>.</p>
</li>
</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
- empty object as soon as the attribute is set; it would then be
- sniffed to determine the image type and decoded as an image.</p>
+ <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 empty object as soon as the attribute is set; it would then be sniffed to
+ determine the image type and decoded as an image.</p>
- <p>A <code title="">javascript:</code> URL in an <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute of an <code><a href=#the-a-element>a</a></code>
- element would only be evaluated when the link was <a href=#following-hyperlinks title="following hyperlinks">followed</a>.</p>
+ <p>A <code title="">javascript:</code> URL in an <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code>
+ attribute of an <code><a href=#the-a-element>a</a></code> element would only be evaluated when the link was <a href=#following-hyperlinks title="following hyperlinks">followed</a>.</p>
- <p>The <code title=attr-iframe-src><a href=#attr-iframe-src>src</a></code> attribute of an
- <code><a href=#the-iframe-element>iframe</a></code> element would be evaluated in the context of
- the <code><a href=#the-iframe-element>iframe</a></code>'s own <a href=#browsing-context>browsing context</a>; once
- evaluated, its return value (if it was not void) would replace that
- <a href=#browsing-context>browsing context</a>'s document, thus changing the
- variables visible in that <a href=#browsing-context>browsing context</a>.</p>
+ <p>The <code title=attr-iframe-src><a href=#attr-iframe-src>src</a></code> attribute of an <code><a href=#the-iframe-element>iframe</a></code> element would
+ be evaluated in the context of the <code><a href=#the-iframe-element>iframe</a></code>'s own <a href=#browsing-context>browsing context</a>; once
+ evaluated, its return value (if it was not void) would replace that <a href=#browsing-context>browsing
+ context</a>'s document, thus changing the variables visible in that <a href=#browsing-context>browsing
+ context</a>.</p>
</div>
@@ -73120,8 +73077,8 @@
<dd>
- <p>Schedules a timeout to run <var title="">handler</var> after
- <var title="">timeout</var> milliseconds. Any <var title="">arguments</var> are passed straight through to the <var title="">handler</var>.</p>
+ <p>Schedules a timeout to run <var title="">handler</var> after <var title="">timeout</var>
+ milliseconds. Any <var title="">arguments</var> are passed straight through to the <var title="">handler</var>.</p>
</dd>
@@ -73129,8 +73086,7 @@
<dd>
- <p>Schedules a timeout to compile and run <var title="">code</var>
- after <var title="">timeout</var> milliseconds.</p>
+ <p>Schedules a timeout to compile and run <var title="">code</var> after <var title="">timeout</var> milliseconds.</p>
</dd>
@@ -73138,7 +73094,8 @@
<dd>
- <p>Cancels the timeout set with <code title=dom-windowtimers-setTimeout><a href=#dom-windowtimers-settimeout>setTimeout()</a></code> identified by <var title="">handle</var>.</p>
+ <p>Cancels the timeout set with <code title=dom-windowtimers-setTimeout><a href=#dom-windowtimers-settimeout>setTimeout()</a></code>
+ identified by <var title="">handle</var>.</p>
</dd>
@@ -73146,8 +73103,8 @@
<dd>
- <p>Schedules a timeout to run <var title="">handler</var> every
- <var title="">timeout</var> milliseconds. Any <var title="">arguments</var> are passed straight through to the <var title="">handler</var>.</p>
+ <p>Schedules a timeout to run <var title="">handler</var> every <var title="">timeout</var>
+ milliseconds. Any <var title="">arguments</var> are passed straight through to the <var title="">handler</var>.</p>
</dd>
@@ -73155,8 +73112,7 @@
<dd>
- <p>Schedules a timeout to compile and run <var title="">code</var>
- every <var title="">timeout</var> milliseconds.</p>
+ <p>Schedules a timeout to compile and run <var title="">code</var> every <var title="">timeout</var> milliseconds.</p>
</dd>
@@ -73425,34 +73381,31 @@
<p>Displays a modal alert with the given message, and waits for the user to dismiss it.</p>
- <p>A call to the <code title=dom-navigator-yieldForStorageUpdates><a href=#dom-navigator-yieldforstorageupdates>navigator.yieldForStorageUpdates()</a></code>
- method is implied when this method is invoked.</p>
+ <p>A call to the <code title=dom-navigator-yieldForStorageUpdates><a href=#dom-navigator-yieldforstorageupdates>navigator.yieldForStorageUpdates()</a></code> method is
+ implied when this method is invoked.</p>
</dd>
<dt><var title="">result</var> = <var title="">window</var> . <code title=dom-confirm><a href=#dom-confirm>confirm</a></code>(<var title="">message</var>)</dt>
<dd>
- <p>Displays a modal OK/Cancel prompt with the given message, waits
- for the user to dismiss it, and returns true if the user clicks OK
- and false if the user clicks Cancel.</p>
+ <p>Displays a modal OK/Cancel prompt with the given message, waits for the user to dismiss it,
+ and returns true if the user clicks OK and false if the user clicks Cancel.</p>
- <p>A call to the <code title=dom-navigator-yieldForStorageUpdates><a href=#dom-navigator-yieldforstorageupdates>navigator.yieldForStorageUpdates()</a></code>
- method is implied when this method is invoked.</p>
+ <p>A call to the <code title=dom-navigator-yieldForStorageUpdates><a href=#dom-navigator-yieldforstorageupdates>navigator.yieldForStorageUpdates()</a></code> method is
+ implied when this method is invoked.</p>
</dd>
<dt><var title="">result</var> = <var title="">window</var> . <code title=dom-prompt><a href=#dom-prompt>prompt</a></code>(<var title="">message</var> [, <var title="">default</var>] )</dt>
<dd>
- <p>Displays a modal text field prompt with the given message,
- waits for the user to dismiss it, and returns the value that the
- user entered. If the user cancels the prompt, then returns null
- instead. If the second argument is present, then the given value
- is used as a default.</p>
+ <p>Displays a modal text field prompt with the given message, waits for the user to dismiss it,
+ and returns the value that the user entered. If the user cancels the prompt, then returns null
+ instead. If the second argument is present, then the given value is used as a default.</p>
- <p>A call to the <code title=dom-navigator-yieldForStorageUpdates><a href=#dom-navigator-yieldforstorageupdates>navigator.yieldForStorageUpdates()</a></code>
- method is implied when this method is invoked.</p>
+ <p>A call to the <code title=dom-navigator-yieldForStorageUpdates><a href=#dom-navigator-yieldforstorageupdates>navigator.yieldForStorageUpdates()</a></code> method is
+ implied when this method is invoked.</p>
</dd>
@@ -73527,54 +73480,46 @@
<p>Prompts the user to print the page.</p>
- <p>A call to the <code title=dom-navigator-yieldForStorageUpdates><a href=#dom-navigator-yieldforstorageupdates>navigator.yieldForStorageUpdates()</a></code>
- method is implied when this method is invoked.</p>
+ <p>A call to the <code title=dom-navigator-yieldForStorageUpdates><a href=#dom-navigator-yieldforstorageupdates>navigator.yieldForStorageUpdates()</a></code> method is
+ implied when this method is invoked.</p>
</dd>
</dl><div class=impl>
- <p>When the <dfn id=dom-print title=dom-print><code>print()</code></dfn> method
- is invoked, if the <code><a href=#document>Document</a></code> is <a href=#ready-for-post-load-tasks>ready for
- post-load tasks</a>, then the user agent must synchronously run
- the <a href=#printing-steps>printing steps</a>. Otherwise, the user agent must only
- set the <dfn id=print-when-loaded>print when loaded</dfn> flag on the
- <code><a href=#document>Document</a></code>.</p>
+ <p>When the <dfn id=dom-print title=dom-print><code>print()</code></dfn> method is invoked, if the
+ <code><a href=#document>Document</a></code> is <a href=#ready-for-post-load-tasks>ready for post-load tasks</a>, then the user agent must
+ synchronously run the <a href=#printing-steps>printing steps</a>. Otherwise, the user agent must only set the
+ <dfn id=print-when-loaded>print when loaded</dfn> flag on the <code><a href=#document>Document</a></code>.</p>
<!--TOPIC:HTML-->
- <p>User agents should also run the <a href=#printing-steps>printing steps</a>
- whenever the user asks for the opportunity to <a href=#obtain-a-physical-form>obtain a
- physical form</a> (e.g. printed copy), or the representation of a
+ <p>User agents should also run the <a href=#printing-steps>printing steps</a> whenever the user asks for the
+ opportunity to <a href=#obtain-a-physical-form>obtain a physical form</a> (e.g. printed copy), or the representation of a
physical form (e.g. PDF copy), of a document.</p>
<p>The <dfn id=printing-steps>printing steps</dfn> are as follows:</p>
<ol><li>
- <p>The user agent may display a message to the user or
- abort these steps (or both).</p>
+ <p>The user agent may display a message to the user or abort these steps (or both).</p>
- <p class=example>For instance, a kiosk browser could silently
- ignore any invocations of the <code title=dom-print><a href=#dom-print>print()</a></code> method.</p>
+ <p class=example>For instance, a kiosk browser could silently ignore any invocations of the
+ <code title=dom-print><a href=#dom-print>print()</a></code> method.</p>
- <p class=example>For instance, a browser on a mobile device
- could detect that there are no printers in the vicinity and
- display a message saying so before continuing to offer a "save to
+ <p class=example>For instance, a browser on a mobile device could detect that there are no
+ printers in the vicinity and display a message saying so before continuing to offer a "save to
PDF" option.</p>
</li>
<li>
- <p>The user agent must <a href=#fire-a-simple-event>fire a simple event</a> named
- <code title=event-beforeprint>beforeprint</code> at the
- <code><a href=#window>Window</a></code> object of the <code><a href=#document>Document</a></code> that is
- being printed, as well as any <a href=#nested-browsing-context title="nested browsing
+ <p>The user agent must <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-beforeprint>beforeprint</code> at the <code><a href=#window>Window</a></code> object of the
+ <code><a href=#document>Document</a></code> that is being printed, as well as any <a href=#nested-browsing-context title="nested browsing
context">nested browsing contexts</a> in it.</p>
- <p class=example>The <code title=event-beforeprint>beforeprint</code> event can be used
- to annotate the printed copy, for instance adding the time at
- which the document was printed.</p>
+ <p class=example>The <code title=event-beforeprint>beforeprint</code> event can be used to
+ annotate the printed copy, for instance adding the time at which the document was printed.</p>
</li>
@@ -73586,32 +73531,25 @@
<li>
- <p>The user agent should offer the user the opportunity to
- <a href=#obtain-a-physical-form>obtain a physical form</a> (or the representation of a
- physical form) of the document. The user agent may wait for the
- user to either accept or decline before returning; if so, the user
- agent must <a href=#pause>pause</a> while the method is waiting. Even if
- the user agent doesn't wait at this point, the user agent must use
- the state of the relevant documents as they are at this point in
- the algorithm if and when it eventually creates the alternate
- form.</p>
+ <p>The user agent should offer the user the opportunity to <a href=#obtain-a-physical-form>obtain a physical form</a>
+ (or the representation of a physical form) of the document. The user agent may wait for the user
+ to either accept or decline before returning; if so, the user agent must <a href=#pause>pause</a>
+ while the method is waiting. Even if the user agent doesn't wait at this point, the user agent
+ must use the state of the relevant documents as they are at this point in the algorithm if and
+ when it eventually creates the alternate form.</p>
</li>
<li>
- <p>The user agent must <a href=#fire-a-simple-event>fire a simple event</a> named
- <code title=event-afterprint>afterprint</code> at the
- <code><a href=#window>Window</a></code> object of the <code><a href=#document>Document</a></code> that is
- being printed, as well as any <a href=#nested-browsing-context title="nested browsing
+ <p>The user agent must <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-afterprint>afterprint</code> at the <code><a href=#window>Window</a></code> object of the
+ <code><a href=#document>Document</a></code> that is being printed, as well as any <a href=#nested-browsing-context title="nested browsing
context">nested browsing contexts</a> in it.</p>
- <p class=example>The <code title=event-afterprint>afterprint</code> event can be used
- to revert annotations added in the earlier event, as well as
- showing post-printing UI. For instance, if a page is walking the
- user through the steps of applying for a home loan, the script
- could automatically advance to the next step after having printed
- a form or other.</p>
+ <p class=example>The <code title=event-afterprint>afterprint</code> event can be used to
+ revert annotations added in the earlier event, as well as showing post-printing UI. For
+ instance, if a page is walking the user through the steps of applying for a home loan, the
+ script could automatically advance to the next step after having printed a form or other.</p>
</li>
@@ -73695,8 +73633,8 @@
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>
<li>have an <a href=#active-document>active document</a> whose <a href=#origin>origin</a> is the <a href=#same-origin title="same
- origin">same</a> as <var title="">incumbent origin</var>,</li> <!-- Note that changing document.domain to talk to another domain doesn't make you
- able to block that domain -->
+ origin">same</a> as <var title="">incumbent origin</var>,</li> <!-- Note that changing
+ 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
of the browsing contexts matching those conditions.</p>
@@ -73916,17 +73854,14 @@
readonly attribute DOMString <a href=#dom-navigator-useragent title=dom-navigator-userAgent>userAgent</a>;
};</pre>
- <p>In certain cases, despite the best efforts of the entire
- industry, Web browsers have bugs and limitations that Web authors
- are forced to work around.</p>
+ <p>In certain cases, despite the best efforts of the entire industry, Web browsers have bugs and
+ limitations that Web authors are forced to work around.</p>
- <p>This section defines a collection of attributes that can be used
- to determine, from script, the kind of user agent in use, in order
- to work around these issues.</p>
+ <p>This section defines a collection of attributes that can be used to determine, from script, the
+ kind of user agent in use, in order to work around these issues.</p>
- <p>Client detection should always be limited to detecting known
- current versions; future versions and unknown versions should always
- be assumed to be fully compliant.</p>
+ <p>Client detection should always be limited to detecting known current versions; future versions
+ and unknown versions should always be assumed to be fully compliant.</p>
<dl class=domintro><dt><var title="">window</var> . <code title=dom-navigator><a href=#dom-navigator>navigator</a></code> . <code title=dom-navigator-appCodeName><a href=#dom-navigator-appcodename>appCodeName</a></code></dt>
<dd>
@@ -74000,11 +73935,10 @@
<!-- vendorSub: Mozilla and Safari only; always returns "" -->
- </dl><!-- similar paragraph in next section --><p class=warning>Any information in this API that varies from user
- to user can be used to profile the user. In fact, if enough such
- information is available, a user can actually be uniquely
- identified. For this reason, user agent implementors are strongly
- urged to include as little information in this API as possible.
+ </dl><!-- similar paragraph in next section --><p class=warning>Any information in this API that varies from user to user can be used to
+ profile the user. In fact, if enough such information is available, a user can actually be
+ uniquely identified. For this reason, user agent implementors are strongly urged to include as
+ little information in this API as possible.
<a href=#fingerprinting-vector class=fingerprint title="fingerprinting vector"><img src=http://images.whatwg.org/fingerprint.png width=46 alt="(This is a fingerprinting vector.)" height=64></a>
</p>
@@ -74604,18 +74538,16 @@
<dd>
<p>If a script uses the <code title=dom-document-cookie><a href=#dom-document-cookie>document.cookie</a></code> API, or the
- <code title=dom-localStorage><a href=#dom-localstorage>localStorage</a></code> API, the
- browser will block other scripts from accessing cookies or storage
- until the first script finishes.
+ <code title=dom-localStorage><a href=#dom-localstorage>localStorage</a></code> API, the browser will block other scripts
+ from accessing cookies or storage until the first script finishes.
</p>
- <p>Calling the <code title=dom-navigator-yieldForStorageUpdates><a href=#dom-navigator-yieldforstorageupdates>navigator.yieldForStorageUpdates()</a></code>
- method tells the user agent to unblock any other scripts that may
- be blocked, even though the script hasn't returned.</p>
+ <p>Calling the <code title=dom-navigator-yieldForStorageUpdates><a href=#dom-navigator-yieldforstorageupdates>navigator.yieldForStorageUpdates()</a></code> method
+ tells the user agent to unblock any other scripts that may be blocked, even though the script
+ hasn't returned.</p>
- <p>Values of cookies and items in the <code><a href=#storage-0>Storage</a></code> objects
- of <code title=dom-localStorage><a href=#dom-localstorage>localStorage</a></code> attributes
- can change after calling this method, whence its name.
+ <p>Values of cookies and items in the <code><a href=#storage-0>Storage</a></code> objects of <code title=dom-localStorage><a href=#dom-localstorage>localStorage</a></code> attributes can change after calling this method,
+ whence its name.
</p>
</dd>
@@ -81428,7 +81360,7 @@
push</a>.</p>
-<!--CLEANUP-->
+
<h4 id=the-eventsource-interface><span class=secno>10.2.2 </span>The <code><a href=#eventsource>EventSource</a></code> interface</h4>
<pre class=idl>[<a href=#dom-eventsource title=dom-EventSource>Constructor</a>(DOMString url, optional <a href=#eventsourceinit>EventSourceInit</a> eventSourceInitDict)]
@@ -81453,16 +81385,13 @@
boolean <dfn id=dom-eventsourceinit-withcredentials title=dom-EventSourceInit-withCredentials>withCredentials</dfn> = false;
};</pre>
- <p>The <dfn id=dom-eventsource title=dom-EventSource><code>EventSource()</code></dfn>
- constructor takes one or two arguments. The first specifies the
- <a href=#url>URL</a> to which to connect. The second specifies the
- settings, if any, in the form of an <code><a href=#eventsourceinit>EventSourceInit</a></code>
- dictionary. When the <code>EventSource()</code> constructor is
- invoked, the UA must run these steps:</p>
+ <p>The <dfn id=dom-eventsource title=dom-EventSource><code>EventSource()</code></dfn> constructor takes one or two
+ arguments. The first specifies the <a href=#url>URL</a> to which to connect. The second specifies the
+ settings, if any, in the form of an <code><a href=#eventsourceinit>EventSourceInit</a></code> dictionary. When the
+ <code>EventSource()</code> constructor is invoked, the UA must run these steps:</p>
- <ol><li><p><a href=#resolve-a-url title="resolve a url">Resolve</a> the
- <a href=#url>URL</a> specified in the first argument, relative to the
- <a href=#entry-script>entry script</a>'s <a href="#script's-base-url" title="script's base URL">base
+ <ol><li><p><a href=#resolve-a-url title="resolve a url">Resolve</a> the <a href=#url>URL</a> specified in the first
+ argument, relative to the <a href=#entry-script>entry script</a>'s <a href="#script's-base-url" title="script's base URL">base
URL</a>.
</li>
@@ -81473,138 +81402,116 @@
<li><p>Let <var title="">CORS mode</var> be <a href=#attr-crossorigin-anonymous title=attr-crossorigin-anonymous>Anonymous</a>.</li>
- <li><p>If the second argument is present, and the <code title=dom-EventSourceInit-withCredentials><a href=#dom-eventsourceinit-withcredentials>withCredentials</a></code>
- dictionary member has the value true, then set <var title="">CORS
- mode</var> to <a href=#attr-crossorigin-use-credentials title=attr-crossorigin-use-credentials>Use
- Credentials</a> and initialize the new <code><a href=#eventsource>EventSource</a></code>
- object's <code title=dom-EventSource-withCredentials><a href=#dom-eventsource-withcredentials>withCredentials</a></code>
- attribute to true.</li>
+ <li><p>If the second argument is present, and the <code title=dom-EventSourceInit-withCredentials><a href=#dom-eventsourceinit-withcredentials>withCredentials</a></code> dictionary member has the
+ value true, then set <var title="">CORS mode</var> to <a href=#attr-crossorigin-use-credentials title=attr-crossorigin-use-credentials>Use Credentials</a> and initialize the new
+ <code><a href=#eventsource>EventSource</a></code> object's <code title=dom-EventSource-withCredentials><a href=#dom-eventsource-withcredentials>withCredentials</a></code> attribute to true.</li>
- <li><p>Return the new <code><a href=#eventsource>EventSource</a></code> object, but continue
- these steps asynchronously.</li>
+ <li><p>Return the new <code><a href=#eventsource>EventSource</a></code> object, but continue these steps
+ asynchronously.</li>
<li><!-- if you change this, don't forget to update the
reconnecting fetch lower down as well! -->
- <p>Do a <a href=#potentially-cors-enabled-fetch>potentially CORS-enabled fetch</a><!--FETCH--> of
- the resulting <a href=#absolute-url>absolute URL</a> using the <a href=#entry-script>entry
- script</a>'s <a href="#script's-referrer-source" title="script's referrer source">referrer
- source</a>, with the <i>mode</i> being <var title="">CORS
- mode</var>, and the <i title="">origin</i> being the <a href=#entry-script>entry
- script</a>'s <a href=#origin>origin</a><!--, and the <i>default origin
- behaviour</i> set to <i>fail</i> (though it has no effect in the
- "Anonymous" and "Use Credentials" modes)-->, and process the
- resource obtained in this fashion, if any, as described below.</p>
+ <p>Do a <a href=#potentially-cors-enabled-fetch>potentially CORS-enabled fetch</a><!--FETCH--> of the resulting <a href=#absolute-url>absolute
+ URL</a> using the <a href=#entry-script>entry script</a>'s <a href="#script's-referrer-source" title="script's referrer source">referrer
+ source</a>, with the <i>mode</i> being <var title="">CORS mode</var>, and the <i title="">origin</i> being the <a href=#entry-script>entry script</a>'s <a href=#origin>origin</a><!--, and the
+ <i>default origin behaviour</i> set to <i>fail</i> (though it has no effect in the "Anonymous"
+ and "Use Credentials" modes)-->, and process the resource obtained in this fashion, if any, as
+ described below.</p>
- <p class=note>The definition of the <a href=#fetch title=fetch>fetching</a> algorithm (which is used by CORS) is
- such that if the browser is already fetching the resource
- identified by the given <a href=#absolute-url>absolute URL</a>, that connection
- can be reused, instead of a new connection being established. All
- messages received up to this point are dispatched immediately, in
- this case.</p>
+ <p class=note>The definition of the <a href=#fetch title=fetch>fetching</a> algorithm (which is
+ used by CORS) is such that if the browser is already fetching the resource identified by the
+ given <a href=#absolute-url>absolute URL</a>, that connection can be reused, instead of a new connection
+ being established. All messages received up to this point are dispatched immediately, in this
+ case.</p>
</li>
- </ol><hr><p>The <dfn id=dom-eventsource-url title=dom-EventSource-url><code>url</code></dfn>
- attribute must return the <a href=#absolute-url>absolute URL</a> that resulted
- from <a href=#resolve-a-url title="resolve a url">resolving</a> the value that was
- passed to the constructor.</p> <!-- not the result of redirects,
- since that would introduce race conditions -->
+ </ol><hr><p>The <dfn id=dom-eventsource-url title=dom-EventSource-url><code>url</code></dfn> attribute must return the
+ <a href=#absolute-url>absolute URL</a> that resulted from <a href=#resolve-a-url title="resolve a url">resolving</a> the
+ value that was passed to the constructor.</p> <!-- not the result of redirects, since that would
+ introduce race conditions -->
- <p>The <dfn id=dom-eventsource-withcredentials title=dom-EventSource-withCredentials><code>withCredentials</code></dfn>
- attribute must return the value to which it was last initialized.
- When the object is created, it must be initialized to false.</p>
+ <p>The <dfn id=dom-eventsource-withcredentials title=dom-EventSource-withCredentials><code>withCredentials</code></dfn> attribute
+ must return the value to which it was last initialized. When the object is created, it must be
+ initialized to false.</p>
- <p>The <dfn id=dom-eventsource-readystate title=dom-EventSource-readyState><code>readyState</code></dfn>
- attribute represents the state of the connection. It can have the
- following values:</p>
+ <p>The <dfn id=dom-eventsource-readystate title=dom-EventSource-readyState><code>readyState</code></dfn> attribute represents
+ the state of the connection. It can have the following values:</p>
<dl><dt><dfn id=dom-eventsource-connecting title=dom-EventSource-CONNECTING><code>CONNECTING</code></dfn> (numeric value 0)</dt>
- <dd>The connection has not yet been established, or it was closed
- and the user agent is reconnecting.</dd>
+ <dd>The connection has not yet been established, or it was closed and the user agent is
+ reconnecting.</dd>
<dt><dfn id=dom-eventsource-open title=dom-EventSource-OPEN><code>OPEN</code></dfn> (numeric value 1)</dt>
- <dd>The user agent has an open connection and is dispatching events
- as it receives them.</dd>
+ <dd>The user agent has an open connection and is dispatching events as it receives them.</dd>
<dt><dfn id=dom-eventsource-closed title=dom-EventSource-CLOSED><code>CLOSED</code></dfn> (numeric value 2)</dt>
- <dd>The connection is not open, and the user agent is not trying to
- reconnect. Either there was a fatal error or the <code title=dom-EventSource-close><a href=#dom-eventsource-close>close()</a></code> method was
- invoked.</dd>
+ <dd>The connection is not open, and the user agent is not trying to reconnect. Either there was a
+ fatal error or the <code title=dom-EventSource-close><a href=#dom-eventsource-close>close()</a></code> method was invoked.</dd>
- </dl><p>When the object is created its <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> must be set to
- <code title=dom-EventSource-CONNECTING><a href=#dom-eventsource-connecting>CONNECTING</a></code> (0). The
- rules given below for handling the connection define when the value
- changes.</p>
+ </dl><p>When the object is created its <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> must
+ be set to <code title=dom-EventSource-CONNECTING><a href=#dom-eventsource-connecting>CONNECTING</a></code> (0). The rules given below
+ for handling the connection define when the value changes.</p>
- <p>The <dfn id=dom-eventsource-close title=dom-EventSource-close><code>close()</code></dfn>
- method must abort any instances of the <a href=#fetch>fetch</a> algorithm
- started for this <code><a href=#eventsource>EventSource</a></code> object, and must set the
- <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute
- to <code title=dom-EventSource-CLOSED><a href=#dom-eventsource-closed>CLOSED</a></code>.</p> <!-- this
- also causes all the message events to stop firing, even if they were
- queued before close() was called -->
+ <p>The <dfn id=dom-eventsource-close title=dom-EventSource-close><code>close()</code></dfn> method must abort any
+ instances of the <a href=#fetch>fetch</a> algorithm started for this <code><a href=#eventsource>EventSource</a></code> object,
+ and must set the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute to <code title=dom-EventSource-CLOSED><a href=#dom-eventsource-closed>CLOSED</a></code>.</p> <!-- this also causes all the message events to
+ stop firing, even if they were queued before close() was called -->
- <p>The following are the <a href=#event-handlers>event handlers</a> (and their
- corresponding <a href=#event-handler-event-type title="event handler event type">event handler
- event types</a>) that must be supported, as <a href=#event-handler-idl-attributes>event handler IDL attributes</a>, by
- all objects implementing the <code><a href=#eventsource>EventSource</a></code> interface:</p>
+ <p>The following are the <a href=#event-handlers>event handlers</a> (and their corresponding <a href=#event-handler-event-type title="event
+ handler event type">event handler event types</a>) that must be supported, as <a href=#event-handler-idl-attributes>event
+ handler IDL attributes</a>, by all objects implementing the <code><a href=#eventsource>EventSource</a></code>
+ interface:</p>
<table><thead><tr><th><a href=#event-handlers title="event handlers">Event handler</a> <th><a href=#event-handler-event-type>Event handler event type</a>
<tbody><tr><td><dfn id=handler-eventsource-onopen title=handler-EventSource-onopen><code>onopen</code></dfn> <td> <code title=event-open>open</code>
<tr><td><dfn id=handler-eventsource-onmessage title=handler-EventSource-onmessage><code>onmessage</code></dfn> <td> <code title=event-message><a href=#event-message>message</a></code>
<tr><td><dfn id=handler-eventsource-onerror title=handler-EventSource-onerror><code>onerror</code></dfn> <td> <code title=event-error>error</code>
- </table><hr><p>In addition to the above, each <code><a href=#eventsource>EventSource</a></code> object
- has the following associated with it:</p>
+ </table><hr><p>In addition to the above, each <code><a href=#eventsource>EventSource</a></code> object has the following associated
+ with it:</p>
- <ul><li>A <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
+ <ul><li>A <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>
- <li>A <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>
+ <li>A <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>These values are not currently exposed on the interface.</p>
<h4 id=processing-model-7><span class=secno>10.2.3 </span>Processing model</h4>
- <p>The resource indicated in the argument to the <code title=dom-EventSource><a href=#dom-eventsource>EventSource</a></code> constructor is <a href=#fetch title=fetch>fetched</a> when the constructor is run.</p>
+ <p>The resource indicated in the argument to the <code title=dom-EventSource><a href=#dom-eventsource>EventSource</a></code>
+ constructor is <a href=#fetch title=fetch>fetched</a> when the constructor is run.</p>
- <p>For HTTP connections, the <code title="">Accept</code> header may
- be included; if included, it must contain only formats of event
- framing that are supported by the user agent (one of which must be
- <code><a href=#text/event-stream>text/event-stream</a></code>, as described below).</p>
+ <p>For HTTP connections, the <code title="">Accept</code> header may be included; if included, it
+ must contain only formats of event framing that are supported by the user agent (one of which must
+ be <code><a href=#text/event-stream>text/event-stream</a></code>, as described below).</p>
<p>If the event source's <a href=#concept-event-stream-last-event-id title=concept-event-stream-last-event-id>last event ID
- string</a> is not the empty string, then a <code title=http-last-event-id><a href=#last-event-id>Last-Event-ID</a></code> HTTP header must be
- included with the request, whose value is the value of the event
- source's <a href=#concept-event-stream-last-event-id title=concept-event-stream-last-event-id>last event
- ID string</a>, encoded as UTF-8.</p>
+ string</a> is not the empty string, then a <code title=http-last-event-id><a href=#last-event-id>Last-Event-ID</a></code> HTTP header must be included with the request,
+ whose value is the value of the event source's <a href=#concept-event-stream-last-event-id title=concept-event-stream-last-event-id>last event ID string</a>, encoded as UTF-8.</p>
- <p>User agents should use the <code>Cache-Control: no-cache</code>
- header in requests to bypass any caches for requests of event
- sources. (This header is not a <a href=#custom-request-headers title="custom request
- headers">custom request header</a>, so the user agent will still
- use the CORS <a href=#simple-cross-origin-request>simple cross-origin request</a> mechanism.)
- User agents should ignore HTTP cache headers in the response, never
- caching event sources.</p>
+ <p>User agents should use the <code>Cache-Control: no-cache</code> header in requests to bypass
+ any caches for requests of event sources. (This header is not a <a href=#custom-request-headers title="custom request
+ headers">custom request header</a>, so the user agent will still use the CORS <a href=#simple-cross-origin-request>simple
+ cross-origin request</a> mechanism.) User agents should ignore HTTP cache headers in the
+ response, never caching event sources.</p>
- <hr><p>As data is received, the <a href=#concept-task title=concept-task>tasks</a>
- queued by the <a href=#networking-task-source>networking task source</a> to handle the data
- must act as follows.</p>
+ <hr><p>As data is received, the <a href=#concept-task title=concept-task>tasks</a> queued by the <a href=#networking-task-source>networking
+ task source</a> to handle the data must act as follows.</p>
- <p>HTTP 200 OK responses with a <a href=#content-type>Content-Type</a> header
- specifying the type <code><a href=#text/event-stream>text/event-stream</a></code>, ignoring any
- <a href=#mime-type>MIME type</a> parameters, must be processed line by line <a href=#event-stream-interpretation>as described below</a>.</p>
+ <p>HTTP 200 OK responses with a <a href=#content-type>Content-Type</a> header specifying the type
+ <code><a href=#text/event-stream>text/event-stream</a></code>, ignoring any <a href=#mime-type>MIME type</a> parameters, must be processed
+ line by line <a href=#event-stream-interpretation>as described below</a>.</p>
- <p>When a successful response with a supported <a href=#mime-type>MIME
- type</a> is received, such that the user agent begins parsing the
- contents of the stream, the user agent must <a href=#announce-the-connection>announce the
+ <p>When a successful response with a supported <a href=#mime-type>MIME type</a> is received, such that the
+ user agent begins parsing the contents of the stream, the user agent must <a href=#announce-the-connection>announce the
connection</a>.</p>
<p>The <a href=#concept-task title=concept-task>task</a> that the <a href=#networking-task-source>networking task source</a> places
@@ -81645,36 +81552,31 @@
<p>For non-HTTP protocols, UAs should act in equivalent ways.</p>
- <hr><p>When a user agent is to <dfn id=announce-the-connection>announce the connection</dfn>, the
- user agent must <a href=#queue-a-task>queue a task</a> which, if the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute is
- set to a value other than <code title=dom-EventSource-CLOSED><a href=#dom-eventsource-closed>CLOSED</a></code>, sets the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute to
- <code title=dom-EventSource-OPEN><a href=#dom-eventsource-open>OPEN</a></code> and <a href=#fire-a-simple-event title="fire
- a simple event">fires a simple event</a> named <code title=event-open>open</code> at the <code><a href=#eventsource>EventSource</a></code>
+ <hr><p>When a user agent is to <dfn id=announce-the-connection>announce the connection</dfn>, the user agent must <a href=#queue-a-task>queue a
+ task</a> which, if the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute is
+ set to a value other than <code title=dom-EventSource-CLOSED><a href=#dom-eventsource-closed>CLOSED</a></code>, sets the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute to <code title=dom-EventSource-OPEN><a href=#dom-eventsource-open>OPEN</a></code> and <a href=#fire-a-simple-event title="fire a simple event">fires a simple
+ event</a> named <code title=event-open>open</code> at the <code><a href=#eventsource>EventSource</a></code>
object.</p>
- <p>When a user agent is to <dfn id=reestablish-the-connection>reestablish the connection</dfn>,
- the user agent must run the following steps. These steps are run
- asynchronously, not as part of a <a href=#concept-task title=concept-task>task</a>. (The tasks that it queues, of
- course, are run like normal tasks and not asynchronously.)</p>
+ <p>When a user agent is to <dfn id=reestablish-the-connection>reestablish the connection</dfn>, the user agent must run the
+ following steps. These steps are run asynchronously, not as part of a <a href=#concept-task title=concept-task>task</a>. (The tasks that it queues, of course, are run like normal tasks
+ and not asynchronously.)</p>
<ol><li>
<p><a href=#queue-a-task>Queue a task</a> to run the following steps:</p>
- <ol><li><p>If the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute is
- set to <code title=dom-EventSource-CLOSED><a href=#dom-eventsource-closed>CLOSED</a></code>, abort
- the task.</li>
+ <ol><li><p>If the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute is set to
+ <code title=dom-EventSource-CLOSED><a href=#dom-eventsource-closed>CLOSED</a></code>, abort the task.</li>
- <li><p>Set the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute to
- <code title=dom-EventSource-CONNECTING><a href=#dom-eventsource-connecting>CONNECTING</a></code>.</li>
+ <li><p>Set the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute to <code title=dom-EventSource-CONNECTING><a href=#dom-eventsource-connecting>CONNECTING</a></code>.</li>
- <li><p><a href=#fire-a-simple-event>Fire a simple event</a> named <code title=event-error>error</code> at the <code><a href=#eventsource>EventSource</a></code>
- object.</li>
+ <li><p><a href=#fire-a-simple-event>Fire a simple event</a> named <code title=event-error>error</code> at the
+ <code><a href=#eventsource>EventSource</a></code> object.</li>
</ol></li>
- <li><p>Wait a delay equal to the reconnection time of the event
- source.</li>
+ <li><p>Wait a delay equal to the reconnection time of the event source.</li>
<li><p>Optionally, wait some more. In particular, if the previous attempt failed, then user
agents might introduce an exponential backoff delay to avoid overloading a potentially already
@@ -81682,25 +81584,20 @@
connectivity, user agents might wait for the operating system to announce that the network
connection has returned before retrying.</li>
- <li><p>Wait until the aforementioned task has run, if it has not
- yet run.</li>
+ <li><p>Wait until the aforementioned task has run, if it has not yet run.</li>
<li>
<p><a href=#queue-a-task>Queue a task</a> to run the following steps:</p>
- <ol><li><p>If the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute is
- not set to <code title=dom-EventSource-CONNECTING><a href=#dom-eventsource-connecting>CONNECTING</a></code>, abort these
- steps.</li>
+ <ol><li><p>If the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute is not set
+ to <code title=dom-EventSource-CONNECTING><a href=#dom-eventsource-connecting>CONNECTING</a></code>, abort these steps.</li>
- <li><p>Perform a <a href=#potentially-cors-enabled-fetch>potentially CORS-enabled
- fetch</a><!--FETCH--> of the <a href=#absolute-url>absolute URL</a> of the
- event source resource, using the same <i><a href=#referrer-source>referrer source</a></i>, and
- with the same <i>mode</i><!--, <i>default origin
- behaviour</i>,--> and <i title="">origin</i>, as those used in
- the original request triggered by the <code title=dom-EventSource><a href=#dom-eventsource>EventSource()</a></code> constructor, and
- process the resource obtained in this fashion, if any, as
- described earlier in this section.</li>
+ <li><p>Perform a <a href=#potentially-cors-enabled-fetch>potentially CORS-enabled fetch</a><!--FETCH--> of the <a href=#absolute-url>absolute
+ URL</a> of the event source resource, using the same <i><a href=#referrer-source>referrer source</a></i>, and with the
+ same <i>mode</i><!--, <i>default origin behaviour</i>,--> and <i title="">origin</i>, as those
+ used in the original request triggered by the <code title=dom-EventSource><a href=#dom-eventsource>EventSource()</a></code> constructor, and process the resource obtained in
+ this fashion, if any, as described earlier in this section.</li>
</ol></li>
@@ -81799,46 +81696,39 @@
<dd>
- <p><a href=#processField>Process the field</a> using the steps
- described below, using the whole line as the field name, and
- the empty string as the field value.</p>
+ <p><a href=#processField>Process the field</a> using the steps described below, using the
+ whole line as the field name, and the empty string as the field value.</p>
</dd>
- </dl><p>Once the end of the file is reached, any pending data must be
- discarded. (If the file ends in the middle of an event, before the
- final empty line, the incomplete event is not dispatched.)</p>
+ </dl><p>Once the end of the file is reached, any pending data must be discarded. (If the file ends in
+ the middle of an event, before the final empty line, the incomplete event is not dispatched.)</p>
- <hr><p id=processField>The steps to <dfn title="">process the
- field</dfn> given a field name and a field value depend on the field
- name, as given in the following list. Field names must be compared
+ <hr><p id=processField>The steps to <dfn title="">process the field</dfn> given a field name and a
+ field value depend on the field 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>
- <dd><p>Set the <var title="">event type</var> buffer to field
- value.</dd>
+ <dd><p>Set the <var title="">event type</var> buffer to field value.</dd>
<dt>If the field name is "data"</dt>
- <dd><p>Append the field value to the <var title="">data</var>
- buffer, then append a single U+000A LINE FEED (LF) character to the
- <var title="">data</var> buffer.</dd>
+ <dd><p>Append the field value to the <var title="">data</var> buffer, then append a single U+000A
+ LINE FEED (LF) character to the <var title="">data</var> buffer.</dd>
<dt>If the field name is "id"</dt>
- <dd><p>Set the <var title="">last event ID</var> buffer to the
- field value.</dd>
+ <dd><p>Set the <var title="">last event ID</var> buffer to the field value.</dd>
<dt>If the field name is "retry"</dt>
- <dd><p>If the field value consists of only <a href=#ascii-digits>ASCII digits</a>, then interpret the
- field value as an integer in base ten, and set the event stream's
- <a href=#concept-event-stream-reconnection-time title=concept-event-stream-reconnection-time>reconnection
- time</a> to that integer. Otherwise, ignore the field.</dd>
+ <dd><p>If the field value consists of only <a href=#ascii-digits>ASCII digits</a>, then interpret the field
+ value as an integer in base ten, and set the event stream's <a href=#concept-event-stream-reconnection-time title=concept-event-stream-reconnection-time>reconnection time</a> to that integer.
+ Otherwise, ignore the field.</dd>
<!-- v2 feature request from Per-Erik Brodin:
> > > Finally, it could be useful to be able to reset the reconnection
@@ -81860,11 +81750,10 @@
<dt>If the field name is "reconnect"</dt>
- <dd><p>If the field value is the empty string, then: <a
- href="#dispatchMessage">dispatch the event</a> as defined below,
- and then drop the connection and immediately reconnect as if the
- <span title="concept-event-stream-reconnection-time">reconnection
- time</span> was zero for this one time.</p></dd>
+ <dd><p>If the field value is the empty string, then: <a href="#dispatchMessage">dispatch the
+ event</a> as defined below, and then drop the connection and immediately reconnect as if the
+ <span title="concept-event-stream-reconnection-time">reconnection time</span> was zero for this
+ one time.</p></dd>
-->
@@ -81872,23 +81761,20 @@
<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
- follows:
+ </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>Set the <a href=#concept-event-stream-last-event-id title=concept-event-stream-last-event-id>last event ID
- string</a> of the event source to the value of the <var title="">last event ID</var> buffer. The buffer does not get reset,
- so the <a href=#concept-event-stream-last-event-id title=concept-event-stream-last-event-id>last event
- ID string</a> of the event source remains set to this value
- until the next time it is set by the server.</li>
+ <ol><li><p>Set the <a href=#concept-event-stream-last-event-id title=concept-event-stream-last-event-id>last event ID string</a> of
+ the event source to the value of the <var title="">last event ID</var> buffer. The buffer does
+ not get reset, so the <a href=#concept-event-stream-last-event-id title=concept-event-stream-last-event-id>last event ID
+ string</a> of the event source remains set to this value until the next time it is set by the
+ server.</li>
- <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
- type</var> buffer to the empty string and abort these
- steps.</li>
+ <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 type</var> buffer to the empty string and
+ abort these steps.</li>
- <li><p>If the <var title="">data</var> buffer's last character is a
- U+000A LINE FEED (LF) character, then remove the last character
- from the <var title="">data</var> buffer.</li>
+ <li><p>If the <var title="">data</var> buffer's last character is a U+000A LINE FEED (LF)
+ character, then remove the last character from the <var title="">data</var> buffer.</li>
<li><p>Create an event that uses the <code><a href=#messageevent>MessageEvent</a></code> interface, with the event type
<code title=event-message><a href=#event-message>message</a></code>, which does not bubble, is not cancelable, and has no
@@ -81898,22 +81784,22 @@
<a href=#concept-event-stream-last-event-id title=concept-event-stream-last-event-id>last event ID string</a> of the event source.
This event is not <a href=#concept-events-trusted title=concept-events-trusted>trusted</a>.</li>
- <li><p>If the <var title="">event type</var> buffer has a value
- other than the empty string, change the <a href=#concept-event-type title=concept-event-type>type</a> of the newly created event
- to equal the value of the <var title="">event type</var>
- buffer.</li>
+ <li><p>If the <var title="">event type</var> buffer has a value other than the empty string,
+ change the <a href=#concept-event-type title=concept-event-type>type</a> of the newly created event to equal the
+ value of the <var title="">event type</var> buffer.</li>
- <li><p>Set the <var title="">data</var> buffer and the <var title="">event type</var> buffer to the empty string.</li>
+ <li><p>Set the <var title="">data</var> buffer and the <var title="">event type</var> buffer to
+ the empty string.</li>
<li><p><a href=#queue-a-task>Queue a task</a> which, if the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute is set to a value other than <code title=dom-EventSource-CLOSED><a href=#dom-eventsource-closed>CLOSED</a></code>, <a href=#concept-event-dispatch title=concept-event-dispatch>dispatches</a> the newly created event at the
<code><a href=#eventsource>EventSource</a></code> object.</li> <!-- so calling close() drops the messages immediately.
The connection dying doesn't interfere with already-sent messages since it sets us to CLOSED via
a task, not synchronously -->
- </ol><p class=note>If an event doesn't have an "id" field, but an
- earlier event did set the event source's <a href=#concept-event-stream-last-event-id title=concept-event-stream-last-event-id>last event ID
- string</a>, 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>
+ </ol><p class=note>If an event doesn't have an "id" field, but an earlier event did set the event
+ source's <a href=#concept-event-stream-last-event-id title=concept-event-stream-last-event-id>last event ID string</a>, 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>
<div class=example>
@@ -81924,10 +81810,9 @@
data: 10</pre>
<p>...would cause an event <code title=event-message><a href=#event-message>message</a></code> with the interface
- <code><a href=#messageevent>MessageEvent</a></code> to be dispatched on the
- <code><a href=#eventsource>EventSource</a></code> object. The event's <code title=dom-MessageEvent-data><a href=#dom-messageevent-data>data</a></code> attribute would contain
- the string <code>YHOO\n+2\n10</code> (where <code>\n</code>
- represents a newline).</p>
+ <code><a href=#messageevent>MessageEvent</a></code> to be dispatched on the <code><a href=#eventsource>EventSource</a></code> object. The event's
+ <code title=dom-MessageEvent-data><a href=#dom-messageevent-data>data</a></code> attribute would contain the string
+ <code>YHOO\n+2\n10</code> (where <code>\n</code> represents a newline).</p>
<p>This could be used as follows:
<pre>var stocks = new EventSource("http://stocks.example.com/ticker.php");
@@ -81946,20 +81831,15 @@
<div class=example>
- <p>The following stream contains four blocks. The first block has
- just a comment, and will fire nothing. The second block has two
- fields with names "data" and "id" respectively; an event will be
- fired for this block, with the data "first event", and will then
- set the last event ID to "1" so that if the connection died between
- this block and the next, the server would be sent a <code title=http-last-event-id><a href=#last-event-id>Last-Event-ID</a></code> header with the
- value "1". The third block fires an event with data "second event",
- and also has an "id" field, this time with no value, which resets
- the last event ID to the empty string (meaning no <code title=http-last-event-id><a href=#last-event-id>Last-Event-ID</a></code> header will now be
- sent in the event of a reconnection being attempted). Finally, the
- last block just fires an event with the data
- " third event" (with a single leading space character).
- Note that the last still has to end with a blank line, the end of
- the stream is not enough to trigger the dispatch of the last
+ <p>The following stream contains four blocks. The first block has just a comment, and will fire
+ nothing. The second block has two fields with names "data" and "id" respectively; an event will
+ be fired for this block, with the data "first event", and will then set the last event ID to "1"
+ so that if the connection died between this block and the next, the server would be sent a <code title=http-last-event-id><a href=#last-event-id>Last-Event-ID</a></code> header with the value "1". The third block fires
+ an event with data "second event", and also has an "id" field, this time with no value, which
+ resets the last event ID to the empty string (meaning no <code title=http-last-event-id><a href=#last-event-id>Last-Event-ID</a></code> header will now be sent in the event of a
+ reconnection being attempted). Finally, the last block just fires an event with the data
+ " third event" (with a single leading space character). Note that the last still has to
+ end with a blank line, the end of the stream is not enough to trigger the dispatch of the last
event.</p>
<pre>: test stream
@@ -81985,11 +81865,9 @@
data:</pre>
- <p>The first block fires events with the data set to the empty
- string, as would the last block if it was followed by a blank line.
- The middle block fires an event with the data set to a single
- newline character. The last block is discarded because it is not
- followed by a blank line.</p>
+ <p>The first block fires events with the data set to the empty string, as would the last block if
+ it was followed by a blank line. The middle block fires an event with the data set to a single
+ newline character. The last block is discarded because it is not followed by a blank line.</p>
</div>
@@ -82002,143 +81880,117 @@
data: test
</pre>
- <p>This is because the space after the colon is ignored if
- present.</p>
+ <p>This is because the space after the colon is ignored if present.</p>
</div>
<h4 id=authoring-notes><span class=secno>10.2.6 </span>Authoring notes</h4>
- <p>Legacy proxy servers are known to, in certain cases, drop HTTP
- connections after a short timeout. To protect against such proxy
- servers, authors can include a comment line (one starting with a ':'
- character) every 15 seconds or so.</p>
+ <p>Legacy proxy servers are known to, in certain cases, drop HTTP connections after a short
+ timeout. To protect against such proxy servers, authors can include a comment line (one starting
+ with a ':' character) every 15 seconds or so.</p>
- <p>Authors wishing to relate event source connections to each other
- or to specific documents previously served might find that relying
- on IP addresses doesn't work, as individual clients can have
- multiple IP addresses (due to having multiple proxy servers) and
- individual IP addresses can have multiple clients (due to sharing a
- proxy server). It is better to include a unique identifier in the
- document when it is served and then pass that identifier as part of
- the URL when the connection is established.</p>
+ <p>Authors wishing to relate event source connections to each other or to specific documents
+ previously served might find that relying on IP addresses doesn't work, as individual clients can
+ have multiple IP addresses (due to having multiple proxy servers) and individual IP addresses can
+ have multiple clients (due to sharing a proxy server). It is better to include a unique identifier
+ in the document when it is served and then pass that identifier as part of the URL when the
+ connection is established.</p>
- <p>Authors are also cautioned that HTTP chunking can have unexpected
- negative effects on the reliability of this protocol. Where
- possible, chunking should be disabled for serving event streams
- unless the rate of messages is high enough for this not to
- matter.</p> <!-- v2 can we get a better solution? -->
+ <p>Authors are also cautioned that HTTP chunking can have unexpected negative effects on the
+ reliability of this protocol. Where possible, chunking should be disabled for serving event
+ streams unless the rate of messages is high enough for this not to matter.</p> <!-- v2 can we get
+ a better solution? -->
- <p>Clients that support HTTP's per-server connection limitation
- might run into trouble when opening multiple pages from a site if
- each page has an <code><a href=#eventsource>EventSource</a></code> to the same
- domain. Authors can avoid this using the relatively complex
- mechanism of using unique domain names per connection, or by
- allowing the user to enable or disable the <code><a href=#eventsource>EventSource</a></code>
- functionality on a per-page basis, or by sharing a single
- <code><a href=#eventsource>EventSource</a></code> object using a <a href=#sharedworkerglobalscope title=SharedWorkerGlobalScope>shared worker</a>.
- </p>
+ <p>Clients that support HTTP's per-server connection limitation might run into trouble when
+ opening multiple pages from a site if each page has an <code><a href=#eventsource>EventSource</a></code> to the same
+ domain. Authors can avoid this using the relatively complex mechanism of using unique domain names
+ per connection, or by allowing the user to enable or disable the <code><a href=#eventsource>EventSource</a></code>
+ functionality on a per-page basis, or by sharing a single <code><a href=#eventsource>EventSource</a></code> object using a
<h4 id=eventsource-push><span class=secno>10.2.7 </span>Connectionless push and other features</h4>
- <p>User agents running in controlled environments, e.g. browsers on
- mobile handsets tied to specific carriers, may offload the
- management of the connection to a proxy on the network. In such a
- situation, the user agent for the purposes of conformance is
- considered to include both the handset software and the network
- proxy.</p>
+ <p>User agents running in controlled environments, e.g. browsers on mobile handsets tied to
+ specific carriers, may offload the management of the connection to a proxy on the network. In such
+ a situation, the user agent for the purposes of conformance is considered to include both the
+ handset software and the network proxy.</p>
<div class=example>
- <p>For example, a browser on a mobile device, after having
- established a connection, might detect that it is on a supporting
- network and request that a proxy server on the network take over
- the management of the connection. The timeline for such a situation
- might be as follows:</p>
+ <p>For example, a browser on a mobile device, after having established a connection, might detect
+ that it is on a supporting network and request that a proxy server on the network take over the
+ management of the connection. The timeline for such a situation might be as follows:</p>
- <ol><li>Browser connects to a remote HTTP server and requests the
- resource specified by the author in the <code title=dom-EventSource><a href=#dom-eventsource>EventSource</a></code> constructor.</li>
+ <ol><li>Browser connects to a remote HTTP server and requests the resource specified by the author
+ in the <code title=dom-EventSource><a href=#dom-eventsource>EventSource</a></code> constructor.</li>
<li>The server sends occasional messages.</li>
- <li>In between two messages, the browser detects that it is idle
- except for the network activity involved in keeping the TCP
- connection alive, and decides to switch to sleep mode to save power.</li>
+ <li>In between two messages, the browser detects that it is idle except for the network activity
+ involved in keeping the TCP connection alive, and decides to switch to sleep mode to save
+ power.</li>
<li>The browser disconnects from the server.</li>
- <li>The browser contacts a service on the network, and requests
- that that service, a "push proxy", maintain the connection instead.</li>
+ <li>The browser contacts a service on the network, and requests that that service, a "push
+ proxy", maintain the connection instead.</li>
- <li>The "push proxy" service contacts the remote HTTP server and
- requests the resource specified by the author in the <code title=dom-EventSource><a href=#dom-eventsource>EventSource</a></code> constructor (possibly
- including a <code title=http-last-event-id><a href=#last-event-id>Last-Event-ID</a></code>
- HTTP header, etc).</li>
+ <li>The "push proxy" service contacts the remote HTTP server and requests the resource specified
+ by the author in the <code title=dom-EventSource><a href=#dom-eventsource>EventSource</a></code> constructor (possibly
+ including a <code title=http-last-event-id><a href=#last-event-id>Last-Event-ID</a></code> HTTP header, etc).</li>
<li>The browser allows the mobile device to go to sleep.</li>
<li>The server sends another message.</li>
- <li>The "push proxy" service uses a technology such as OMA push to
- convey the event to the mobile device, which wakes only
- enough to process the event and then returns to sleep.</li>
+ <li>The "push proxy" service uses a technology such as OMA push to convey the event to the
+ mobile device, which wakes only enough to process the event and then returns to sleep.</li>
</ol></div>
- <p>This can reduce the total data usage, and can therefore result in
- considerable power savings.</p>
+ <p>This can reduce the total data usage, and can therefore result in considerable power
+ savings.</p>
- <p>As well as implementing the existing API and
- <code><a href=#text/event-stream>text/event-stream</a></code> wire format as defined by this
- specification and in more distributed ways as described above,
- formats of event framing defined by <a href=#other-applicable-specifications>other applicable
- specifications</a> may be supported. This specification does not
- define how they are to be parsed or processed.</p>
+ <p>As well as implementing the existing API and <code><a href=#text/event-stream>text/event-stream</a></code> wire format as
+ defined by this specification and in more distributed ways as described above, formats of event
+ framing defined by <a href=#other-applicable-specifications>other applicable specifications</a> may be supported. This
+ specification does not define how they are to be parsed or processed.</p>
<h4 id=garbage-collection-0><span class=secno>10.2.8 </span>Garbage collection</h4>
- <p>While an <code><a href=#eventsource>EventSource</a></code> object's <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> is <code title=dom-EventSource-CONNECTING><a href=#dom-eventsource-connecting>CONNECTING</a></code>, and the object
- has one or more event listeners registered for <code title=event-open>open</code>, <code title=event-message><a href=#event-message>message</a></code> or <code title=event-error>error</code> events, there must be a strong
- reference from the <code><a href=#window>Window</a></code> or <code><a href=#workerglobalscope>WorkerGlobalScope</a></code>
- object that the <code><a href=#eventsource>EventSource</a></code> object's constructor was
- invoked from to the <code><a href=#eventsource>EventSource</a></code> object itself.</p>
+ <p>While an <code><a href=#eventsource>EventSource</a></code> object's <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> is <code title=dom-EventSource-CONNECTING><a href=#dom-eventsource-connecting>CONNECTING</a></code>, and the object has one or more event
+ listeners registered for <code title=event-open>open</code>, <code title=event-message><a href=#event-message>message</a></code> or <code title=event-error>error</code> events, there must
+ be a strong reference from the <code><a href=#window>Window</a></code> or <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> object that
+ the <code><a href=#eventsource>EventSource</a></code> object's constructor was invoked from to the <code><a href=#eventsource>EventSource</a></code>
+ object itself.</p>
- <p>While an <code><a href=#eventsource>EventSource</a></code> object's <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> is <code title=dom-EventSource-OPEN><a href=#dom-eventsource-open>OPEN</a></code>, and the object has one or
- more event listeners registered for <code title=event-message><a href=#event-message>message</a></code> or <code title=event-error>error</code> events, there must be a strong
- reference from the <code><a href=#window>Window</a></code> or <code><a href=#workerglobalscope>WorkerGlobalScope</a></code>
- object that the <code><a href=#eventsource>EventSource</a></code> object's constructor was
- invoked from to the <code><a href=#eventsource>EventSource</a></code> object itself.</p>
+ <p>While an <code><a href=#eventsource>EventSource</a></code> object's <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> is <code title=dom-EventSource-OPEN><a href=#dom-eventsource-open>OPEN</a></code>, and the object has one or more event listeners
+ registered for <code title=event-message><a href=#event-message>message</a></code> or <code title=event-error>error</code> events, there must be a strong reference from the
+ <code><a href=#window>Window</a></code> or <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> object that the <code><a href=#eventsource>EventSource</a></code>
+ object's constructor was invoked from to the <code><a href=#eventsource>EventSource</a></code> object itself.</p>
- <p>While there is a task queued by an <code><a href=#eventsource>EventSource</a></code>
- object on the <a href=#remote-event-task-source>remote event task source</a>, there must be a
- strong reference from the <code><a href=#window>Window</a></code> or
- <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> object that the <code><a href=#eventsource>EventSource</a></code>
- object's constructor was invoked from to that
- <code><a href=#eventsource>EventSource</a></code> object.</p>
+ <p>While there is a task queued by an <code><a href=#eventsource>EventSource</a></code> object on the <a href=#remote-event-task-source>remote event
+ task source</a>, there must be a strong reference from the <code><a href=#window>Window</a></code> or
+ <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> object that the <code><a href=#eventsource>EventSource</a></code> object's constructor was
+ invoked from to that <code><a href=#eventsource>EventSource</a></code> object.</p>
<p>If a user agent is to <dfn id=concept-eventsource-forcibly-close title=concept-EventSource-forcibly-close>forcibly close</dfn> an
- <code><a href=#eventsource>EventSource</a></code> object (this happens when a
- <code><a href=#document>Document</a></code> object goes away permanently), the user agent
- must abort any instances of the <a href=#fetch>fetch</a> algorithm started
- for this <code><a href=#eventsource>EventSource</a></code> object, and must set the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute to
- <code title=dom-EventSource-CLOSED><a href=#dom-eventsource-closed>CLOSED</a></code>.</p> <!-- same as
- calling close() -->
+ <code><a href=#eventsource>EventSource</a></code> object (this happens when a <code><a href=#document>Document</a></code> object goes away
+ permanently), the user agent must abort any instances of the <a href=#fetch>fetch</a> algorithm started
+ for this <code><a href=#eventsource>EventSource</a></code> object, and must set the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute to <code title=dom-EventSource-CLOSED><a href=#dom-eventsource-closed>CLOSED</a></code>.</p> <!-- same as calling close() -->
- <p>If an <code><a href=#eventsource>EventSource</a></code> object is garbage collected while
- its connection is still open, the user agent must abort any instance
- of the <a href=#fetch title=fetch>fetch</a> algorithm opened by this
- <code><a href=#eventsource>EventSource</a></code>.</p> <!-- no need to throw tasks away or
- anything; for it to get garbage collected, there can't be anything
- that would be able to receive those events -->
+ <p>If an <code><a href=#eventsource>EventSource</a></code> object is garbage collected while its connection is still open,
+ the user agent must abort any instance of the <a href=#fetch title=fetch>fetch</a> algorithm opened by
+ this <code><a href=#eventsource>EventSource</a></code>.</p> <!-- no need to throw tasks away or anything; for it to get
+ garbage collected, there can't be anything that would be able to receive those events -->
- <p class=note>It's possible for one active network connection to
- be shared by multiple <code><a href=#eventsource>EventSource</a></code> objects and their
- <a href=#fetch>fetch</a> algorithms, which is why the above is phrased in
- terms of aborting the <a href=#fetch>fetch</a> algorithm and not the
- actual underlying download.</p>
+ <p class=note>It's possible for one active network connection to be shared by multiple
+ <code><a href=#eventsource>EventSource</a></code> objects and their <a href=#fetch>fetch</a> algorithms, which is why the above
+ is phrased in terms of aborting the <a href=#fetch>fetch</a> algorithm and not the actual underlying
+ download.</p>
<h4 id=implementation-advice><span class=secno>10.2.9 </span>Implementation advice</h4>
@@ -82164,8 +82016,8 @@
<h5 id=text/event-stream><span class=secno>10.2.10.1 </span><dfn><code>text/event-stream</code></dfn></h5>
- <p>This registration is for community review and will be submitted
- to the IESG for review, approval, and registration with IANA.</p>
+ <p>This registration is for community review and will be submitted to the IESG for review,
+ approval, and registration with IANA.</p>
<!--
To: ietf-types at iana.org
@@ -82183,9 +82035,8 @@
<dl><dt><code title="">charset</code></dt>
<dd>
- <p>The <code title="">charset</code> parameter may be provided.
- The parameter's value must be "<code title="">utf-8</code>".
- This parameter serves no purpose; it is only allowed for
+ <p>The <code title="">charset</code> parameter may be provided. The parameter's value must be
+ "<code title="">utf-8</code>". This parameter serves no purpose; it is only allowed for
compatibility with legacy servers.</p>
</dd>
@@ -82196,20 +82047,17 @@
<dt>Security considerations:</dt>
<dd>
- <p>An event stream from an origin distinct from the origin of the
- content consuming the event stream can result in information
- leakage. To avoid this, user agents are required to apply CORS
+ <p>An event stream from an origin distinct from the origin of the content consuming the event
+ stream can result in information leakage. To avoid this, user agents are required to apply CORS
semantics. <a href=#refsCORS>[CORS]</a></p>
- <p>Event streams can overwhelm a user agent; a user agent is
- expected to apply suitable restrictions to avoid depleting local
- resources because of an overabundance of information from an event
- stream.</p>
+ <p>Event streams can overwhelm a user agent; a user agent is expected to apply suitable
+ restrictions to avoid depleting local resources because of an overabundance of information from
+ an event stream.</p>
- <p>Servers can be overwhelmed if a situation develops in which the
- server is causing clients to reconnect rapidly. Servers should use
- a 5xx status code to indicate capacity problems, as this will
- prevent conforming clients from reconnecting automatically.</p>
+ <p>Servers can be overwhelmed if a situation develops in which the server is causing clients to
+ reconnect rapidly. Servers should use a 5xx status code to indicate capacity problems, as this
+ will prevent conforming clients from reconnecting automatically.</p>
</dd>
<!--REMOVE-TOPIC:Security-->
@@ -91169,65 +91017,59 @@
</dd>
- <dt>A start tag whose tag name is one of: "applet",
- "marquee", "object"</dt>
+ <dt>A start tag whose tag name is one of: "applet", "marquee", "object"</dt>
<dd>
- <p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if
- any.</p>
+ <p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if any.</p>
<p><a href=#insert-an-html-element>Insert an HTML element</a> for the token.</p>
- <p>Insert a marker at the end of the <a href=#list-of-active-formatting-elements>list of active
- formatting elements</a>.</p>
+ <p>Insert a marker at the end of the <a href=#list-of-active-formatting-elements>list of active formatting elements</a>.</p>
<p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</p>
</dd>
- <dt>An end tag token whose tag name is one of: "applet",
- "marquee", "object"</dt>
+ <dt>An end tag token whose tag name is one of: "applet", "marquee", "object"</dt>
<dd>
- <p>If the <a href=#stack-of-open-elements>stack of open elements</a> does not <a href=#has-an-element-in-scope title="has an element in scope">have an element in scope</a>
- that is an <a href=#html-elements title="HTML elements">HTML element</a> and
- with the same tag name as that of the token, then this is a
- <a href=#parse-error>parse error</a>; ignore the token.</p>
+ <p>If the <a href=#stack-of-open-elements>stack of open elements</a> does not <a href=#has-an-element-in-scope title="has an element in
+ scope">have an element in scope</a> that is an <a href=#html-elements title="HTML elements">HTML
+ element</a> and with the same tag name as that of the token, then this is a <a href=#parse-error>parse
+ error</a>; ignore the token.</p>
<p>Otherwise, run these steps:</p>
<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 <a href=#html-elements title="HTML elements">HTML element</a> with
- the same tag name as that of the token, then this is a
- <a href=#parse-error>parse error</a>.</li>
+ <li><p>If the <a href=#current-node>current node</a> is not an <a href=#html-elements title="HTML elements">HTML
+ element</a> with the same tag name as that of the token, then this is a <a href=#parse-error>parse
+ error</a>.</li>
- <li><p>Pop elements from the <a href=#stack-of-open-elements>stack of open elements</a>
- until an <a href=#html-elements title="HTML elements">HTML element</a> with the same tag name as the token has been
- popped from the stack.</li>
+ <li><p>Pop elements from the <a href=#stack-of-open-elements>stack of open elements</a> until an <a href=#html-elements title="HTML
+ elements">HTML element</a> with the same tag name as the token has been popped from the
+ stack.</li>
- <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>
+ <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>
<dt>A start tag whose tag name is "table"</dt>
<dd>
- <p>If the <code><a href=#document>Document</a></code> is <em>not</em> set to
- <a href=#quirks-mode>quirks mode</a>, and the <a href=#stack-of-open-elements>stack of open
- elements</a> <a href=#has-an-element-in-button-scope title="has an element in button scope">has a
- <code>p</code> element in button scope</a>, then <a href=#close-a-p-element>close a
- <code>p</code> element</a>.</p> <!-- i hate
- myself (this quirk was basically caused by acid2; if i'd realised
- we could change the specs when i wrote acid2, we could have
- avoided having any parsing-mode quirks) -Hixie -->
+ <p>If the <code><a href=#document>Document</a></code> is <em>not</em> set to <a href=#quirks-mode>quirks mode</a>, and the
+ <a href=#stack-of-open-elements>stack of open elements</a> <a href=#has-an-element-in-button-scope title="has an element in button scope">has a
+ <code>p</code> element in button scope</a>, then <a href=#close-a-p-element>close a <code>p</code>
+ element</a>.</p> <!-- i hate myself (this quirk was basically caused by acid2; if i'd
+ realised we could change the specs when i wrote acid2, we could have avoided having any
+ parsing-mode quirks) -Hixie -->
<p><a href=#insert-an-html-element>Insert an HTML element</a> for the token.</p>
<p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</p>
- <p>Switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-intable title="insertion mode: in table">in table</a>".</p>
+ <p>Switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-intable title="insertion mode: in table">in
+ table</a>".</p>
</dd>
@@ -91245,15 +91087,13 @@
"img", "keygen", "wbr"</dt>
<dd>
- <p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if
- any.</p>
+ <p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if any.</p>
- <p><a href=#insert-an-html-element>Insert an HTML element</a> for the token. Immediately
- pop the <a href=#current-node>current node</a> off the <a href=#stack-of-open-elements>stack of open
- elements</a>.</p>
+ <p><a href=#insert-an-html-element>Insert an HTML element</a> for the token. Immediately pop the <a href=#current-node>current
+ node</a> off the <a href=#stack-of-open-elements>stack of open elements</a>.</p>
- <p><a href=#acknowledge-self-closing-flag title="acknowledge self-closing flag">Acknowledge the
- token's <i>self-closing flag</i></a>, if it is set.</p>
+ <p><a href=#acknowledge-self-closing-flag title="acknowledge self-closing flag">Acknowledge the token's <i>self-closing
+ flag</i></a>, if it is set.</p>
<p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</p>
<!-- shouldn't really do this for <area> -->
@@ -91263,48 +91103,42 @@
<dt>A start tag whose tag name is "input"</dt>
<dd>
- <p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if
- any.</p>
+ <p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if any.</p>
- <p><a href=#insert-an-html-element>Insert an HTML element</a> for the token. Immediately
- pop the <a href=#current-node>current node</a> off the <a href=#stack-of-open-elements>stack of open
- elements</a>.</p>
+ <p><a href=#insert-an-html-element>Insert an HTML element</a> for the token. Immediately pop the <a href=#current-node>current
+ node</a> off the <a href=#stack-of-open-elements>stack of open elements</a>.</p>
- <p><a href=#acknowledge-self-closing-flag title="acknowledge self-closing flag">Acknowledge the
- token's <i>self-closing flag</i></a>, if it is set.</p>
+ <p><a href=#acknowledge-self-closing-flag title="acknowledge self-closing flag">Acknowledge the token's <i>self-closing
+ flag</i></a>, if it is set.</p>
- <p>If the token does not have an attribute with the name "type",
- or if it does, but that attribute's value is not an <a href=#ascii-case-insensitive>ASCII
- case-insensitive</a> match for the string "<code title="">hidden</code>", then: set the <a href=#frameset-ok-flag>frameset-ok
- flag</a> to "not ok".</p>
+ <p>If the token does not have an attribute with the name "type", or if it does, but that
+ attribute's value is not an <a href=#ascii-case-insensitive>ASCII case-insensitive</a> match for the string "<code title="">hidden</code>", then: set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</p>
</dd>
<dt>A start tag whose tag name is one of: "menuitem", "param", "source", "track"</dt>
<dd>
- <p><a href=#insert-an-html-element>Insert an HTML element</a> for the token. Immediately
- pop the <a href=#current-node>current node</a> off the <a href=#stack-of-open-elements>stack of open
- elements</a>.</p>
+ <p><a href=#insert-an-html-element>Insert an HTML element</a> for the token. Immediately pop the <a href=#current-node>current
+ node</a> off the <a href=#stack-of-open-elements>stack of open elements</a>.</p>
- <p><a href=#acknowledge-self-closing-flag title="acknowledge self-closing flag">Acknowledge the
- token's <i>self-closing flag</i></a>, if it is set.</p>
+ <p><a href=#acknowledge-self-closing-flag title="acknowledge self-closing flag">Acknowledge the token's <i>self-closing
+ flag</i></a>, if it is set.</p>
</dd>
<dt>A start tag whose tag name is "hr"</dt>
<dd>
- <p>If the <a href=#stack-of-open-elements>stack of open elements</a> <a href=#has-an-element-in-button-scope title="has
- an element in button scope">has a <code>p</code> element in button
- scope</a>, then <a href=#close-a-p-element>close a <code>p</code> element</a>.</p>
+ <p>If the <a href=#stack-of-open-elements>stack of open elements</a> <a href=#has-an-element-in-button-scope title="has an element in button scope">has a
+ <code>p</code> element in button scope</a>, then <a href=#close-a-p-element>close a <code>p</code>
+ element</a>.</p>
- <p><a href=#insert-an-html-element>Insert an HTML element</a> for the token. Immediately
- pop the <a href=#current-node>current node</a> off the <a href=#stack-of-open-elements>stack of open
- elements</a>.</p>
+ <p><a href=#insert-an-html-element>Insert an HTML element</a> for the token. Immediately pop the <a href=#current-node>current
+ node</a> off the <a href=#stack-of-open-elements>stack of open elements</a>.</p>
- <p><a href=#acknowledge-self-closing-flag title="acknowledge self-closing flag">Acknowledge the
- token's <i>self-closing flag</i></a>, if it is set.</p>
+ <p><a href=#acknowledge-self-closing-flag title="acknowledge self-closing flag">Acknowledge the token's <i>self-closing
+ flag</i></a>, if it is set.</p>
<p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</p>
@@ -91312,10 +91146,9 @@
<dt>A start tag whose tag name is "image"</dt>
<dd>
- <p><a href=#parse-error>Parse error</a>. Change the token's tag name
- to "img" and reprocess it. (Don't ask.)</p> <!-- As of
- 2005-12, studies showed that around 0.2% of pages used the
- <image> element. -->
+ <!-- As of 2005-12, studies showed that around 0.2% of pages used the <image> element. -->
+ <p><a href=#parse-error>Parse error</a>. Change the token's tag name to "img" and reprocess it. (Don't
+ ask.)</p>
</dd>
<dt id=isindex>A start tag whose tag name is "isindex"</dt>
@@ -91323,32 +91156,28 @@
<p><a href=#parse-error>Parse error</a>.</p>
- <p>If the <a href=#form-element-pointer><code title="">form</code> element
- pointer</a> is not null, then ignore the token.</p>
+ <p>If the <a href=#form-element-pointer><code title="">form</code> element pointer</a> is not null, then ignore the
+ token.</p>
<p>Otherwise:</p>
- <p><a href=#acknowledge-self-closing-flag title="acknowledge self-closing flag">Acknowledge the
- token's <i>self-closing flag</i></a>, if it is set.</p> <!--
- purely to reduce the number of errors (we don't care if they
- included the /, they're not supposed to be including the tag at
- all! -->
+ <p><a href=#acknowledge-self-closing-flag title="acknowledge self-closing flag">Acknowledge the token's <i>self-closing
+ flag</i></a>, if it is set.</p> <!-- purely to reduce the number of errors (we don't care if
+ they included the /, they're not supposed to be including the tag at all! -->
<p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</p>
<!-- fake <form> -->
- <p>If the <a href=#stack-of-open-elements>stack of open elements</a> <a href=#has-an-element-in-button-scope title="has
- an element in button scope">has a <code>p</code> element in button
- scope</a>, then <a href=#close-a-p-element>close a <code>p</code> element</a>.</p>
+ <p>If the <a href=#stack-of-open-elements>stack of open elements</a> <a href=#has-an-element-in-button-scope title="has an element in button scope">has a
+ <code>p</code> element in button scope</a>, then <a href=#close-a-p-element>close a <code>p</code>
+ element</a>.</p>
- <p><a href=#insert-an-html-element>Insert an HTML element</a> for a "form" start tag token with no attributes, and set the
- <a href=#form-element-pointer><code title=form>form</code> element pointer</a> to
- point to the element created.</p>
+ <p><a href=#insert-an-html-element>Insert an HTML element</a> for a "form" start tag token with no attributes, and set
+ the <a href=#form-element-pointer><code title=form>form</code> element pointer</a> to point to the element
+ created.</p>
- <p>If the token has an attribute called "action", set the
- <code title=attr-fs-action><a href=#attr-fs-action>action</a></code> attribute on the
- resulting <code><a href=#the-form-element>form</a></code> element to the value of the
- "action" attribute of the token.</p>
+ <p>If the token has an attribute called "action", set the <code title=attr-fs-action><a href=#attr-fs-action>action</a></code> attribute on the resulting <code><a href=#the-form-element>form</a></code> element to the
+ value of the "action" attribute of the token.</p>
<!-- fake <hr> -->
<p><a href=#insert-an-html-element>Insert an HTML element</a> for an "hr" start tag token with no attributes.
@@ -91360,8 +91189,7 @@
<p><a href=#insert-an-html-element>Insert an HTML element</a> for a "label" start tag token with no attributes.</p>
<!-- fake text -->
- <p><a href=#insert-a-character title="insert a character">Insert characters</a> (see below for <a href=#attr-isindex-prompt title=attr-isindex-prompt>what they should
- say</a>).</p>
+ <p><a href=#insert-a-character title="insert a character">Insert characters</a> (see below for <a href=#attr-isindex-prompt title=attr-isindex-prompt>what they should say</a>).</p>
<!-- fake <input> -->
<p><a href=#insert-an-html-element>Insert an HTML element</a> for an "input" start tag token with all the attributes
@@ -91370,8 +91198,7 @@
the <a href=#stack-of-open-elements>stack of open elements</a>.</p>
<!-- fake text -->
- <p><a href=#insert-a-character title="insert a character">Insert more characters</a> (see below for <a href=#attr-isindex-prompt title=attr-isindex-prompt>what they
- should say</a>).</p>
+ <p><a href=#insert-a-character title="insert a character">Insert more characters</a> (see below for <a href=#attr-isindex-prompt title=attr-isindex-prompt>what they should say</a>).</p>
<!-- fake </label> -->
<p>Pop the <a href=#current-node>current node</a> (which will be the <code><a href=#the-label-element>label</a></code> element created
@@ -91386,13 +91213,12 @@
earlier) off the <a href=#stack-of-open-elements>stack of open elements</a>. Set the <a href=#form-element-pointer><code title=form>form</code> element pointer</a> to null.</p>
<!-- explanation of text -->
- <p><dfn id=attr-isindex-prompt title=attr-isindex-prompt><strong>Prompt</strong></dfn>: If the token has an attribute with the name "prompt", then the
- first stream of characters must be the same string as given in
- that attribute, and the second stream of characters must be
- empty. Otherwise, the two streams of character tokens together
- should, together with the <code><a href=#the-input-element>input</a></code> element, express the
- equivalent of "This is a searchable index. Enter search keywords:
- (input field)" in the user's preferred language.</p>
+ <p><dfn id=attr-isindex-prompt title=attr-isindex-prompt><strong>Prompt</strong></dfn>: If the token has an attribute
+ with the name "prompt", then the first stream of characters must be the same string as given in
+ that attribute, and the second stream of characters must be empty. Otherwise, the two streams of
+ character tokens together should, together with the <code><a href=#the-input-element>input</a></code> element, express the
+ equivalent of "This is a searchable index. Enter search keywords: (input field)" in the user's
+ preferred language.</p>
</dd>
@@ -91401,38 +91227,34 @@
<p>Run these steps:</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 <a href=#next-token>next token</a> is a U+000A LINE FEED (LF) character
- token, then ignore that token and move on to the next
- one. (Newlines at the start of <code><a href=#the-textarea-element>textarea</a></code> elements are
- ignored as an authoring convenience.)</li>
+ <li><p>If the <a href=#next-token>next token</a> is a U+000A LINE FEED (LF) character token, then ignore
+ that token and move on to the next one. (Newlines at the start of <code><a href=#the-textarea-element>textarea</a></code>
+ elements are ignored as an authoring convenience.)</li>
<!-- see comment in <pre> start tag bit -->
- <li><p>Switch the tokenizer to the <a href=#rcdata-state>RCDATA
- state</a>.</li>
+ <li><p>Switch the tokenizer to the <a href=#rcdata-state>RCDATA state</a>.</li>
- <li><p>Let the <a href=#original-insertion-mode>original insertion mode</a> be the
- current <a href=#insertion-mode>insertion mode</a>.</p>
+ <li><p>Let the <a href=#original-insertion-mode>original insertion mode</a> be the current <a href=#insertion-mode>insertion
+ mode</a>.</p>
- <li><p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not
- ok".</li>
+ <li><p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</li>
- <li><p>Switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-incdata title="insertion mode: text">text</a>".</li>
+ <li><p>Switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-incdata title="insertion mode:
+ text">text</a>".</li>
</ol></dd>
<dt>A start tag whose tag name is "xmp"</dt>
<dd>
- <p>If the <a href=#stack-of-open-elements>stack of open elements</a> <a href=#has-an-element-in-button-scope title="has
- an element in button scope">has a <code>p</code> element in button
- scope</a>, then <a href=#close-a-p-element>close a <code>p</code> element</a>.</p>
+ <p>If the <a href=#stack-of-open-elements>stack of open elements</a> <a href=#has-an-element-in-button-scope title="has an element in button scope">has a
+ <code>p</code> element in button scope</a>, then <a href=#close-a-p-element>close a <code>p</code>
+ element</a>.</p>
- <p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if
- any.</p>
+ <p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if any.</p>
<p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</p>
@@ -91460,30 +91282,28 @@
<dt>A start tag whose tag name is "select"</dt>
<dd>
- <p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if
- any.</p>
+ <p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if any.</p>
<p><a href=#insert-an-html-element>Insert an HTML element</a> for the token.</p>
<p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</p>
- <p>If the <a href=#insertion-mode>insertion mode</a> is one of "<a href=#parsing-main-intable title="insertion mode: in table">in table</a>", "<a href=#parsing-main-incaption title="insertion mode: in caption">in caption</a>", "<a href=#parsing-main-intbody title="insertion mode: in table body">in table body</a>",
- "<a href=#parsing-main-intr title="insertion mode: in row">in row</a>", or "<a href=#parsing-main-intd title="insertion mode: in cell">in cell</a>", then switch the
- <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-inselectintable title="insertion mode: in
- select in table">in select in table</a>". Otherwise, switch the
- <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-inselect title="insertion mode: in
- select">in select</a>".</p>
+ <p>If the <a href=#insertion-mode>insertion mode</a> is one of "<a href=#parsing-main-intable title="insertion mode: in table">in
+ table</a>", "<a href=#parsing-main-incaption title="insertion mode: in caption">in caption</a>", "<a href=#parsing-main-intbody title="insertion mode: in table body">in table body</a>", "<a href=#parsing-main-intr title="insertion mode: in
+ row">in row</a>", or "<a href=#parsing-main-intd title="insertion mode: in cell">in cell</a>", then switch the
+ <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-inselectintable title="insertion mode: in select in table">in select in
+ table</a>". Otherwise, switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-inselect title="insertion
+ mode: in select">in select</a>".</p>
</dd>
<dt>A start tag whose tag name is one of: "optgroup", "option"</dt>
<dd>
- <p>If the <a href=#current-node>current node</a> is an <code><a href=#the-option-element>option</a></code>
- element, then pop the <a href=#current-node>current node</a> off the <a href=#stack-of-open-elements>stack of open elements</a>.</p>
+ <p>If the <a href=#current-node>current node</a> is an <code><a href=#the-option-element>option</a></code> element, then pop the
+ <a href=#current-node>current node</a> off the <a href=#stack-of-open-elements>stack of open elements</a>.</p>
- <p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if
- any.</p>
+ <p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if any.</p>
<p><a href=#insert-an-html-element>Insert an HTML element</a> for the token.</p>
@@ -91514,11 +91334,10 @@
-->
- <p>If the <a href=#stack-of-open-elements>stack of open elements</a> <a href=#has-an-element-in-scope title="has an
- element in scope">has a <code>ruby</code> element in scope</a>,
- then <a href=#generate-implied-end-tags>generate implied end tags</a>. If the <a href=#current-node>current
- node</a> is not then a <code><a href=#the-ruby-element>ruby</a></code> element, this is a
- <a href=#parse-error>parse error</a>.</p>
+ <p>If the <a href=#stack-of-open-elements>stack of open elements</a> <a href=#has-an-element-in-scope title="has an element in scope">has a
+ <code>ruby</code> element in scope</a>, then <a href=#generate-implied-end-tags>generate implied end tags</a>. If the
+ <a href=#current-node>current node</a> is not then a <code><a href=#the-ruby-element>ruby</a></code> element, this is a <a href=#parse-error>parse
+ error</a>.</p>
<p><a href=#insert-an-html-element>Insert an HTML element</a> for the token.</p>
@@ -91527,85 +91346,74 @@
<dt>A start tag whose tag name is "math"</dt>
<dd>
- <p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if
- any.</p>
+ <p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if any.</p>
- <p><a href=#adjust-mathml-attributes>Adjust MathML attributes</a> for the token. (This
- fixes the case of MathML attributes that are not all
- lowercase.)</p>
+ <p><a href=#adjust-mathml-attributes>Adjust MathML attributes</a> for the token. (This fixes the case of MathML
+ attributes that are not all lowercase.)</p>
- <p><a href=#adjust-foreign-attributes>Adjust foreign attributes</a> for the token. (This
- fixes the use of namespaced attributes, in particular XLink.)</p>
+ <p><a href=#adjust-foreign-attributes>Adjust foreign attributes</a> for the token. (This fixes the use of namespaced
+ attributes, in particular XLink.)</p>
- <p><a href=#insert-a-foreign-element>Insert a foreign element</a> for the token, in the
- <a href=#mathml-namespace>MathML namespace</a>.</p>
+ <p><a href=#insert-a-foreign-element>Insert a foreign element</a> for the token, in the <a href=#mathml-namespace>MathML
+ namespace</a>.</p>
- <!-- If we ever change the frameset-ok flag to an insertion mode,
- the following change would be implied, except we'd have to do it
- even in the face of a self-closed tag:
+ <!-- If we ever change the frameset-ok flag to an insertion mode, the following change would be
+ implied, except we'd have to do it even in the face of a self-closed tag:
<p>Set the <span>frameset-ok flag</span> to "not ok".</p>
-->
- <p>If the token has its <i>self-closing flag</i> set, pop the
- <a href=#current-node>current node</a> off the <a href=#stack-of-open-elements>stack of open
- elements</a> and <a href=#acknowledge-self-closing-flag title="acknowledge self-closing
- flag">acknowledge the token's <i>self-closing flag</i></a>.</p>
+ <p>If the token has its <i>self-closing flag</i> set, pop the <a href=#current-node>current node</a> off the
+ <a href=#stack-of-open-elements>stack of open elements</a> and <a href=#acknowledge-self-closing-flag title="acknowledge self-closing flag">acknowledge
+ the token's <i>self-closing flag</i></a>.</p>
</dd>
<dt>A start tag whose tag name is "svg"</dt>
<dd>
- <p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if
- any.</p>
+ <p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if any.</p>
- <p><a href=#adjust-svg-attributes>Adjust SVG attributes</a> for the token. (This fixes
- the case of SVG attributes that are not all lowercase.)</p>
+ <p><a href=#adjust-svg-attributes>Adjust SVG attributes</a> for the token. (This fixes the case of SVG attributes that
+ are not all lowercase.)</p>
- <p><a href=#adjust-foreign-attributes>Adjust foreign attributes</a> for the token. (This
- fixes the use of namespaced attributes, in particular XLink in
- SVG.)</p>
+ <p><a href=#adjust-foreign-attributes>Adjust foreign attributes</a> for the token. (This fixes the use of namespaced
+ attributes, in particular XLink in SVG.)</p>
- <p><a href=#insert-a-foreign-element>Insert a foreign element</a> for the token, in the
- <a href=#svg-namespace>SVG namespace</a>.</p>
+ <p><a href=#insert-a-foreign-element>Insert a foreign element</a> for the token, in the <a href=#svg-namespace>SVG namespace</a>.</p>
- <!-- If we ever change the frameset-ok flag to an insertion mode,
- the following change would be implied, except we'd have to do it
- even in the face of a self-closed tag:
+ <!-- If we ever change the frameset-ok flag to an insertion mode, the following change would be
+ implied, except we'd have to do it even in the face of a self-closed tag:
<p>Set the <span>frameset-ok flag</span> to "not ok".</p>
-->
- <p>If the token has its <i>self-closing flag</i> set, pop the
- <a href=#current-node>current node</a> off the <a href=#stack-of-open-elements>stack of open
- elements</a> and <a href=#acknowledge-self-closing-flag title="acknowledge self-closing
- flag">acknowledge the token's <i>self-closing flag</i></a>.</p>
+ <p>If the token has its <i>self-closing flag</i> set, pop the <a href=#current-node>current node</a> off the
+ <a href=#stack-of-open-elements>stack of open elements</a> and <a href=#acknowledge-self-closing-flag title="acknowledge self-closing flag">acknowledge
+ the token's <i>self-closing flag</i></a>.</p>
</dd>
- <dt>A start <!--or end--> tag whose tag name is one of: "caption",
- "col", "colgroup", "frame", "head", "tbody", "td", "tfoot", "th",
- "thead", "tr"</dt>
- <!--<dt>An end tag whose tag name is one of: "area", "base",
- "basefont", "bgsound", "embed", "hr", "iframe", "image", "img",
- "input", "isindex", "keygen", "link", "menuitem", "meta", "noembed",
- "noframes", "param", "script", "select", "source", "style",
- "table", "textarea", "title", "track", "wbr"</dt>-->
- <!--<dt>An end tag whose tag name is "noscript", if the
- <span>scripting flag</span> is enabled</dt>-->
+ <dt>A start <!--or end--> tag whose tag name is one of: "caption", "col", "colgroup", "frame",
+ "head", "tbody", "td", "tfoot", "th", "thead", "tr"</dt>
+ <!--<dt>An end tag whose tag name is one of: "area", "base", "basefont", "bgsound", "embed",
+ "hr", "iframe", "image", "img", "input", "isindex", "keygen", "link", "menuitem", "meta",
+ "noembed", "noframes", "param", "script", "select", "source", "style", "table", "textarea",
+ "title", "track", "wbr"</dt>-->
+ <!--<dt>An end tag whose tag name is "noscript", if the <span>scripting flag</span> is
+ enabled</dt>-->
<dd>
+
<p><a href=#parse-error>Parse error</a>. Ignore the token.</p>
- <!-- end tags are commented out because since they can never end
- up on the stack anyway, the default end tag clause will
- automatically handle them. we don't want to have text in the spec
- that is just an optimisation, as that detracts from the spec
- itself -->
+
+ <!-- end tags are commented out because since they can never end up on the stack anyway, the
+ default end tag clause will automatically handle them. we don't want to have text in the spec
+ that is just an optimisation, as that detracts from the spec itself -->
+
</dd>
<dt>Any other start tag</dt>
<dd>
- <p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if
- any.</p>
+ <p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if any.</p>
<p><a href=#insert-an-html-element>Insert an HTML element</a> for the token.</p>
@@ -91619,30 +91427,29 @@
<p>Run these steps:</p>
- <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>
+ <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><i>Loop</i>: If <var title="">node</var> is an <a href=#html-elements title="HTML elements">HTML element</a> with the same tag
- name as the token, then:</p>
+ <li><p><i>Loop</i>: If <var title="">node</var> is an <a href=#html-elements title="HTML elements">HTML
+ element</a> with the same tag name as the token, then:</p>
- <ol><li><p><a href=#generate-implied-end-tags>Generate implied end tags</a>, except
- for <a href=#html-elements>HTML elements</a> with the same tag name as the token.</li>
+ <ol><li><p><a href=#generate-implied-end-tags>Generate implied end tags</a>, except for <a href=#html-elements>HTML elements</a> with the
+ same tag name as the token.</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>, or if it is not an <a href=#html-elements title="HTML elements">HTML element</a>, then this is a
- <a href=#parse-error>parse error</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>, or if it is not an <a href=#html-elements title="HTML elements">HTML element</a>, then this is
+ a <a href=#parse-error>parse error</a>.</li>
- <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>
+ <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>
- <li><p>Otherwise, if <var title="">node</var> is in the
- <a href=#special>special</a> category, then this is a <a href=#parse-error>parse
- error</a>; ignore the token, and abort these steps.</li>
+ <li><p>Otherwise, if <var title="">node</var> is in the <a href=#special>special</a> category, then
+ this is a <a href=#parse-error>parse error</a>; ignore the token, and abort these steps.</li>
- <li><p>Set <var title="">node</var> to the previous entry in the
- <a href=#stack-of-open-elements>stack of open elements</a>.</li>
+ <li><p>Set <var title="">node</var> to the previous entry in the <a href=#stack-of-open-elements>stack of open
+ elements</a>.</li>
<li><p>Return to the step labeled <i>loop</i>.</li>
@@ -91659,120 +91466,97 @@
<li><p>Pop elements from the <a href=#stack-of-open-elements>stack of open elements</a> until a <code><a href=#the-p-element>p</a></code> element
has been popped from the stack.</li>
- </ol><p id=adoptionAgency>The <dfn id=adoption-agency-algorithm>adoption agency algorithm</dfn>, which takes as its only argument a tag name <var title="">subject</var> for which the algorithm is being run, consists of the following steps:</p>
+ </ol><p id=adoptionAgency>The <dfn id=adoption-agency-algorithm>adoption agency algorithm</dfn>, which takes as its only argument
+ a tag name <var title="">subject</var> for which the algorithm is being run, consists of the
+ following steps:</p>
-<!--CLEANUP-->
- <ol><li><p>Let <var title="">outer loop counter</var> be
- zero.</li>
+ <ol><li><p>Let <var title="">outer loop counter</var> be zero.</li>
- <li><p><i>Outer loop</i>: If <var title="">outer loop
- counter</var> is greater than or equal to eight, then abort these
- steps.</li>
+ <li><p><i>Outer loop</i>: If <var title="">outer loop counter</var> is greater than or equal to
+ eight, then abort these steps.</li>
- <li><p>Increment <var title="">outer loop counter</var> by
- one.</li>
+ <li><p>Increment <var title="">outer loop counter</var> by one.</li>
<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>
+ <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
- marker in the list, if any, or the start of the list
- otherwise, and</li>
+ <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 tag name <var title="">subject</var>.</li>
- </ul><p>If there is no such node, then abort these steps and instead
- act as described in the "any other end tag" entry below.</p>
+ </ul><p>If there is no such node, then abort these steps and instead act as described in the "any
+ other end tag" entry below.</p>
- <p>Otherwise, if there is such a node, but that node is not
- in the <a href=#stack-of-open-elements>stack of open elements</a>, then this is a
- <a href=#parse-error>parse error</a>; remove the element from the list,
- and abort these steps.</p>
+ <p>Otherwise, if there is such a node, but that node is not in the <a href=#stack-of-open-elements>stack of open
+ elements</a>, then this is a <a href=#parse-error>parse error</a>; remove the element from the list, and
+ abort these steps.</p>
- <p>Otherwise, if there is such a node, and 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>; abort these
- steps.</p>
+ <p>Otherwise, if there is such a node, and 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>; abort these steps.</p>
- <p>Otherwise, there is a <var title="">formatting
- element</var> and that element is in <a href=#stack-of-open-elements title="stack of
- open elements">the stack</a> and is <a href=#has-an-element-in-scope title="has an
- element in scope">in scope</a>. If the element is not the
- <a href=#current-node>current node</a>, this is a <a href=#parse-error>parse
- error</a>. In any case, proceed with the algorithm as
- written in the following steps.</p>
+ <p>Otherwise, there is a <var title="">formatting element</var> and that element is in <a href=#stack-of-open-elements title="stack of open elements">the stack</a> and is <a href=#has-an-element-in-scope title="has an element in scope">in
+ scope</a>. If the element is not the <a href=#current-node>current node</a>, this is a <a href=#parse-error>parse
+ error</a>. In any case, proceed with the algorithm as written in the following steps.</p>
</li>
- <li><p>Let the <var title="">furthest block</var> be the topmost
- node in the <a href=#stack-of-open-elements>stack of open elements</a> that is lower in
- the stack than the <var title="">formatting element</var>, and is
- an element in the <a href=#special>special</a> category. There might not
- be one.</li>
+ <li><p>Let the <var title="">furthest block</var> be the topmost node in the <a href=#stack-of-open-elements>stack of open
+ elements</a> that is lower in the stack than the <var title="">formatting element</var>, and
+ is an element in the <a href=#special>special</a> category. There might not be one.</li>
- <li><p>If there is no <var title="">furthest block</var>, then
- the UA must first pop all the nodes from the bottom of the
- <a href=#stack-of-open-elements>stack of open elements</a>, from the <a href=#current-node>current
- node</a> up to and including the <var title="">formatting
- element</var>, then remove the <var title="">formatting
- element</var> from the <a href=#list-of-active-formatting-elements>list of active formatting
- elements</a>, and finally abort these steps.</li>
+ <li><p>If there is no <var title="">furthest block</var>, then the UA must first pop all the
+ nodes from the bottom of the <a href=#stack-of-open-elements>stack of open elements</a>, from the <a href=#current-node>current
+ node</a> up to and including the <var title="">formatting element</var>, then remove the <var title="">formatting element</var> from the <a href=#list-of-active-formatting-elements>list of active formatting elements</a>, and
+ finally abort these steps.</li>
- <li><p>Let the <var title="">common ancestor</var> be the element
- immediately above the <var title="">formatting element</var> in the
- <a href=#stack-of-open-elements>stack of open elements</a>.</li>
+ <li><p>Let the <var title="">common ancestor</var> be the element immediately above the <var title="">formatting element</var> in the <a href=#stack-of-open-elements>stack of open elements</a>.</li>
- <li><p>Let a bookmark note the position of the <var title="">formatting element</var> in the <a href=#list-of-active-formatting-elements>list of active
- formatting elements</a> relative to the elements on either
- side of it in the list.</li>
+ <li><p>Let a bookmark note the position of the <var title="">formatting element</var> in the
+ <a href=#list-of-active-formatting-elements>list of active formatting elements</a> relative to the elements on either side of it in
+ the list.</li>
<li>
- <p>Let <var title="">node</var> and <var title="">last node</var> be the <var title="">furthest block</var>. Follow these steps:</p>
+ <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><p>Let <var title="">inner loop counter</var> be zero.</li>
- <li><p><i>Inner loop</i>: If <var title="">inner loop counter</var> is greater than or equal
- to three, then go to the next step in the overall algorithm.</li>
+ <li><p><i>Inner loop</i>: If <var title="">inner loop counter</var> is greater than or equal to
+ three, then go to the next step in the overall algorithm.</li>
<li><p>Increment <var title="">inner loop counter</var> by one.</li>
- <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>, or if <var title="">node</var> is no longer in
- the <a href=#stack-of-open-elements>stack of open elements</a> (e.g. because it got
- removed by the next step), the element that was immediately
- above <var title="">node</var> in the <a href=#stack-of-open-elements>stack of open
- elements</a> before <var title="">node</var> was
- removed.</li>
+ <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>, or if <var title="">node</var> is no longer in the
+ <a href=#stack-of-open-elements>stack of open elements</a> (e.g. because it got removed by the next step), the element
+ that was immediately above <var title="">node</var> in the <a href=#stack-of-open-elements>stack of open elements</a>
+ before <var title="">node</var> was removed.</li>
- <li>If <var title="">node</var> is not in the <a href=#list-of-active-formatting-elements>list of
- active formatting elements</a>, then remove <var title="">node</var> from the <a href=#stack-of-open-elements>stack of open
- elements</a> and then go back to the step labeled <i>inner
- loop</i>.</li>
+ <li>If <var title="">node</var> is not in the <a href=#list-of-active-formatting-elements>list of active formatting elements</a>,
+ then remove <var title="">node</var> from the <a href=#stack-of-open-elements>stack of open elements</a> and then go
+ back to the step labeled <i>inner loop</i>.</li>
- <li>Otherwise, if <var title="">node</var> is the <var title="">formatting element</var>, then go to the next step
- in the overall algorithm.</li>
+ <li>Otherwise, if <var title="">node</var> is the <var title="">formatting element</var>, then
+ go to the next step in the overall algorithm.</li>
- <li><a href=#create-an-element-for-the-token>Create an element for the token</a> for which the
- element <var title="">node</var> was created, with <var title="">common ancestor</var> as the intended parent; replace the entry
- for <var title="">node</var> in the <a href=#list-of-active-formatting-elements>list of active
- formatting elements</a> with an entry for the new element,
- replace the entry for <var title="">node</var> in the
- <a href=#stack-of-open-elements>stack of open elements</a> with an entry for the new
- element, and let <var title="">node</var> be the new
- element.</li>
+ <li><a href=#create-an-element-for-the-token>Create an element for the token</a> for which the element <var title="">node</var>
+ was created, with <var title="">common ancestor</var> as the intended parent; replace the entry
+ for <var title="">node</var> in the <a href=#list-of-active-formatting-elements>list of active formatting elements</a> with an
+ entry for the new element, replace the entry for <var title="">node</var> in the <a href=#stack-of-open-elements>stack of
+ open elements</a> with an entry for the new element, and let <var title="">node</var> be the
+ new element.</li>
- <li>If <var title="">last node</var> is the <var title="">furthest block</var>, then move the aforementioned
- bookmark to be immediately after the new <var title="">node</var> in the <a href=#list-of-active-formatting-elements>list of active formatting
- elements</a>.</li>
+ <li>If <var title="">last node</var> is the <var title="">furthest block</var>, then move the
+ aforementioned bookmark to be immediately after the new <var title="">node</var> in the
+ <a href=#list-of-active-formatting-elements>list of active formatting elements</a>.</li>
- <li>Insert <var title="">last node</var> into <var title="">node</var>, first removing it from its previous
- parent node if any.</li>
+ <li>Insert <var title="">last node</var> into <var title="">node</var>, first removing it from
+ its previous parent node if any.</li>
<li>Let <var title="">last node</var> be <var title="">node</var>.</li>
@@ -91780,31 +91564,26 @@
</ol></li>
- <li><p>Insert whatever <var title="">last node</var> ended up being in the previous step at the <a href=#appropriate-place-for-inserting-a-node>appropriate
- place for inserting a node</a>, but using <var title="">common ancestor</var> as the <i>override target</i>.</li>
+ <li><p>Insert whatever <var title="">last node</var> ended up being in the previous step at the
+ <a href=#appropriate-place-for-inserting-a-node>appropriate place for inserting a node</a>, but using <var title="">common
+ ancestor</var> as the <i>override target</i>.</li>
- <li><p><a href=#create-an-element-for-the-token>Create an element for the token</a> for which the
- <var title="">formatting element</var> was created, with <var title="">furthest
- block</var> as the intended parent.</li>
+ <li><p><a href=#create-an-element-for-the-token>Create an element for the token</a> for which the <var title="">formatting
+ element</var> was created, with <var title="">furthest block</var> as the intended
+ parent.</li>
- <li><p>Take all of the child nodes of the <var title="">furthest
- block</var> and append them to the element created in the last
- step.</li>
+ <li><p>Take all of the child nodes of the <var title="">furthest block</var> and append them to
+ the element created in the last step.</li>
- <li><p>Append that new element to the <var title="">furthest
- block</var>.</li>
+ <li><p>Append that new element to the <var title="">furthest block</var>.</li>
- <li><p>Remove the <var title="">formatting element</var> from the
- <a href=#list-of-active-formatting-elements>list of active formatting elements</a>, and insert the
- new element into the <a href=#list-of-active-formatting-elements>list of active formatting
- elements</a> at the position of the aforementioned
- bookmark.</li>
+ <li><p>Remove the <var title="">formatting element</var> from the <a href=#list-of-active-formatting-elements>list of active formatting
+ elements</a>, and insert the new element into the <a href=#list-of-active-formatting-elements>list of active formatting
+ elements</a> at the position of the aforementioned bookmark.</li>
- <li><p>Remove the <var title="">formatting element</var> from the
- <a href=#stack-of-open-elements>stack of open elements</a>, and insert the new element
- into the <a href=#stack-of-open-elements>stack of open elements</a> immediately below
- the position of the <var title="">furthest block</var> in that
- stack.</li>
+ <li><p>Remove the <var title="">formatting element</var> from the <a href=#stack-of-open-elements>stack of open
+ elements</a>, and insert the new element into the <a href=#stack-of-open-elements>stack of open elements</a>
+ immediately below the position of the <var title="">furthest block</var> in that stack.</li>
<li><p>Jump back to the step labeled <i>outer loop</i>.</li>
Modified: source
===================================================================
--- source 2013-07-31 19:11:24 UTC (rev 8105)
+++ source 2013-07-31 19:27:34 UTC (rev 8106)
@@ -42902,46 +42902,36 @@
<span>HTMLAreaElement</span> implements <span>URLUtils</span>;</pre>
</dd>
</dl><!--TOPIC:HTML-->
-<!--CLEANUP-->
- <p>The <code>area</code> element <span>represents</span> either a
- hyperlink with some text and a corresponding area on an <span>image
- map</span>, or a dead area on an image map.</p>
+ <p>The <code>area</code> element <span>represents</span> either a hyperlink with some text and a
+ corresponding area on an <span>image map</span>, or a dead area on an image map.</p>
- <p>An <code>area</code> element with a parent node must have a <code>map</code> element
- ancestor or a <code>template</code> element ancestor.</p>
+ <p>An <code>area</code> element with a parent node must have a <code>map</code> element ancestor
+ or a <code>template</code> element ancestor.</p>
- <p>If the <code>area</code> element has an <code
- title="attr-hyperlink-href">href</code> attribute, then the
- <code>area</code> element represents a <span>hyperlink</span>. In
- this case, the <dfn title="attr-area-alt"><code>alt</code></dfn>
- attribute must be present. It specifies the text of the
- hyperlink. Its value must be text that, when presented with the
- texts specified for the other hyperlinks of the <span>image
- map</span>, and with the alternative text of the image, but without
- the image itself, provides the user with the same kind of choice as
- the hyperlink would when used without its text but with its shape
- applied to the image. The <code title="attr-area-alt">alt</code>
- attribute may be left blank if there is another <code>area</code>
- element in the same <span>image map</span> that points to the same
- resource and has a non-blank <code title="attr-area-alt">alt</code>
- attribute.</p>
+ <p>If the <code>area</code> element has an <code title="attr-hyperlink-href">href</code>
+ attribute, then the <code>area</code> element represents a <span>hyperlink</span>. In this case,
+ the <dfn title="attr-area-alt"><code>alt</code></dfn> attribute must be present. It specifies the
+ text of the hyperlink. Its value must be text that, when presented with the texts specified for
+ the other hyperlinks of the <span>image map</span>, and with the alternative text of the image,
+ but without the image itself, provides the user with the same kind of choice as the hyperlink
+ would when used without its text but with its shape applied to the image. The <code
+ title="attr-area-alt">alt</code> attribute may be left blank if there is another <code>area</code>
+ element in the same <span>image map</span> that points to the same resource and has a non-blank
+ <code title="attr-area-alt">alt</code> attribute.</p>
- <p>If the <code>area</code> element has no <code
- title="attr-hyperlink-href">href</code> attribute, then the area
- represented by the element cannot be selected, and the <code
+ <p>If the <code>area</code> element has no <code title="attr-hyperlink-href">href</code>
+ attribute, then the area represented by the element cannot be selected, and the <code
title="attr-area-alt">alt</code> attribute must be omitted.</p>
- <p>In both cases, the <code title="attr-area-shape">shape</code> and
- <code title="attr-area-coords">coords</code> attributes specify the
- area.</p>
+ <p>In both cases, the <code title="attr-area-shape">shape</code> and <code
+ title="attr-area-coords">coords</code> attributes specify the area.</p>
- <p>The <dfn title="attr-area-shape"><code>shape</code></dfn>
- attribute is an <span>enumerated attribute</span>. The following
- table lists the keywords defined for this attribute. The states
- given in the first cell of the rows with keywords give the states to
- which those keywords map. <span class="impl">Some of the keywords
- are non-conforming, as noted in the last column.</span></p>
+ <p>The <dfn title="attr-area-shape"><code>shape</code></dfn> attribute is an <span>enumerated
+ attribute</span>. The following table lists the keywords defined for this attribute. The states
+ given in the first cell of the rows with keywords give the states to which those keywords map.
+ <span class="impl">Some of the keywords are non-conforming, as noted in the last
+ column.</span></p>
<table>
<thead>
@@ -42977,55 +42967,42 @@
<td class="impl">Non-conforming
</table>
- <p>The attribute may be omitted. The <i>missing value default</i> is
- the <span title="attr-area-shape-rect">rectangle</span> state.</p>
+ <p>The attribute may be omitted. The <i>missing value default</i> is the <span
+ title="attr-area-shape-rect">rectangle</span> state.</p>
- <p>The <dfn title="attr-area-coords"><code>coords</code></dfn>
- attribute must, if specified, contain a <span>valid list of
- integers</span>. This attribute gives the coordinates for the shape
- described by the <code title="attr-area-shape">shape</code>
- attribute. <span class="impl">The processing for this attribute is
- described as part of the <span>image map</span> processing
+ <p>The <dfn title="attr-area-coords"><code>coords</code></dfn> attribute must, if specified,
+ contain a <span>valid list of integers</span>. This attribute gives the coordinates for the shape
+ described by the <code title="attr-area-shape">shape</code> attribute. <span class="impl">The
+ processing for this attribute is described as part of the <span>image map</span> processing
model.</span></p>
- <!-- v2: It was suggested by John S. Urban that coords should
- support percentages as well as pixels, so that one could use the
- same image map for images of various sizes. -->
+ <!-- v2: It was suggested by John S. Urban that coords should support percentages as well as
+ pixels, so that one could use the same image map for images of various sizes. -->
- <p>In the <dfn title="attr-area-shape-circle">circle state</dfn>,
- <code>area</code> elements must have a <code
- title="attr-area-coords">coords</code> attribute present, with three
- integers, the last of which must be non-negative. The first integer
- must be the distance in CSS pixels from the left edge of the image
- to the center of the circle, the second integer must be the distance
- in CSS pixels from the top edge of the image to the center of the
- circle, and the third integer must be the radius of the circle,
- again in CSS pixels.</p>
+ <p>In the <dfn title="attr-area-shape-circle">circle state</dfn>, <code>area</code> elements must
+ have a <code title="attr-area-coords">coords</code> attribute present, with three integers, the
+ last of which must be non-negative. The first integer must be the distance in CSS pixels from the
+ left edge of the image to the center of the circle, the second integer must be the distance in CSS
+ pixels from the top edge of the image to the center of the circle, and the third integer must be
+ the radius of the circle, again in CSS pixels.</p>
- <p>In the <dfn title="attr-area-shape-default">default state</dfn>
- state, <code>area</code> elements must not have a <code
- title="attr-area-coords">coords</code> attribute. (The area is the
+ <p>In the <dfn title="attr-area-shape-default">default state</dfn> state, <code>area</code>
+ elements must not have a <code title="attr-area-coords">coords</code> attribute. (The area is the
whole image.)</p>
- <p>In the <dfn title="attr-area-shape-poly">polygon state</dfn>,
- <code>area</code> elements must have a <code
- title="attr-area-coords">coords</code> attribute with at least six
- integers, and the number of integers must be even. Each pair of
- integers must represent a coordinate given as the distances from the
- left and the top of the image in CSS pixels respectively, and all
- the coordinates together must represent the points of the polygon,
- in order.</p>
+ <p>In the <dfn title="attr-area-shape-poly">polygon state</dfn>, <code>area</code> elements must
+ have a <code title="attr-area-coords">coords</code> attribute with at least six integers, and the
+ number of integers must be even. Each pair of integers must represent a coordinate given as the
+ distances from the left and the top of the image in CSS pixels respectively, and all the
+ coordinates together must represent the points of the polygon, in order.</p>
- <p>In the <dfn title="attr-area-shape-rect">rectangle state</dfn>,
- <code>area</code> elements must have a <code
- title="attr-area-coords">coords</code> attribute with exactly four
- integers, the first of which must be less than the third, and the
- second of which must be less than the fourth. The four points must
- represent, respectively, the distance from the left edge of the
- image to the left side of the rectangle, the distance from the
- top edge to the top side, the distance from the left edge to the
- right side, and the distance from the top edge to the bottom side,
- all in CSS pixels.</p>
+ <p>In the <dfn title="attr-area-shape-rect">rectangle state</dfn>, <code>area</code> elements must
+ have a <code title="attr-area-coords">coords</code> attribute with exactly four integers, the
+ first of which must be less than the third, and the second of which must be less than the fourth.
+ The four points must represent, respectively, the distance from the left edge of the image to the
+ left side of the rectangle, the distance from the top edge to the top side, the distance from the
+ left edge to the right side, and the distance from the top edge to the bottom side, all in CSS
+ pixels.</p>
<div class="impl">
@@ -43048,33 +43025,33 @@
attributes must be omitted if the <code title="attr-hyperlink-href">href</code> attribute is not
present.</p>
- <p>If the <code title="attr-itemprop">itemprop</code> attribute is specified on an <code>area</code>
- element, then the <code title="attr-hyperlink-href">href</code> attribute must also be
- specified.</p>
+ <p>If the <code title="attr-itemprop">itemprop</code> attribute is specified on an
+ <code>area</code> element, then the <code title="attr-hyperlink-href">href</code> attribute must
+ also be specified.</p>
<div class="impl">
-<!--CLEANUP-->
<p>The <span>activation behavior</span> of <code>area</code> elements is to run the following
steps:</p>
<ol><!-- c.f. <a>'s similar section -->
- <li><p>If the <code>area</code> element's <code>Document</code> is not <span>fully active</span>, then abort these steps.</p></li>
+ <li><p>If the <code>area</code> element's <code>Document</code> is not <span>fully active</span>,
+ then abort these steps.</p></li>
<li>
- <p>If the <code>area</code> element has
- a <code title="attr-hyperlink-download">download</code> attribute and the algorithm is not
- <span>allowed to show a popup</span>, or the element's <code
- title="attr-hyperlink-target">target</code> attribute is present and applying <span>the rules for
- choosing a browsing context given a browsing context name</span>, using the value of the <code
- title="attr-hyperlink-target">target</code> attribute as the browsing context name, would result
- in there not being a chosen browsing context, then run these substeps:</p>
+ <p>If the <code>area</code> element has a <code title="attr-hyperlink-download">download</code>
+ attribute and the algorithm is not <span>allowed to show a popup</span>, or the element's <code
+ title="attr-hyperlink-target">target</code> attribute is present and applying <span>the rules
+ for choosing a browsing context given a browsing context name</span>, using the value of the
+ <code title="attr-hyperlink-target">target</code> attribute as the browsing context name, would
+ result in there not being a chosen browsing context, then run these substeps:</p>
<ol>
- <li><p>If there is an <span>entry script</span>, throw an <code>InvalidAccessError</code> exception.</p></li>
+ <li><p>If there is an <span>entry script</span>, throw an <code>InvalidAccessError</code>
+ exception.</p></li>
<li><p>Abort these steps without following the hyperlink.</p></li>
@@ -74233,13 +74210,13 @@
</dl>
<div class="impl">
-<!--CLEANUP-->
<p>The <dfn title="dom-document-domain"><code>domain</code></dfn> attribute on
<code>Document</code> objects must be initialized to <span>the document's domain</span>, if it has
- one, and the empty string otherwise. If <span>the document's domain</span> starts with a U+005B LEFT SQUARE BRACKET
- character ([) and ends with a U+005D RIGHT SQUARE BRACKET character (]), it is an IPv6 address;
- these square brackets must be omitted when initializing the attribute's value.</p>
+ one, and the empty string otherwise. If <span>the document's domain</span> starts with a U+005B
+ LEFT SQUARE BRACKET character ([) and ends with a U+005D RIGHT SQUARE BRACKET character (]), it is
+ an IPv6 address; these square brackets must be omitted when initializing the attribute's
+ value.</p>
<p>On getting, the attribute must return its current value, unless the <code>Document</code> has
no <span>browsing context</span>, in which case it must return the empty string.</p>
@@ -74277,10 +74254,9 @@
<ol>
<li>
-<!--CLEANUP-->
- <p>If the current value is an IPv4 or IPv6 address, throw a <code>SecurityError</code> exception and
- abort these steps.</p>
+ <p>If the current value is an IPv4 or IPv6 address, throw a <code>SecurityError</code>
+ exception and abort these steps.</p>
</li>
@@ -80670,17 +80646,13 @@
<!-- SCRIPT EXEC -->
<h4 id="javascript-protocol"><dfn title="javascript protocol">The <code title="">javascript:</code> URL scheme</dfn></h4>
- <p>When a <span>URL</span> using the <code
- title="">javascript:</code> scheme is <dfn
- title="concept-js-deref">dereferenced</dfn>, the user agent must run
- the following steps:</p>
+ <p>When a <span>URL</span> using the <code title="">javascript:</code> scheme is <dfn
+ 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
- content retrieval operation defined for <code
- title="">javascript:</code> URLs. <a
- href="#refsJSURL">[JSURL]</a></p></li>
+ <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></p></li>
<li>
@@ -80688,11 +80660,9 @@
<dl>
- <dt>If a <span>browsing context</span> is being <span
- title="navigate">navigated</span> to a <code>javascript:</code>
- URL, and the <span>source browsing context</span> for that
- navigation, if any, has <span
- title="concept-bc-noscript">scripting disabled</span></dt>
+ <dt>If a <span>browsing context</span> is being <span title="navigate">navigated</span> to a
+ <code>javascript:</code> URL, and the <span>source browsing context</span> for that navigation,
+ if any, has <span title="concept-bc-noscript">scripting disabled</span></dt>
<dd>
@@ -80700,70 +80670,54 @@
</dd>
- <dt>If a <span>browsing context</span> is being <span
- title="navigate">navigated</span> to a <code>javascript:</code>
- URL, and the <span>active document</span> of that browsing
- context has the <span>same origin</span> as the script given by
- that URL</dt>
+ <dt>If a <span>browsing context</span> is being <span title="navigate">navigated</span> to a
+ <code>javascript:</code> URL, and the <span>active document</span> of that browsing context has
+ the <span>same origin</span> as the script given by that URL</dt>
<dd>
<!-- http://www.hixie.ch/tests/adhoc/html/navigation/javascript-url/ -->
- <p>Let <var title="">address</var> be the <span title="the
- document's address">address</span> of the <span>active
- document</span> of the <span>browsing context</span> being
- navigated.</p>
+ <p>Let <var title="">address</var> be the <span title="the document's address">address</span>
+ of the <span>active document</span> of the <span>browsing context</span> being navigated.</p>
- <p>If <var title="">address</var> is <code>about:blank</code>,
- and the <span>browsing context</span> being navigated has a
- <span>creator browsing context</span>, then let <var
- title="">address</var> be the <span title="the document's
- address">address</span> of the <span>creator
- <code>Document</code></span> instead.</p>
+ <p>If <var title="">address</var> is <code>about:blank</code>, and the <span>browsing
+ context</span> being navigated has a <span>creator browsing context</span>, then let <var
+ title="">address</var> be the <span title="the document's address">address</span> of the
+ <span>creator <code>Document</code></span> instead.</p>
- <p><span title="create a script from a node">Create a
- script</span> from the <code>Document</code> node of the
- <span>active document</span>, using the aforementioned script
- source, the <span>URL</span> of the resource where the
- <code>javascript:</code> URL, was found, and assuming the
- scripting language is JavaScript.</p>
+ <p><span title="create a script from a node">Create a script</span> from the
+ <code>Document</code> node of the <span>active document</span>, using the aforementioned
+ script source, the <span>URL</span> of the resource where the <code>javascript:</code> URL,
+ was found, and assuming the scripting language is JavaScript.</p>
- <p>Let <var title="">result</var> be the return value of the
- <i>initial code entry-point</i> of this <span
- title="concept-script">script</span>. If an exception was
- thrown, let <var title="">result</var> be void instead. (The
- result will be void also if <span
+ <p>Let <var title="">result</var> be the return value of the <i>initial code entry-point</i>
+ of this <span title="concept-script">script</span>. If an exception was thrown, let <var
+ title="">result</var> be void instead. (The result will be void also if <span
title="concept-bc-noscript">scripting is disabled</span>.)</p>
- <p>When it comes time to <span>set the document's address</span>
- in the <span title="navigate">navigation algorithm</span>, use
- <var title="">address</var> as the <span>override
- URL</span>.</p>
+ <p>When it comes time to <span>set the document's address</span> in the <span
+ title="navigate">navigation algorithm</span>, use <var title="">address</var> as the
+ <span>override URL</span>.</p>
</dd>
-<!--(turns out only Firefox does this, and only for <img src=""> and a
- few others, so it's commented out for now pending someone having
- a convincing use case)
+<!--(turns out only Firefox does this, and only for <img src=""> and a few others, so it's commented
+ out for now pending someone having a convincing use case)
- <dt>If the <code>Document</code> object of the element,
- attribute, or style sheet from which the <code>javascript:</code>
- URL was reached has an associated <span>browsing
+ <dt>If the <code>Document</code> object of the element, attribute, or style sheet from which
+ the <code>javascript:</code> URL was reached has an associated <span>browsing
context</span></dt>
<dd>
- <p><span>Create an impotent script</span> using the
- aforementioned script source, with the scripting language set to
- JavaScript, and with the <code>Document</code>'s object's
+ <p><span>Create an impotent script</span> using the aforementioned script source, with the
+ scripting language set to JavaScript, and with the <code>Document</code>'s object's
<span>browsing context</span> as the browsing context.</p>
- <p>Let <var title="">result</var> be the return value of the
- <i>initial code entry-point</i> of this <span
- title="concept-script">script</span>. If an exception was
- thrown, let <var title="">result</var> be void instead. (The
- result will be void also if <span
+ <p>Let <var title="">result</var> be the return value of the <i>initial code entry-point</i>
+ of this <span title="concept-script">script</span>. If an exception was thrown, let <var
+ title="">result</var> be void instead. (The result will be void also if <span
title="concept-bc-noscript">scripting is disabled</span>.)</p>
</dd>
@@ -80783,19 +80737,15 @@
<li>
- <p>If the result of executing the script is void (there is no
- return value), then the URL must be treated in a manner equivalent
- to an HTTP resource with an HTTP 204 No Content response.</p>
+ <p>If the result of executing the script is void (there is no return value), then the URL must
+ be treated in a manner equivalent to an HTTP resource with an HTTP 204 No Content response.</p>
- <p>Otherwise, the URL must be treated in a manner equivalent to an
- HTTP resource with a 200 OK response whose <span
- title="Content-Type">Content-Type metadata</span> is
- <code>text/html</code> and whose response body is the return value
- converted to a string value.</p>
+ <p>Otherwise, the URL must be treated in a manner equivalent to an HTTP resource with a 200 OK
+ response whose <span title="Content-Type">Content-Type metadata</span> is <code>text/html</code>
+ and whose response body is the return value converted to a string value.</p>
- <p class="note">Certain contexts, in particular <code>img</code>
- elements, ignore the <span title="Content-Type">Content-Type
- metadata</span>.</p>
+ <p class="note">Certain contexts, in particular <code>img</code> elements, ignore the <span
+ title="Content-Type">Content-Type metadata</span>.</p>
</li>
@@ -80803,23 +80753,20 @@
<div class="example">
- <p>So for example a <code title="">javascript:</code> URL for a
- <code title="attr-img-src">src</code> attribute of an
- <code>img</code> element would be evaluated in the context of an
- empty object as soon as the attribute is set; it would then be
- sniffed to determine the image type and decoded as an image.</p>
+ <p>So for example a <code title="">javascript:</code> URL for a <code
+ title="attr-img-src">src</code> attribute of an <code>img</code> element would be evaluated in
+ the context of an empty object as soon as the attribute is set; it would then be sniffed to
+ determine the image type and decoded as an image.</p>
- <p>A <code title="">javascript:</code> URL in an <code
- title="attr-hyperlink-href">href</code> attribute of an <code>a</code>
- element would only be evaluated when the link was <span
+ <p>A <code title="">javascript:</code> URL in an <code title="attr-hyperlink-href">href</code>
+ attribute of an <code>a</code> element would only be evaluated when the link was <span
title="following hyperlinks">followed</span>.</p>
- <p>The <code title="attr-iframe-src">src</code> attribute of an
- <code>iframe</code> element would be evaluated in the context of
- the <code>iframe</code>'s own <span>browsing context</span>; once
- evaluated, its return value (if it was not void) would replace that
- <span>browsing context</span>'s document, thus changing the
- variables visible in that <span>browsing context</span>.</p>
+ <p>The <code title="attr-iframe-src">src</code> attribute of an <code>iframe</code> element would
+ be evaluated in the context of the <code>iframe</code>'s own <span>browsing context</span>; once
+ evaluated, its return value (if it was not void) would replace that <span>browsing
+ context</span>'s document, thus changing the variables visible in that <span>browsing
+ context</span>.</p>
</div>
@@ -81829,9 +81776,8 @@
<dd>
- <p>Schedules a timeout to run <var title="">handler</var> after
- <var title="">timeout</var> milliseconds. Any <var
- title="">arguments</var> are passed straight through to the <var
+ <p>Schedules a timeout to run <var title="">handler</var> after <var title="">timeout</var>
+ milliseconds. Any <var title="">arguments</var> are passed straight through to the <var
title="">handler</var>.</p>
</dd>
@@ -81840,8 +81786,8 @@
<dd>
- <p>Schedules a timeout to compile and run <var title="">code</var>
- after <var title="">timeout</var> milliseconds.</p>
+ <p>Schedules a timeout to compile and run <var title="">code</var> after <var
+ title="">timeout</var> milliseconds.</p>
</dd>
@@ -81849,7 +81795,8 @@
<dd>
- <p>Cancels the timeout set with <code title="dom-windowtimers-setTimeout">setTimeout()</code> identified by <var title="">handle</var>.</p>
+ <p>Cancels the timeout set with <code title="dom-windowtimers-setTimeout">setTimeout()</code>
+ identified by <var title="">handle</var>.</p>
</dd>
@@ -81857,9 +81804,8 @@
<dd>
- <p>Schedules a timeout to run <var title="">handler</var> every
- <var title="">timeout</var> milliseconds. Any <var
- title="">arguments</var> are passed straight through to the <var
+ <p>Schedules a timeout to run <var title="">handler</var> every <var title="">timeout</var>
+ milliseconds. Any <var title="">arguments</var> are passed straight through to the <var
title="">handler</var>.</p>
</dd>
@@ -81868,8 +81814,8 @@
<dd>
- <p>Schedules a timeout to compile and run <var title="">code</var>
- every <var title="">timeout</var> milliseconds.</p>
+ <p>Schedules a timeout to compile and run <var title="">code</var> every <var
+ title="">timeout</var> milliseconds.</p>
</dd>
@@ -82183,36 +82129,33 @@
<p>Displays a modal alert with the given message, and waits for the user to dismiss it.</p>
<p>A call to the <code
- title="dom-navigator-yieldForStorageUpdates">navigator.yieldForStorageUpdates()</code>
- method is implied when this method is invoked.</p>
+ title="dom-navigator-yieldForStorageUpdates">navigator.yieldForStorageUpdates()</code> method is
+ implied when this method is invoked.</p>
</dd>
<dt><var title="">result</var> = <var title="">window</var> . <code title="dom-confirm">confirm</code>(<var title="">message</var>)</dt>
<dd>
- <p>Displays a modal OK/Cancel prompt with the given message, waits
- for the user to dismiss it, and returns true if the user clicks OK
- and false if the user clicks Cancel.</p>
+ <p>Displays a modal OK/Cancel prompt with the given message, waits for the user to dismiss it,
+ and returns true if the user clicks OK and false if the user clicks Cancel.</p>
<p>A call to the <code
- title="dom-navigator-yieldForStorageUpdates">navigator.yieldForStorageUpdates()</code>
- method is implied when this method is invoked.</p>
+ title="dom-navigator-yieldForStorageUpdates">navigator.yieldForStorageUpdates()</code> method is
+ implied when this method is invoked.</p>
</dd>
<dt><var title="">result</var> = <var title="">window</var> . <code title="dom-prompt">prompt</code>(<var title="">message</var> [, <var title="">default</var>] )</dt>
<dd>
- <p>Displays a modal text field prompt with the given message,
- waits for the user to dismiss it, and returns the value that the
- user entered. If the user cancels the prompt, then returns null
- instead. If the second argument is present, then the given value
- is used as a default.</p>
+ <p>Displays a modal text field prompt with the given message, waits for the user to dismiss it,
+ and returns the value that the user entered. If the user cancels the prompt, then returns null
+ instead. If the second argument is present, then the given value is used as a default.</p>
<p>A call to the <code
- title="dom-navigator-yieldForStorageUpdates">navigator.yieldForStorageUpdates()</code>
- method is implied when this method is invoked.</p>
+ title="dom-navigator-yieldForStorageUpdates">navigator.yieldForStorageUpdates()</code> method is
+ implied when this method is invoked.</p>
</dd>
@@ -82305,8 +82248,8 @@
<p>Prompts the user to print the page.</p>
<p>A call to the <code
- title="dom-navigator-yieldForStorageUpdates">navigator.yieldForStorageUpdates()</code>
- method is implied when this method is invoked.</p>
+ title="dom-navigator-yieldForStorageUpdates">navigator.yieldForStorageUpdates()</code> method is
+ implied when this method is invoked.</p>
</dd>
@@ -82314,17 +82257,14 @@
<div class="impl">
- <p>When the <dfn title="dom-print"><code>print()</code></dfn> method
- is invoked, if the <code>Document</code> is <span>ready for
- post-load tasks</span>, then the user agent must synchronously run
- the <span>printing steps</span>. Otherwise, the user agent must only
- set the <dfn>print when loaded</dfn> flag on the
- <code>Document</code>.</p>
+ <p>When the <dfn title="dom-print"><code>print()</code></dfn> method is invoked, if the
+ <code>Document</code> is <span>ready for post-load tasks</span>, then the user agent must
+ synchronously run the <span>printing steps</span>. Otherwise, the user agent must only set the
+ <dfn>print when loaded</dfn> flag on the <code>Document</code>.</p>
<!--TOPIC:HTML-->
- <p>User agents should also run the <span>printing steps</span>
- whenever the user asks for the opportunity to <span>obtain a
- physical form</span> (e.g. printed copy), or the representation of a
+ <p>User agents should also run the <span>printing steps</span> whenever the user asks for the
+ opportunity to <span>obtain a physical form</span> (e.g. printed copy), or the representation of a
physical form (e.g. PDF copy), of a document.</p>
<p>The <dfn>printing steps</dfn> are as follows:</p>
@@ -82333,32 +82273,26 @@
<li>
- <p>The user agent may display a message to the user or
- abort these steps (or both).</p>
+ <p>The user agent may display a message to the user or abort these steps (or both).</p>
- <p class="example">For instance, a kiosk browser could silently
- ignore any invocations of the <code
- title="dom-print">print()</code> method.</p>
+ <p class="example">For instance, a kiosk browser could silently ignore any invocations of the
+ <code title="dom-print">print()</code> method.</p>
- <p class="example">For instance, a browser on a mobile device
- could detect that there are no printers in the vicinity and
- display a message saying so before continuing to offer a "save to
+ <p class="example">For instance, a browser on a mobile device could detect that there are no
+ printers in the vicinity and display a message saying so before continuing to offer a "save to
PDF" option.</p>
</li>
<li>
- <p>The user agent must <span>fire a simple event</span> named
- <code title="event-beforeprint">beforeprint</code> at the
- <code>Window</code> object of the <code>Document</code> that is
- being printed, as well as any <span title="nested browsing
+ <p>The user agent must <span>fire a simple event</span> named <code
+ title="event-beforeprint">beforeprint</code> at the <code>Window</code> object of the
+ <code>Document</code> that is being printed, as well as any <span title="nested browsing
context">nested browsing contexts</span> in it.</p>
- <p class="example">The <code
- title="event-beforeprint">beforeprint</code> event can be used
- to annotate the printed copy, for instance adding the time at
- which the document was printed.</p>
+ <p class="example">The <code title="event-beforeprint">beforeprint</code> event can be used to
+ annotate the printed copy, for instance adding the time at which the document was printed.</p>
</li>
@@ -82370,33 +82304,26 @@
<li>
- <p>The user agent should offer the user the opportunity to
- <span>obtain a physical form</span> (or the representation of a
- physical form) of the document. The user agent may wait for the
- user to either accept or decline before returning; if so, the user
- agent must <span>pause</span> while the method is waiting. Even if
- the user agent doesn't wait at this point, the user agent must use
- the state of the relevant documents as they are at this point in
- the algorithm if and when it eventually creates the alternate
- form.</p>
+ <p>The user agent should offer the user the opportunity to <span>obtain a physical form</span>
+ (or the representation of a physical form) of the document. The user agent may wait for the user
+ to either accept or decline before returning; if so, the user agent must <span>pause</span>
+ while the method is waiting. Even if the user agent doesn't wait at this point, the user agent
+ must use the state of the relevant documents as they are at this point in the algorithm if and
+ when it eventually creates the alternate form.</p>
</li>
<li>
- <p>The user agent must <span>fire a simple event</span> named
- <code title="event-afterprint">afterprint</code> at the
- <code>Window</code> object of the <code>Document</code> that is
- being printed, as well as any <span title="nested browsing
+ <p>The user agent must <span>fire a simple event</span> named <code
+ title="event-afterprint">afterprint</code> at the <code>Window</code> object of the
+ <code>Document</code> that is being printed, as well as any <span title="nested browsing
context">nested browsing contexts</span> in it.</p>
- <p class="example">The <code
- title="event-afterprint">afterprint</code> event can be used
- to revert annotations added in the earlier event, as well as
- showing post-printing UI. For instance, if a page is walking the
- user through the steps of applying for a home loan, the script
- could automatically advance to the next step after having printed
- a form or other.</p>
+ <p class="example">The <code title="event-afterprint">afterprint</code> event can be used to
+ revert annotations added in the earlier event, as well as showing post-printing UI. For
+ instance, if a page is walking the user through the steps of applying for a home loan, the
+ script could automatically advance to the next step after having printed a form or other.</p>
</li>
@@ -82495,8 +82422,8 @@
title="dom-showModalDialog">showModalDialog()</code> method was called, and that</li>
<li>have an <span>active document</span> whose <span>origin</span> is the <span title="same
- origin">same</span> as <var title="">incumbent origin</var>,</li> <!-- Note that changing document.domain to talk to another domain doesn't make you
- able to block that domain -->
+ origin">same</span> as <var title="">incumbent origin</var>,</li> <!-- Note that changing
+ document.domain to talk to another domain doesn't make you able to block that domain -->
</ul>
@@ -82733,17 +82660,14 @@
readonly attribute DOMString <span title="dom-navigator-userAgent">userAgent</span>;
};</pre>
- <p>In certain cases, despite the best efforts of the entire
- industry, Web browsers have bugs and limitations that Web authors
- are forced to work around.</p>
+ <p>In certain cases, despite the best efforts of the entire industry, Web browsers have bugs and
+ limitations that Web authors are forced to work around.</p>
- <p>This section defines a collection of attributes that can be used
- to determine, from script, the kind of user agent in use, in order
- to work around these issues.</p>
+ <p>This section defines a collection of attributes that can be used to determine, from script, the
+ kind of user agent in use, in order to work around these issues.</p>
- <p>Client detection should always be limited to detecting known
- current versions; future versions and unknown versions should always
- be assumed to be fully compliant.</p>
+ <p>Client detection should always be limited to detecting known current versions; future versions
+ and unknown versions should always be assumed to be fully compliant.</p>
<dl class="domintro">
@@ -82826,11 +82750,10 @@
</dl>
<!-- similar paragraph in next section -->
- <p class="warning">Any information in this API that varies from user
- to user can be used to profile the user. In fact, if enough such
- information is available, a user can actually be uniquely
- identified. For this reason, user agent implementors are strongly
- urged to include as little information in this API as possible.
+ <p class="warning">Any information in this API that varies from user to user can be used to
+ profile the user. In fact, if enough such information is available, a user can actually be
+ uniquely identified. For this reason, user agent implementors are strongly urged to include as
+ little information in this API as possible.
<!--INSERT FINGERPRINT-->
</p>
@@ -83503,24 +83426,22 @@
<dd>
- <p>If a script uses the <code
- title="dom-document-cookie">document.cookie</code> API, or the
- <code title="dom-localStorage">localStorage</code> API, the
- browser will block other scripts from accessing cookies or storage
- until the first script finishes.
+ <p>If a script uses the <code title="dom-document-cookie">document.cookie</code> API, or the
+ <code title="dom-localStorage">localStorage</code> API, the browser will block other scripts
+ from accessing cookies or storage until the first script finishes.
<!--END complete-->
<a href="#refsWEBSTORAGE">[WEBSTORAGE]</a>
<!--START complete-->
</p>
<p>Calling the <code
- title="dom-navigator-yieldForStorageUpdates">navigator.yieldForStorageUpdates()</code>
- method tells the user agent to unblock any other scripts that may
- be blocked, even though the script hasn't returned.</p>
+ title="dom-navigator-yieldForStorageUpdates">navigator.yieldForStorageUpdates()</code> method
+ tells the user agent to unblock any other scripts that may be blocked, even though the script
+ hasn't returned.</p>
- <p>Values of cookies and items in the <code>Storage</code> objects
- of <code title="dom-localStorage">localStorage</code> attributes
- can change after calling this method, whence its name.
+ <p>Values of cookies and items in the <code>Storage</code> objects of <code
+ title="dom-localStorage">localStorage</code> attributes can change after calling this method,
+ whence its name.
<!--END complete-->
<a href="#refsWEBSTORAGE">[WEBSTORAGE]</a>
<!--START complete-->
@@ -90697,7 +90618,7 @@
<!--BOILERPLATE middle-w3c-api-intro-->
<!--START complete-->
-<!--CLEANUP-->
+
<h4>The <code>EventSource</code> interface</h4>
<pre class="idl">[<span title="dom-EventSource">Constructor</span>(DOMString url, optional <span>EventSourceInit</span> eventSourceInitDict)]
@@ -90722,18 +90643,15 @@
boolean <dfn title="dom-EventSourceInit-withCredentials">withCredentials</dfn> = false;
};</pre>
- <p>The <dfn title="dom-EventSource"><code>EventSource()</code></dfn>
- constructor takes one or two arguments. The first specifies the
- <span>URL</span> to which to connect. The second specifies the
- settings, if any, in the form of an <code>EventSourceInit</code>
- dictionary. When the <code>EventSource()</code> constructor is
- invoked, the UA must run these steps:</p>
+ <p>The <dfn title="dom-EventSource"><code>EventSource()</code></dfn> constructor takes one or two
+ arguments. The first specifies the <span>URL</span> to which to connect. The second specifies the
+ settings, if any, in the form of an <code>EventSourceInit</code> dictionary. When the
+ <code>EventSource()</code> constructor is invoked, the UA must run these steps:</p>
<ol>
- <li><p><span title="resolve a url">Resolve</span> the
- <span>URL</span> specified in the first argument, relative to the
- <span>entry script</span>'s <span title="script's base URL">base
+ <li><p><span title="resolve a url">Resolve</span> the <span>URL</span> specified in the first
+ argument, relative to the <span>entry script</span>'s <span title="script's base URL">base
URL</span>.
<!--END complete-->
<a href="#refsHTML">[HTML]</a>
@@ -90749,37 +90667,31 @@
title="attr-crossorigin-anonymous">Anonymous</span>.</p></li>
<li><p>If the second argument is present, and the <code
- title="dom-EventSourceInit-withCredentials">withCredentials</code>
- dictionary member has the value true, then set <var title="">CORS
- mode</var> to <span title="attr-crossorigin-use-credentials">Use
- Credentials</span> and initialize the new <code>EventSource</code>
- object's <code
- title="dom-EventSource-withCredentials">withCredentials</code>
- attribute to true.</p></li>
+ title="dom-EventSourceInit-withCredentials">withCredentials</code> dictionary member has the
+ value true, then set <var title="">CORS mode</var> to <span
+ title="attr-crossorigin-use-credentials">Use Credentials</span> and initialize the new
+ <code>EventSource</code> object's <code
+ title="dom-EventSource-withCredentials">withCredentials</code> attribute to true.</p></li>
- <li><p>Return the new <code>EventSource</code> object, but continue
- these steps asynchronously.</p></li>
+ <li><p>Return the new <code>EventSource</code> object, but continue these steps
+ asynchronously.</p></li>
<li><!-- if you change this, don't forget to update the
reconnecting fetch lower down as well! -->
- <p>Do a <span>potentially CORS-enabled fetch</span><!--FETCH--> of
- the resulting <span>absolute URL</span> using the <span>entry
- script</span>'s <span title="script's referrer source">referrer
- source</span>, with the <i>mode</i> being <var title="">CORS
- mode</var>, and the <i title="">origin</i> being the <span>entry
- script</span>'s <span>origin</span><!--, and the <i>default origin
- behaviour</i> set to <i>fail</i> (though it has no effect in the
- "Anonymous" and "Use Credentials" modes)-->, and process the
- resource obtained in this fashion, if any, as described below.</p>
+ <p>Do a <span>potentially CORS-enabled fetch</span><!--FETCH--> of the resulting <span>absolute
+ URL</span> using the <span>entry script</span>'s <span title="script's referrer source">referrer
+ source</span>, with the <i>mode</i> being <var title="">CORS mode</var>, and the <i
+ title="">origin</i> being the <span>entry script</span>'s <span>origin</span><!--, and the
+ <i>default origin behaviour</i> set to <i>fail</i> (though it has no effect in the "Anonymous"
+ and "Use Credentials" modes)-->, and process the resource obtained in this fashion, if any, as
+ described below.</p>
- <p class="note">The definition of the <span
- title="fetch">fetching</span> algorithm (which is used by CORS) is
- such that if the browser is already fetching the resource
- identified by the given <span>absolute URL</span>, that connection
- can be reused, instead of a new connection being established. All
- messages received up to this point are dispatched immediately, in
- this case.</p>
+ <p class="note">The definition of the <span title="fetch">fetching</span> algorithm (which is
+ used by CORS) is such that if the browser is already fetching the resource identified by the
+ given <span>absolute URL</span>, that connection can be reused, instead of a new connection
+ being established. All messages received up to this point are dispatched immediately, in this
+ case.</p>
</li>
@@ -90787,61 +90699,50 @@
<hr>
- <p>The <dfn title="dom-EventSource-url"><code>url</code></dfn>
- attribute must return the <span>absolute URL</span> that resulted
- from <span title="resolve a url">resolving</span> the value that was
- passed to the constructor.</p> <!-- not the result of redirects,
- since that would introduce race conditions -->
+ <p>The <dfn title="dom-EventSource-url"><code>url</code></dfn> attribute must return the
+ <span>absolute URL</span> that resulted from <span title="resolve a url">resolving</span> the
+ value that was passed to the constructor.</p> <!-- not the result of redirects, since that would
+ introduce race conditions -->
- <p>The <dfn
- title="dom-EventSource-withCredentials"><code>withCredentials</code></dfn>
- attribute must return the value to which it was last initialized.
- When the object is created, it must be initialized to false.</p>
+ <p>The <dfn title="dom-EventSource-withCredentials"><code>withCredentials</code></dfn> attribute
+ must return the value to which it was last initialized. When the object is created, it must be
+ initialized to false.</p>
- <p>The <dfn
- title="dom-EventSource-readyState"><code>readyState</code></dfn>
- attribute represents the state of the connection. It can have the
- following values:</p>
+ <p>The <dfn title="dom-EventSource-readyState"><code>readyState</code></dfn> attribute represents
+ the state of the connection. It can have the following values:</p>
<dl>
<dt><dfn title="dom-EventSource-CONNECTING"><code>CONNECTING</code></dfn> (numeric value 0)</dt>
- <dd>The connection has not yet been established, or it was closed
- and the user agent is reconnecting.</dd>
+ <dd>The connection has not yet been established, or it was closed and the user agent is
+ reconnecting.</dd>
<dt><dfn title="dom-EventSource-OPEN"><code>OPEN</code></dfn> (numeric value 1)</dt>
- <dd>The user agent has an open connection and is dispatching events
- as it receives them.</dd>
+ <dd>The user agent has an open connection and is dispatching events as it receives them.</dd>
<dt><dfn title="dom-EventSource-CLOSED"><code>CLOSED</code></dfn> (numeric value 2)</dt>
- <dd>The connection is not open, and the user agent is not trying to
- reconnect. Either there was a fatal error or the <code
- title="dom-EventSource-close">close()</code> method was
- invoked.</dd>
+ <dd>The connection is not open, and the user agent is not trying to reconnect. Either there was a
+ fatal error or the <code title="dom-EventSource-close">close()</code> method was invoked.</dd>
</dl>
- <p>When the object is created its <code
- title="dom-EventSource-readyState">readyState</code> must be set to
- <code title="dom-EventSource-CONNECTING">CONNECTING</code> (0). The
- rules given below for handling the connection define when the value
- changes.</p>
+ <p>When the object is created its <code title="dom-EventSource-readyState">readyState</code> must
+ be set to <code title="dom-EventSource-CONNECTING">CONNECTING</code> (0). The rules given below
+ for handling the connection define when the value changes.</p>
- <p>The <dfn title="dom-EventSource-close"><code>close()</code></dfn>
- method must abort any instances of the <span>fetch</span> algorithm
- started for this <code>EventSource</code> object, and must set the
- <code title="dom-EventSource-readyState">readyState</code> attribute
- to <code title="dom-EventSource-CLOSED">CLOSED</code>.</p> <!-- this
- also causes all the message events to stop firing, even if they were
- queued before close() was called -->
+ <p>The <dfn title="dom-EventSource-close"><code>close()</code></dfn> method must abort any
+ instances of the <span>fetch</span> algorithm started for this <code>EventSource</code> object,
+ and must set the <code title="dom-EventSource-readyState">readyState</code> attribute to <code
+ title="dom-EventSource-CLOSED">CLOSED</code>.</p> <!-- this also causes all the message events to
+ stop firing, even if they were queued before close() was called -->
- <p>The following are the <span>event handlers</span> (and their
- corresponding <span title="event handler event type">event handler
- event types</span>) that must be supported, as <span>event handler IDL attributes</span>, by
- all objects implementing the <code>EventSource</code> interface:</p>
+ <p>The following are the <span>event handlers</span> (and their corresponding <span title="event
+ handler event type">event handler event types</span>) that must be supported, as <span>event
+ handler IDL attributes</span>, by all objects implementing the <code>EventSource</code>
+ interface:</p>
<table>
<thead>
@@ -90854,19 +90755,17 @@
<hr>
- <p>In addition to the above, each <code>EventSource</code> object
- has the following associated with it:</p>
+ <p>In addition to the above, each <code>EventSource</code> object has the following associated
+ with it:</p>
<ul>
- <li>A <dfn
- 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
+ <li>A <dfn 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>
- <li>A <dfn title="concept-event-stream-last-event-id">last event
- ID string</dfn>. This must initially be the empty string.</li>
+ <li>A <dfn title="concept-event-stream-last-event-id">last event ID string</dfn>. This must
+ initially be the empty string.</li>
</ul>
@@ -90875,45 +90774,36 @@
<h4>Processing model</h4>
- <p>The resource indicated in the argument to the <code
- title="dom-EventSource">EventSource</code> constructor is <span
- title="fetch">fetched</span> when the constructor is run.</p>
+ <p>The resource indicated in the argument to the <code title="dom-EventSource">EventSource</code>
+ constructor is <span title="fetch">fetched</span> when the constructor is run.</p>
- <p>For HTTP connections, the <code title="">Accept</code> header may
- be included; if included, it must contain only formats of event
- framing that are supported by the user agent (one of which must be
- <code>text/event-stream</code>, as described below).</p>
+ <p>For HTTP connections, the <code title="">Accept</code> header may be included; if included, it
+ must contain only formats of event framing that are supported by the user agent (one of which must
+ be <code>text/event-stream</code>, as described below).</p>
- <p>If the event source's <span
- title="concept-event-stream-last-event-id">last event ID
+ <p>If the event source's <span title="concept-event-stream-last-event-id">last event ID
string</span> is not the empty string, then a <code
- title="http-last-event-id">Last-Event-ID</code> HTTP header must be
- included with the request, whose value is the value of the event
- source's <span title="concept-event-stream-last-event-id">last event
- ID string</span>, encoded as UTF-8.</p>
+ title="http-last-event-id">Last-Event-ID</code> HTTP header must be included with the request,
+ whose value is the value of the event source's <span
+ title="concept-event-stream-last-event-id">last event ID string</span>, encoded as UTF-8.</p>
- <p>User agents should use the <code>Cache-Control: no-cache</code>
- header in requests to bypass any caches for requests of event
- sources. (This header is not a <span title="custom request
- headers">custom request header</span>, so the user agent will still
- use the CORS <span>simple cross-origin request</span> mechanism.)
- User agents should ignore HTTP cache headers in the response, never
- caching event sources.</p>
+ <p>User agents should use the <code>Cache-Control: no-cache</code> header in requests to bypass
+ any caches for requests of event sources. (This header is not a <span title="custom request
+ headers">custom request header</span>, so the user agent will still use the CORS <span>simple
+ cross-origin request</span> mechanism.) User agents should ignore HTTP cache headers in the
+ response, never caching event sources.</p>
<hr>
- <p>As data is received, the <span title="concept-task">tasks</span>
- queued by the <span>networking task source</span> to handle the data
- must act as follows.</p>
+ <p>As data is received, the <span title="concept-task">tasks</span> queued by the <span>networking
+ task source</span> to handle the data must act as follows.</p>
- <p>HTTP 200 OK responses with a <span>Content-Type</span> header
- specifying the type <code>text/event-stream</code>, ignoring any
- <span>MIME type</span> parameters, must be processed line by line <a
- href="#event-stream-interpretation">as described below</a>.</p>
+ <p>HTTP 200 OK responses with a <span>Content-Type</span> header specifying the type
+ <code>text/event-stream</code>, ignoring any <span>MIME type</span> parameters, must be processed
+ line by line <a href="#event-stream-interpretation">as described below</a>.</p>
- <p>When a successful response with a supported <span>MIME
- type</span> is received, such that the user agent begins parsing the
- contents of the stream, the user agent must <span>announce the
+ <p>When a successful response with a supported <span>MIME type</span> is received, such that the
+ user agent begins parsing the contents of the stream, the user agent must <span>announce the
connection</span>.</p>
<p>The <span title="concept-task">task</span> that the <span>networking task source</span> places
@@ -90956,22 +90846,18 @@
<hr>
- <p>When a user agent is to <dfn>announce the connection</dfn>, the
- user agent must <span>queue a task</span> which, if the <code
- title="dom-EventSource-readyState">readyState</code> attribute is
- set to a value other than <code
- title="dom-EventSource-CLOSED">CLOSED</code>, sets the <code
- title="dom-EventSource-readyState">readyState</code> attribute to
- <code title="dom-EventSource-OPEN">OPEN</code> and <span title="fire
- a simple event">fires a simple event</span> named <code
- title="event-open">open</code> at the <code>EventSource</code>
+ <p>When a user agent is to <dfn>announce the connection</dfn>, the user agent must <span>queue a
+ task</span> which, if the <code title="dom-EventSource-readyState">readyState</code> attribute is
+ set to a value other than <code title="dom-EventSource-CLOSED">CLOSED</code>, sets the <code
+ title="dom-EventSource-readyState">readyState</code> attribute to <code
+ title="dom-EventSource-OPEN">OPEN</code> and <span title="fire a simple event">fires a simple
+ event</span> named <code title="event-open">open</code> at the <code>EventSource</code>
object.</p>
- <p>When a user agent is to <dfn>reestablish the connection</dfn>,
- the user agent must run the following steps. These steps are run
- asynchronously, not as part of a <span
- title="concept-task">task</span>. (The tasks that it queues, of
- course, are run like normal tasks and not asynchronously.)</p>
+ <p>When a user agent is to <dfn>reestablish the connection</dfn>, the user agent must run the
+ following steps. These steps are run asynchronously, not as part of a <span
+ title="concept-task">task</span>. (The tasks that it queues, of course, are run like normal tasks
+ and not asynchronously.)</p>
<ol>
@@ -90981,26 +90867,20 @@
<ol>
- <li><p>If the <code
- title="dom-EventSource-readyState">readyState</code> attribute is
- set to <code title="dom-EventSource-CLOSED">CLOSED</code>, abort
- the task.</p></li>
+ <li><p>If the <code title="dom-EventSource-readyState">readyState</code> attribute is set to
+ <code title="dom-EventSource-CLOSED">CLOSED</code>, abort the task.</p></li>
- <li><p>Set the <code
- title="dom-EventSource-readyState">readyState</code> attribute to
- <code
+ <li><p>Set the <code title="dom-EventSource-readyState">readyState</code> attribute to <code
title="dom-EventSource-CONNECTING">CONNECTING</code>.</p></li>
- <li><p><span>Fire a simple event</span> named <code
- title="event-error">error</code> at the <code>EventSource</code>
- object.</p></li>
+ <li><p><span>Fire a simple event</span> named <code title="event-error">error</code> at the
+ <code>EventSource</code> object.</p></li>
</ol>
</li>
- <li><p>Wait a delay equal to the reconnection time of the event
- source.</li>
+ <li><p>Wait a delay equal to the reconnection time of the event source.</li>
<li><p>Optionally, wait some more. In particular, if the previous attempt failed, then user
agents might introduce an exponential backoff delay to avoid overloading a potentially already
@@ -91008,8 +90888,7 @@
connectivity, user agents might wait for the operating system to announce that the network
connection has returned before retrying.</li>
- <li><p>Wait until the aforementioned task has run, if it has not
- yet run.</p></li>
+ <li><p>Wait until the aforementioned task has run, if it has not yet run.</p></li>
<li>
@@ -91017,21 +90896,15 @@
<ol>
- <li><p>If the <code
- title="dom-EventSource-readyState">readyState</code> attribute is
- not set to <code
- title="dom-EventSource-CONNECTING">CONNECTING</code>, abort these
- steps.</p></li>
+ <li><p>If the <code title="dom-EventSource-readyState">readyState</code> attribute is not set
+ to <code title="dom-EventSource-CONNECTING">CONNECTING</code>, abort these steps.</p></li>
- <li><p>Perform a <span>potentially CORS-enabled
- fetch</span><!--FETCH--> of the <span>absolute URL</span> of the
- event source resource, using the same <i>referrer source</i>, and
- with the same <i>mode</i><!--, <i>default origin
- behaviour</i>,--> and <i title="">origin</i>, as those used in
- the original request triggered by the <code
- title="dom-EventSource">EventSource()</code> constructor, and
- process the resource obtained in this fashion, if any, as
- described earlier in this section.</p></li>
+ <li><p>Perform a <span>potentially CORS-enabled fetch</span><!--FETCH--> of the <span>absolute
+ URL</span> of the event source resource, using the same <i>referrer source</i>, and with the
+ same <i>mode</i><!--, <i>default origin behaviour</i>,--> and <i title="">origin</i>, as those
+ used in the original request triggered by the <code
+ title="dom-EventSource">EventSource()</code> constructor, and process the resource obtained in
+ this fashion, if any, as described earlier in this section.</p></li>
</ol>
@@ -91145,52 +91018,46 @@
<dd>
- <p><a href="#processField">Process the field</a> using the steps
- described below, using the whole line as the field name, and
- the empty string as the field value.</p>
+ <p><a href="#processField">Process the field</a> using the steps described below, using the
+ whole line as the field name, and the empty string as the field value.</p>
</dd>
</dl>
- <p>Once the end of the file is reached, any pending data must be
- discarded. (If the file ends in the middle of an event, before the
- final empty line, the incomplete event is not dispatched.)</p>
+ <p>Once the end of the file is reached, any pending data must be discarded. (If the file ends in
+ the middle of an event, before the final empty line, the incomplete event is not dispatched.)</p>
<hr>
- <p id="processField">The steps to <dfn title="">process the
- field</dfn> given a field name and a field value depend on the field
- name, as given in the following list. Field names must be compared
+ <p id="processField">The steps to <dfn title="">process the field</dfn> given a field name and a
+ field value depend on the field 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>
- <dd><p>Set the <var title="">event type</var> buffer to field
- value.</p></dd>
+ <dd><p>Set the <var title="">event type</var> buffer to field value.</p></dd>
<dt>If the field name is "data"</dt>
- <dd><p>Append the field value to the <var title="">data</var>
- buffer, then append a single U+000A LINE FEED (LF) character to the
- <var title="">data</var> buffer.</p></dd>
+ <dd><p>Append the field value to the <var title="">data</var> buffer, then append a single U+000A
+ LINE FEED (LF) character to the <var title="">data</var> buffer.</p></dd>
<dt>If the field name is "id"</dt>
- <dd><p>Set the <var title="">last event ID</var> buffer to the
- field value.</p></dd>
+ <dd><p>Set the <var title="">last event ID</var> buffer to the field value.</p></dd>
<dt>If the field name is "retry"</dt>
- <dd><p>If the field value consists of only <span>ASCII digits</span>, then interpret the
- field value as an integer in base ten, and set the event stream's
- <span title="concept-event-stream-reconnection-time">reconnection
- time</span> to that integer. Otherwise, ignore the field.</p></dd>
+ <dd><p>If the field value consists of only <span>ASCII digits</span>, then interpret the field
+ value as an integer in base ten, and set the event stream's <span
+ title="concept-event-stream-reconnection-time">reconnection time</span> to that integer.
+ Otherwise, ignore the field.</p></dd>
<!-- v2 feature request from Per-Erik Brodin:
> > > Finally, it could be useful to be able to reset the reconnection
@@ -91212,11 +91079,10 @@
<dt>If the field name is "reconnect"</dt>
- <dd><p>If the field value is the empty string, then: <a
- href="#dispatchMessage">dispatch the event</a> as defined below,
- and then drop the connection and immediately reconnect as if the
- <span title="concept-event-stream-reconnection-time">reconnection
- time</span> was zero for this one time.</p></dd>
+ <dd><p>If the field value is the empty string, then: <a href="#dispatchMessage">dispatch the
+ event</a> as defined below, and then drop the connection and immediately reconnect as if the
+ <span title="concept-event-stream-reconnection-time">reconnection time</span> was zero for this
+ one time.</p></dd>
-->
@@ -91227,28 +91093,23 @@
</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:
+ <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>Set the <span
- title="concept-event-stream-last-event-id">last event ID
- string</span> of the event source to the value of the <var
- title="">last event ID</var> buffer. The buffer does not get reset,
- so the <span title="concept-event-stream-last-event-id">last event
- ID string</span> of the event source remains set to this value
- until the next time it is set by the server.</p></li>
+ <li><p>Set the <span title="concept-event-stream-last-event-id">last event ID string</span> of
+ the event source to the value of the <var title="">last event ID</var> buffer. The buffer does
+ not get reset, so the <span title="concept-event-stream-last-event-id">last event ID
+ string</span> of the event source remains set to this value until the next time it is set by the
+ server.</p></li>
- <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
- type</var> buffer to the empty string and abort these
- steps.</p></li>
+ <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 type</var> buffer to the empty string and
+ abort these steps.</p></li>
- <li><p>If the <var title="">data</var> buffer's last character is a
- U+000A LINE FEED (LF) character, then remove the last character
- from the <var title="">data</var> buffer.</p></li>
+ <li><p>If the <var title="">data</var> buffer's last character is a U+000A LINE FEED (LF)
+ character, then remove the last character from the <var title="">data</var> buffer.</p></li>
<li><p>Create an event that uses the <code>MessageEvent</code> interface, with the event type
<code title="event-message">message</code>, which does not bubble, is not cancelable, and has no
@@ -91261,14 +91122,12 @@
<span title="concept-event-stream-last-event-id">last event ID string</span> of the event source.
This event is not <span title="concept-events-trusted">trusted</span>.</p></li>
- <li><p>If the <var title="">event type</var> buffer has a value
- other than the empty string, change the <span
- title="concept-event-type">type</span> of the newly created event
- to equal the value of the <var title="">event type</var>
- buffer.</p></li>
+ <li><p>If the <var title="">event type</var> buffer has a value other than the empty string,
+ change the <span title="concept-event-type">type</span> of the newly created event to equal the
+ value of the <var title="">event type</var> buffer.</p></li>
- <li><p>Set the <var title="">data</var> buffer and the <var
- title="">event type</var> buffer to the empty string.</p></li>
+ <li><p>Set the <var title="">data</var> buffer and the <var title="">event type</var> buffer to
+ the empty string.</p></li>
<li><p><span>Queue a task</span> which, if the <code
title="dom-EventSource-readyState">readyState</code> attribute is set to a value other than <code
@@ -91280,12 +91139,10 @@
</ol>
- <p class="note">If an event doesn't have an "id" field, but an
- earlier event did set the event source's <span
- title="concept-event-stream-last-event-id">last event ID
- string</span>, then the event's <code
- title="dom-MessageEvent-lastEventId">lastEventId</code> field will
- be set to the value of whatever the last seen "id" field was.</p>
+ <p class="note">If an event doesn't have an "id" field, but an earlier event did set the event
+ source's <span title="concept-event-stream-last-event-id">last event ID string</span>, then the
+ event's <code title="dom-MessageEvent-lastEventId">lastEventId</code> field will be set to the
+ value of whatever the last seen "id" field was.</p>
<div class="example">
@@ -91295,13 +91152,10 @@
data: +2
data: 10</pre>
- <p>...would cause an event <code
- title="event-message">message</code> with the interface
- <code>MessageEvent</code> to be dispatched on the
- <code>EventSource</code> object. The event's <code
- title="dom-MessageEvent-data">data</code> attribute would contain
- the string <code>YHOO\n+2\n10</code> (where <code>\n</code>
- represents a newline).</p>
+ <p>...would cause an event <code title="event-message">message</code> with the interface
+ <code>MessageEvent</code> to be dispatched on the <code>EventSource</code> object. The event's
+ <code title="dom-MessageEvent-data">data</code> attribute would contain the string
+ <code>YHOO\n+2\n10</code> (where <code>\n</code> represents a newline).</p>
<p>This could be used as follows:
<pre>var stocks = new EventSource("http://stocks.example.com/ticker.php");
@@ -91320,22 +91174,17 @@
<div class="example">
- <p>The following stream contains four blocks. The first block has
- just a comment, and will fire nothing. The second block has two
- fields with names "data" and "id" respectively; an event will be
- fired for this block, with the data "first event", and will then
- set the last event ID to "1" so that if the connection died between
- this block and the next, the server would be sent a <code
- title="http-last-event-id">Last-Event-ID</code> header with the
- value "1". The third block fires an event with data "second event",
- and also has an "id" field, this time with no value, which resets
- the last event ID to the empty string (meaning no <code
- title="http-last-event-id">Last-Event-ID</code> header will now be
- sent in the event of a reconnection being attempted). Finally, the
- last block just fires an event with the data
- " third event" (with a single leading space character).
- Note that the last still has to end with a blank line, the end of
- the stream is not enough to trigger the dispatch of the last
+ <p>The following stream contains four blocks. The first block has just a comment, and will fire
+ nothing. The second block has two fields with names "data" and "id" respectively; an event will
+ be fired for this block, with the data "first event", and will then set the last event ID to "1"
+ so that if the connection died between this block and the next, the server would be sent a <code
+ title="http-last-event-id">Last-Event-ID</code> header with the value "1". The third block fires
+ an event with data "second event", and also has an "id" field, this time with no value, which
+ resets the last event ID to the empty string (meaning no <code
+ title="http-last-event-id">Last-Event-ID</code> header will now be sent in the event of a
+ reconnection being attempted). Finally, the last block just fires an event with the data
+ " third event" (with a single leading space character). Note that the last still has to
+ end with a blank line, the end of the stream is not enough to trigger the dispatch of the last
event.</p>
<pre>: test stream
@@ -91361,11 +91210,9 @@
data:</pre>
- <p>The first block fires events with the data set to the empty
- string, as would the last block if it was followed by a blank line.
- The middle block fires an event with the data set to a single
- newline character. The last block is discarded because it is not
- followed by a blank line.</p>
+ <p>The first block fires events with the data set to the empty string, as would the last block if
+ it was followed by a blank line. The middle block fires an event with the data set to a single
+ newline character. The last block is discarded because it is not followed by a blank line.</p>
</div>
@@ -91378,164 +91225,131 @@
data: test
</pre>
- <p>This is because the space after the colon is ignored if
- present.</p>
+ <p>This is because the space after the colon is ignored if present.</p>
</div>
<H4>Authoring notes</h4>
- <p>Legacy proxy servers are known to, in certain cases, drop HTTP
- connections after a short timeout. To protect against such proxy
- servers, authors can include a comment line (one starting with a ':'
- character) every 15 seconds or so.</p>
+ <p>Legacy proxy servers are known to, in certain cases, drop HTTP connections after a short
+ timeout. To protect against such proxy servers, authors can include a comment line (one starting
+ with a ':' character) every 15 seconds or so.</p>
- <p>Authors wishing to relate event source connections to each other
- or to specific documents previously served might find that relying
- on IP addresses doesn't work, as individual clients can have
- multiple IP addresses (due to having multiple proxy servers) and
- individual IP addresses can have multiple clients (due to sharing a
- proxy server). It is better to include a unique identifier in the
- document when it is served and then pass that identifier as part of
- the URL when the connection is established.</p>
+ <p>Authors wishing to relate event source connections to each other or to specific documents
+ previously served might find that relying on IP addresses doesn't work, as individual clients can
+ have multiple IP addresses (due to having multiple proxy servers) and individual IP addresses can
+ have multiple clients (due to sharing a proxy server). It is better to include a unique identifier
+ in the document when it is served and then pass that identifier as part of the URL when the
+ connection is established.</p>
- <p>Authors are also cautioned that HTTP chunking can have unexpected
- negative effects on the reliability of this protocol. Where
- possible, chunking should be disabled for serving event streams
- unless the rate of messages is high enough for this not to
- matter.</p> <!-- v2 can we get a better solution? -->
+ <p>Authors are also cautioned that HTTP chunking can have unexpected negative effects on the
+ reliability of this protocol. Where possible, chunking should be disabled for serving event
+ streams unless the rate of messages is high enough for this not to matter.</p> <!-- v2 can we get
+ a better solution? -->
- <p>Clients that support HTTP's per-server connection limitation
- might run into trouble when opening multiple pages from a site if
- each page has an <code>EventSource</code> to the same
- domain. Authors can avoid this using the relatively complex
- mechanism of using unique domain names per connection, or by
- allowing the user to enable or disable the <code>EventSource</code>
- functionality on a per-page basis, or by sharing a single
- <code>EventSource</code> object using a <span
- title="SharedWorkerGlobalScope">shared worker</span>.
- <!--END complete-->
- <a href="#refsWEBWORKERS">[WEBWORKERS]</a>
- <!--START complete-->
- </p>
+ <p>Clients that support HTTP's per-server connection limitation might run into trouble when
+ opening multiple pages from a site if each page has an <code>EventSource</code> to the same
+ domain. Authors can avoid this using the relatively complex mechanism of using unique domain names
+ per connection, or by allowing the user to enable or disable the <code>EventSource</code>
+ functionality on a per-page basis, or by sharing a single <code>EventSource</code> object using a
+ <span title="SharedWorkerGlobalScope">shared worker</span>. <!--END complete--> <a
+ href="#refsWEBWORKERS">[WEBWORKERS]</a> <!--START complete--> </p>
<h4 id="eventsource-push">Connectionless push and other features</h4>
- <p>User agents running in controlled environments, e.g. browsers on
- mobile handsets tied to specific carriers, may offload the
- management of the connection to a proxy on the network. In such a
- situation, the user agent for the purposes of conformance is
- considered to include both the handset software and the network
- proxy.</p>
+ <p>User agents running in controlled environments, e.g. browsers on mobile handsets tied to
+ specific carriers, may offload the management of the connection to a proxy on the network. In such
+ a situation, the user agent for the purposes of conformance is considered to include both the
+ handset software and the network proxy.</p>
<div class="example">
- <p>For example, a browser on a mobile device, after having
- established a connection, might detect that it is on a supporting
- network and request that a proxy server on the network take over
- the management of the connection. The timeline for such a situation
- might be as follows:</p>
+ <p>For example, a browser on a mobile device, after having established a connection, might detect
+ that it is on a supporting network and request that a proxy server on the network take over the
+ management of the connection. The timeline for such a situation might be as follows:</p>
<ol>
- <li>Browser connects to a remote HTTP server and requests the
- resource specified by the author in the <code
- title="dom-EventSource">EventSource</code> constructor.</li>
+ <li>Browser connects to a remote HTTP server and requests the resource specified by the author
+ in the <code title="dom-EventSource">EventSource</code> constructor.</li>
<li>The server sends occasional messages.</li>
- <li>In between two messages, the browser detects that it is idle
- except for the network activity involved in keeping the TCP
- connection alive, and decides to switch to sleep mode to save power.</li>
+ <li>In between two messages, the browser detects that it is idle except for the network activity
+ involved in keeping the TCP connection alive, and decides to switch to sleep mode to save
+ power.</li>
<li>The browser disconnects from the server.</li>
- <li>The browser contacts a service on the network, and requests
- that that service, a "push proxy", maintain the connection instead.</li>
+ <li>The browser contacts a service on the network, and requests that that service, a "push
+ proxy", maintain the connection instead.</li>
- <li>The "push proxy" service contacts the remote HTTP server and
- requests the resource specified by the author in the <code
- title="dom-EventSource">EventSource</code> constructor (possibly
- including a <code title="http-last-event-id">Last-Event-ID</code>
- HTTP header, etc).</li>
+ <li>The "push proxy" service contacts the remote HTTP server and requests the resource specified
+ by the author in the <code title="dom-EventSource">EventSource</code> constructor (possibly
+ including a <code title="http-last-event-id">Last-Event-ID</code> HTTP header, etc).</li>
<li>The browser allows the mobile device to go to sleep.</li>
<li>The server sends another message.</li>
- <li>The "push proxy" service uses a technology such as OMA push to
- convey the event to the mobile device, which wakes only
- enough to process the event and then returns to sleep.</li>
+ <li>The "push proxy" service uses a technology such as OMA push to convey the event to the
+ mobile device, which wakes only enough to process the event and then returns to sleep.</li>
</ol>
</div>
- <p>This can reduce the total data usage, and can therefore result in
- considerable power savings.</p>
+ <p>This can reduce the total data usage, and can therefore result in considerable power
+ savings.</p>
- <p>As well as implementing the existing API and
- <code>text/event-stream</code> wire format as defined by this
- specification and in more distributed ways as described above,
- formats of event framing defined by <span>other applicable
- specifications</span> may be supported. This specification does not
- define how they are to be parsed or processed.</p>
+ <p>As well as implementing the existing API and <code>text/event-stream</code> wire format as
+ defined by this specification and in more distributed ways as described above, formats of event
+ framing defined by <span>other applicable specifications</span> may be supported. This
+ specification does not define how they are to be parsed or processed.</p>
<h4>Garbage collection</h4>
<p>While an <code>EventSource</code> object's <code
title="dom-EventSource-readyState">readyState</code> is <code
- title="dom-EventSource-CONNECTING">CONNECTING</code>, and the object
- has one or more event listeners registered for <code
- title="event-open">open</code>, <code
- title="event-message">message</code> or <code
- title="event-error">error</code> events, there must be a strong
- reference from the <code>Window</code> or <code>WorkerGlobalScope</code>
- object that the <code>EventSource</code> object's constructor was
- invoked from to the <code>EventSource</code> object itself.</p>
+ title="dom-EventSource-CONNECTING">CONNECTING</code>, and the object has one or more event
+ listeners registered for <code title="event-open">open</code>, <code
+ title="event-message">message</code> or <code title="event-error">error</code> events, there must
+ be a strong reference from the <code>Window</code> or <code>WorkerGlobalScope</code> object that
+ the <code>EventSource</code> object's constructor was invoked from to the <code>EventSource</code>
+ object itself.</p>
<p>While an <code>EventSource</code> object's <code
title="dom-EventSource-readyState">readyState</code> is <code
- title="dom-EventSource-OPEN">OPEN</code>, and the object has one or
- more event listeners registered for <code
- title="event-message">message</code> or <code
- title="event-error">error</code> events, there must be a strong
- reference from the <code>Window</code> or <code>WorkerGlobalScope</code>
- object that the <code>EventSource</code> object's constructor was
- invoked from to the <code>EventSource</code> object itself.</p>
+ title="dom-EventSource-OPEN">OPEN</code>, and the object has one or more event listeners
+ registered for <code title="event-message">message</code> or <code
+ title="event-error">error</code> events, there must be a strong reference from the
+ <code>Window</code> or <code>WorkerGlobalScope</code> object that the <code>EventSource</code>
+ object's constructor was invoked from to the <code>EventSource</code> object itself.</p>
- <p>While there is a task queued by an <code>EventSource</code>
- object on the <span>remote event task source</span>, there must be a
- strong reference from the <code>Window</code> or
- <code>WorkerGlobalScope</code> object that the <code>EventSource</code>
- object's constructor was invoked from to that
- <code>EventSource</code> object.</p>
+ <p>While there is a task queued by an <code>EventSource</code> object on the <span>remote event
+ task source</span>, there must be a strong reference from the <code>Window</code> or
+ <code>WorkerGlobalScope</code> object that the <code>EventSource</code> object's constructor was
+ invoked from to that <code>EventSource</code> object.</p>
- <p>If a user agent is to <dfn
- title="concept-EventSource-forcibly-close">forcibly close</dfn> an
- <code>EventSource</code> object (this happens when a
- <code>Document</code> object goes away permanently), the user agent
- must abort any instances of the <span>fetch</span> algorithm started
+ <p>If a user agent is to <dfn title="concept-EventSource-forcibly-close">forcibly close</dfn> an
+ <code>EventSource</code> object (this happens when a <code>Document</code> object goes away
+ permanently), the user agent must abort any instances of the <span>fetch</span> algorithm started
for this <code>EventSource</code> object, and must set the <code
- title="dom-EventSource-readyState">readyState</code> attribute to
- <code title="dom-EventSource-CLOSED">CLOSED</code>.</p> <!-- same as
- calling close() -->
+ title="dom-EventSource-readyState">readyState</code> attribute to <code
+ title="dom-EventSource-CLOSED">CLOSED</code>.</p> <!-- same as calling close() -->
- <p>If an <code>EventSource</code> object is garbage collected while
- its connection is still open, the user agent must abort any instance
- of the <span title="fetch">fetch</span> algorithm opened by this
- <code>EventSource</code>.</p> <!-- no need to throw tasks away or
- anything; for it to get garbage collected, there can't be anything
- that would be able to receive those events -->
+ <p>If an <code>EventSource</code> object is garbage collected while its connection is still open,
+ the user agent must abort any instance of the <span title="fetch">fetch</span> algorithm opened by
+ this <code>EventSource</code>.</p> <!-- no need to throw tasks away or anything; for it to get
+ garbage collected, there can't be anything that would be able to receive those events -->
- <p class="note">It's possible for one active network connection to
- be shared by multiple <code>EventSource</code> objects and their
- <span>fetch</span> algorithms, which is why the above is phrased in
- terms of aborting the <span>fetch</span> algorithm and not the
- actual underlying download.</p>
+ <p class="note">It's possible for one active network connection to be shared by multiple
+ <code>EventSource</code> objects and their <span>fetch</span> algorithms, which is why the above
+ is phrased in terms of aborting the <span>fetch</span> algorithm and not the actual underlying
+ download.</p>
<h4>Implementation advice</h4>
@@ -91561,8 +91375,8 @@
<h5><dfn><code>text/event-stream</code></dfn></h5>
- <p>This registration is for community review and will be submitted
- to the IESG for review, approval, and registration with IANA.</p>
+ <p>This registration is for community review and will be submitted to the IESG for review,
+ approval, and registration with IANA.</p>
<!--
To: ietf-types at iana.org
@@ -91582,9 +91396,8 @@
<dt><code title="">charset</code></dt>
<dd>
- <p>The <code title="">charset</code> parameter may be provided.
- The parameter's value must be "<code title="">utf-8</code>".
- This parameter serves no purpose; it is only allowed for
+ <p>The <code title="">charset</code> parameter may be provided. The parameter's value must be
+ "<code title="">utf-8</code>". This parameter serves no purpose; it is only allowed for
compatibility with legacy servers.</p>
</dd>
@@ -91596,20 +91409,17 @@
<dt>Security considerations:</dt>
<dd>
- <p>An event stream from an origin distinct from the origin of the
- content consuming the event stream can result in information
- leakage. To avoid this, user agents are required to apply CORS
+ <p>An event stream from an origin distinct from the origin of the content consuming the event
+ stream can result in information leakage. To avoid this, user agents are required to apply CORS
semantics. <a href="#refsCORS">[CORS]</a></p>
- <p>Event streams can overwhelm a user agent; a user agent is
- expected to apply suitable restrictions to avoid depleting local
- resources because of an overabundance of information from an event
- stream.</p>
+ <p>Event streams can overwhelm a user agent; a user agent is expected to apply suitable
+ restrictions to avoid depleting local resources because of an overabundance of information from
+ an event stream.</p>
- <p>Servers can be overwhelmed if a situation develops in which the
- server is causing clients to reconnect rapidly. Servers should use
- a 5xx status code to indicate capacity problems, as this will
- prevent conforming clients from reconnecting automatically.</p>
+ <p>Servers can be overwhelmed if a situation develops in which the server is causing clients to
+ reconnect rapidly. Servers should use a 5xx status code to indicate capacity problems, as this
+ will prevent conforming clients from reconnecting automatically.</p>
</dd>
<!--REMOVE-TOPIC:Security-->
@@ -101876,31 +101686,26 @@
</dd>
- <dt>A start tag whose tag name is one of: "applet",
- "marquee", "object"</dt>
+ <dt>A start tag whose tag name is one of: "applet", "marquee", "object"</dt>
<dd>
- <p><span>Reconstruct the active formatting elements</span>, if
- any.</p>
+ <p><span>Reconstruct the active formatting elements</span>, if any.</p>
<p><span>Insert an HTML element</span> for the token.</p>
- <p>Insert a marker at the end of the <span>list of active
- formatting elements</span>.</p>
+ <p>Insert a marker at the end of the <span>list of active formatting elements</span>.</p>
<p>Set the <span>frameset-ok flag</span> to "not ok".</p>
</dd>
- <dt>An end tag token whose tag name is one of: "applet",
- "marquee", "object"</dt>
+ <dt>An end tag token whose tag name is one of: "applet", "marquee", "object"</dt>
<dd>
- <p>If the <span>stack of open elements</span> does not <span
- title="has an element in scope">have an element in scope</span>
- that is an <span title="HTML elements">HTML element</span> and
- with the same tag name as that of the token, then this is a
- <span>parse error</span>; ignore the token.</p>
+ <p>If the <span>stack of open elements</span> does not <span title="has an element in
+ scope">have an element in scope</span> that is an <span title="HTML elements">HTML
+ element</span> and with the same tag name as that of the token, then this is a <span>parse
+ error</span>; ignore the token.</p>
<p>Otherwise, run these steps:</p>
@@ -101908,16 +101713,15 @@
<li><p><span>Generate implied end tags</span>.</p></li>
- <li><p>If the <span>current node</span> is not an <span title="HTML elements">HTML element</span> with
- the same tag name as that of the token, then this is a
- <span>parse error</span>.</p></li>
+ <li><p>If the <span>current node</span> is not an <span title="HTML elements">HTML
+ element</span> with the same tag name as that of the token, then this is a <span>parse
+ error</span>.</p></li>
- <li><p>Pop elements from the <span>stack of open elements</span>
- until an <span title="HTML elements">HTML element</span> with the same tag name as the token has been
- popped from the stack.</p></li>
+ <li><p>Pop elements from the <span>stack of open elements</span> until an <span title="HTML
+ elements">HTML element</span> with the same tag name as the token has been popped from the
+ stack.</p></li>
- <li><span>Clear the list of active formatting elements up to the
- last marker</span>.</li>
+ <li><span>Clear the list of active formatting elements up to the last marker</span>.</li>
</ol>
@@ -101926,21 +101730,19 @@
<dt>A start tag whose tag name is "table"</dt>
<dd>
- <p>If the <code>Document</code> is <em>not</em> set to
- <span>quirks mode</span>, and the <span>stack of open
- elements</span> <span title="has an element in button scope">has a
- <code>p</code> element in button scope</span>, then <span>close a
- <code>p</code> element</span>.</p> <!-- i hate
- myself (this quirk was basically caused by acid2; if i'd realised
- we could change the specs when i wrote acid2, we could have
- avoided having any parsing-mode quirks) -Hixie -->
+ <p>If the <code>Document</code> is <em>not</em> set to <span>quirks mode</span>, and the
+ <span>stack of open elements</span> <span title="has an element in button scope">has a
+ <code>p</code> element in button scope</span>, then <span>close a <code>p</code>
+ element</span>.</p> <!-- i hate myself (this quirk was basically caused by acid2; if i'd
+ realised we could change the specs when i wrote acid2, we could have avoided having any
+ parsing-mode quirks) -Hixie -->
<p><span>Insert an HTML element</span> for the token.</p>
<p>Set the <span>frameset-ok flag</span> to "not ok".</p>
- <p>Switch the <span>insertion mode</span> to "<span
- title="insertion mode: in table">in table</span>".</p>
+ <p>Switch the <span>insertion mode</span> to "<span title="insertion mode: in table">in
+ table</span>".</p>
</dd>
@@ -101958,15 +101760,13 @@
"img", "keygen", "wbr"</dt>
<dd>
- <p><span>Reconstruct the active formatting elements</span>, if
- any.</p>
+ <p><span>Reconstruct the active formatting elements</span>, if any.</p>
- <p><span>Insert an HTML element</span> for the token. Immediately
- pop the <span>current node</span> off the <span>stack of open
- elements</span>.</p>
+ <p><span>Insert an HTML element</span> for the token. Immediately pop the <span>current
+ node</span> off the <span>stack of open elements</span>.</p>
- <p><span title="acknowledge self-closing flag">Acknowledge the
- token's <i>self-closing flag</i></span>, if it is set.</p>
+ <p><span title="acknowledge self-closing flag">Acknowledge the token's <i>self-closing
+ flag</i></span>, if it is set.</p>
<p>Set the <span>frameset-ok flag</span> to "not ok".</p>
<!-- shouldn't really do this for <area> -->
@@ -101976,49 +101776,43 @@
<dt>A start tag whose tag name is "input"</dt>
<dd>
- <p><span>Reconstruct the active formatting elements</span>, if
- any.</p>
+ <p><span>Reconstruct the active formatting elements</span>, if any.</p>
- <p><span>Insert an HTML element</span> for the token. Immediately
- pop the <span>current node</span> off the <span>stack of open
- elements</span>.</p>
+ <p><span>Insert an HTML element</span> for the token. Immediately pop the <span>current
+ node</span> off the <span>stack of open elements</span>.</p>
- <p><span title="acknowledge self-closing flag">Acknowledge the
- token's <i>self-closing flag</i></span>, if it is set.</p>
+ <p><span title="acknowledge self-closing flag">Acknowledge the token's <i>self-closing
+ flag</i></span>, if it is set.</p>
- <p>If the token does not have an attribute with the name "type",
- or if it does, but that attribute's value is not an <span>ASCII
- case-insensitive</span> match for the string "<code
- title="">hidden</code>", then: set the <span>frameset-ok
- flag</span> to "not ok".</p>
+ <p>If the token does not have an attribute with the name "type", or if it does, but that
+ attribute's value is not an <span>ASCII case-insensitive</span> match for the string "<code
+ title="">hidden</code>", then: set the <span>frameset-ok flag</span> to "not ok".</p>
</dd>
<dt>A start tag whose tag name is one of: "menuitem", "param", "source", "track"</dt>
<dd>
- <p><span>Insert an HTML element</span> for the token. Immediately
- pop the <span>current node</span> off the <span>stack of open
- elements</span>.</p>
+ <p><span>Insert an HTML element</span> for the token. Immediately pop the <span>current
+ node</span> off the <span>stack of open elements</span>.</p>
- <p><span title="acknowledge self-closing flag">Acknowledge the
- token's <i>self-closing flag</i></span>, if it is set.</p>
+ <p><span title="acknowledge self-closing flag">Acknowledge the token's <i>self-closing
+ flag</i></span>, if it is set.</p>
</dd>
<dt>A start tag whose tag name is "hr"</dt>
<dd>
- <p>If the <span>stack of open elements</span> <span title="has
- an element in button scope">has a <code>p</code> element in button
- scope</span>, then <span>close a <code>p</code> element</span>.</p>
+ <p>If the <span>stack of open elements</span> <span title="has an element in button scope">has a
+ <code>p</code> element in button scope</span>, then <span>close a <code>p</code>
+ element</span>.</p>
- <p><span>Insert an HTML element</span> for the token. Immediately
- pop the <span>current node</span> off the <span>stack of open
- elements</span>.</p>
+ <p><span>Insert an HTML element</span> for the token. Immediately pop the <span>current
+ node</span> off the <span>stack of open elements</span>.</p>
- <p><span title="acknowledge self-closing flag">Acknowledge the
- token's <i>self-closing flag</i></span>, if it is set.</p>
+ <p><span title="acknowledge self-closing flag">Acknowledge the token's <i>self-closing
+ flag</i></span>, if it is set.</p>
<p>Set the <span>frameset-ok flag</span> to "not ok".</p>
@@ -102026,10 +101820,9 @@
<dt>A start tag whose tag name is "image"</dt>
<dd>
- <p><span>Parse error</span>. Change the token's tag name
- to "img" and reprocess it. (Don't ask.)</p> <!-- As of
- 2005-12, studies showed that around 0.2% of pages used the
- <image> element. -->
+ <!-- As of 2005-12, studies showed that around 0.2% of pages used the <image> element. -->
+ <p><span>Parse error</span>. Change the token's tag name to "img" and reprocess it. (Don't
+ ask.)</p>
</dd>
<dt id="isindex">A start tag whose tag name is "isindex"</dt>
@@ -102037,32 +101830,29 @@
<p><span>Parse error</span>.</p>
- <p>If the <span><code title="">form</code> element
- pointer</span> is not null, then ignore the token.</p>
+ <p>If the <span><code title="">form</code> element pointer</span> is not null, then ignore the
+ token.</p>
<p>Otherwise:</p>
- <p><span title="acknowledge self-closing flag">Acknowledge the
- token's <i>self-closing flag</i></span>, if it is set.</p> <!--
- purely to reduce the number of errors (we don't care if they
- included the /, they're not supposed to be including the tag at
- all! -->
+ <p><span title="acknowledge self-closing flag">Acknowledge the token's <i>self-closing
+ flag</i></span>, if it is set.</p> <!-- purely to reduce the number of errors (we don't care if
+ they included the /, they're not supposed to be including the tag at all! -->
<p>Set the <span>frameset-ok flag</span> to "not ok".</p>
<!-- fake <form> -->
- <p>If the <span>stack of open elements</span> <span title="has
- an element in button scope">has a <code>p</code> element in button
- scope</span>, then <span>close a <code>p</code> element</span>.</p>
+ <p>If the <span>stack of open elements</span> <span title="has an element in button scope">has a
+ <code>p</code> element in button scope</span>, then <span>close a <code>p</code>
+ element</span>.</p>
- <p><span>Insert an HTML element</span> for a "form" start tag token with no attributes, and set the
- <span><code title="form">form</code> element pointer</span> to
- point to the element created.</p>
+ <p><span>Insert an HTML element</span> for a "form" start tag token with no attributes, and set
+ the <span><code title="form">form</code> element pointer</span> to point to the element
+ created.</p>
- <p>If the token has an attribute called "action", set the
- <code title="attr-fs-action">action</code> attribute on the
- resulting <code>form</code> element to the value of the
- "action" attribute of the token.</p>
+ <p>If the token has an attribute called "action", set the <code
+ title="attr-fs-action">action</code> attribute on the resulting <code>form</code> element to the
+ value of the "action" attribute of the token.</p>
<!-- fake <hr> -->
<p><span>Insert an HTML element</span> for an "hr" start tag token with no attributes.
@@ -102074,8 +101864,8 @@
<p><span>Insert an HTML element</span> for a "label" start tag token with no attributes.</p>
<!-- fake text -->
- <p><span title="insert a character">Insert characters</span> (see below for <span title="attr-isindex-prompt">what they should
- say</span>).</p>
+ <p><span title="insert a character">Insert characters</span> (see below for <span
+ title="attr-isindex-prompt">what they should say</span>).</p>
<!-- fake <input> -->
<p><span>Insert an HTML element</span> for an "input" start tag token with all the attributes
@@ -102086,8 +101876,8 @@
the <span>stack of open elements</span>.</p>
<!-- fake text -->
- <p><span title="insert a character">Insert more characters</span> (see below for <span title="attr-isindex-prompt">what they
- should say</span>).</p>
+ <p><span title="insert a character">Insert more characters</span> (see below for <span
+ title="attr-isindex-prompt">what they should say</span>).</p>
<!-- fake </label> -->
<p>Pop the <span>current node</span> (which will be the <code>label</code> element created
@@ -102103,13 +101893,12 @@
title="form">form</code> element pointer</span> to null.</p>
<!-- explanation of text -->
- <p><dfn title="attr-isindex-prompt"><strong>Prompt</strong></dfn>: If the token has an attribute with the name "prompt", then the
- first stream of characters must be the same string as given in
- that attribute, and the second stream of characters must be
- empty. Otherwise, the two streams of character tokens together
- should, together with the <code>input</code> element, express the
- equivalent of "This is a searchable index. Enter search keywords:
- (input field)" in the user's preferred language.</p>
+ <p><dfn title="attr-isindex-prompt"><strong>Prompt</strong></dfn>: If the token has an attribute
+ with the name "prompt", then the first stream of characters must be the same string as given in
+ that attribute, and the second stream of characters must be empty. Otherwise, the two streams of
+ character tokens together should, together with the <code>input</code> element, express the
+ equivalent of "This is a searchable index. Enter search keywords: (input field)" in the user's
+ preferred language.</p>
</dd>
@@ -102120,27 +101909,23 @@
<ol>
- <li><p><span>Insert an HTML element</span> for the
- token.</p></li>
+ <li><p><span>Insert an HTML element</span> for the token.</p></li>
- <li><p>If the <span>next token</span> is a U+000A LINE FEED (LF) character
- token, then ignore that token and move on to the next
- one. (Newlines at the start of <code>textarea</code> elements are
- ignored as an authoring convenience.)</p></li>
+ <li><p>If the <span>next token</span> is a U+000A LINE FEED (LF) character token, then ignore
+ that token and move on to the next one. (Newlines at the start of <code>textarea</code>
+ elements are ignored as an authoring convenience.)</p></li>
<!-- see comment in <pre> start tag bit -->
- <li><p>Switch the tokenizer to the <span>RCDATA
- state</span>.</p></li>
+ <li><p>Switch the tokenizer to the <span>RCDATA state</span>.</p></li>
- <li><p>Let the <span>original insertion mode</span> be the
- current <span>insertion mode</span>.</p>
+ <li><p>Let the <span>original insertion mode</span> be the current <span>insertion
+ mode</span>.</p>
- <li><p>Set the <span>frameset-ok flag</span> to "not
- ok".</p></li>
+ <li><p>Set the <span>frameset-ok flag</span> to "not ok".</p></li>
- <li><p>Switch the <span>insertion mode</span> to "<span
- title="insertion mode: text">text</span>".</p></li>
+ <li><p>Switch the <span>insertion mode</span> to "<span title="insertion mode:
+ text">text</span>".</p></li>
</ol>
@@ -102149,12 +101934,11 @@
<dt>A start tag whose tag name is "xmp"</dt>
<dd>
- <p>If the <span>stack of open elements</span> <span title="has
- an element in button scope">has a <code>p</code> element in button
- scope</span>, then <span>close a <code>p</code> element</span>.</p>
+ <p>If the <span>stack of open elements</span> <span title="has an element in button scope">has a
+ <code>p</code> element in button scope</span>, then <span>close a <code>p</code>
+ element</span>.</p>
- <p><span>Reconstruct the active formatting elements</span>, if
- any.</p>
+ <p><span>Reconstruct the active formatting elements</span>, if any.</p>
<p>Set the <span>frameset-ok flag</span> to "not ok".</p>
@@ -102182,34 +101966,29 @@
<dt>A start tag whose tag name is "select"</dt>
<dd>
- <p><span>Reconstruct the active formatting elements</span>, if
- any.</p>
+ <p><span>Reconstruct the active formatting elements</span>, if any.</p>
<p><span>Insert an HTML element</span> for the token.</p>
<p>Set the <span>frameset-ok flag</span> to "not ok".</p>
- <p>If the <span>insertion mode</span> is one of "<span
- title="insertion mode: in table">in table</span>", "<span
- title="insertion mode: in caption">in caption</span>", "<span
- title="insertion mode: in table body">in table body</span>",
- "<span title="insertion mode: in row">in row</span>", or "<span
- title="insertion mode: in cell">in cell</span>", then switch the
- <span>insertion mode</span> to "<span title="insertion mode: in
- select in table">in select in table</span>". Otherwise, switch the
- <span>insertion mode</span> to "<span title="insertion mode: in
- select">in select</span>".</p>
+ <p>If the <span>insertion mode</span> is one of "<span title="insertion mode: in table">in
+ table</span>", "<span title="insertion mode: in caption">in caption</span>", "<span
+ title="insertion mode: in table body">in table body</span>", "<span title="insertion mode: in
+ row">in row</span>", or "<span title="insertion mode: in cell">in cell</span>", then switch the
+ <span>insertion mode</span> to "<span title="insertion mode: in select in table">in select in
+ table</span>". Otherwise, switch the <span>insertion mode</span> to "<span title="insertion
+ mode: in select">in select</span>".</p>
</dd>
<dt>A start tag whose tag name is one of: "optgroup", "option"</dt>
<dd>
- <p>If the <span>current node</span> is an <code>option</code>
- element, then pop the <span>current node</span> off the <span>stack of open elements</span>.</p>
+ <p>If the <span>current node</span> is an <code>option</code> element, then pop the
+ <span>current node</span> off the <span>stack of open elements</span>.</p>
- <p><span>Reconstruct the active formatting elements</span>, if
- any.</p>
+ <p><span>Reconstruct the active formatting elements</span>, if any.</p>
<p><span>Insert an HTML element</span> for the token.</p>
@@ -102240,11 +102019,10 @@
-->
- <p>If the <span>stack of open elements</span> <span title="has an
- element in scope">has a <code>ruby</code> element in scope</span>,
- then <span>generate implied end tags</span>. If the <span>current
- node</span> is not then a <code>ruby</code> element, this is a
- <span>parse error</span>.</p>
+ <p>If the <span>stack of open elements</span> <span title="has an element in scope">has a
+ <code>ruby</code> element in scope</span>, then <span>generate implied end tags</span>. If the
+ <span>current node</span> is not then a <code>ruby</code> element, this is a <span>parse
+ error</span>.</p>
<p><span>Insert an HTML element</span> for the token.</p>
@@ -102253,85 +102031,74 @@
<dt>A start tag whose tag name is "math"</dt>
<dd>
- <p><span>Reconstruct the active formatting elements</span>, if
- any.</p>
+ <p><span>Reconstruct the active formatting elements</span>, if any.</p>
- <p><span>Adjust MathML attributes</span> for the token. (This
- fixes the case of MathML attributes that are not all
- lowercase.)</p>
+ <p><span>Adjust MathML attributes</span> for the token. (This fixes the case of MathML
+ attributes that are not all lowercase.)</p>
- <p><span>Adjust foreign attributes</span> for the token. (This
- fixes the use of namespaced attributes, in particular XLink.)</p>
+ <p><span>Adjust foreign attributes</span> for the token. (This fixes the use of namespaced
+ attributes, in particular XLink.)</p>
- <p><span>Insert a foreign element</span> for the token, in the
- <span>MathML namespace</span>.</p>
+ <p><span>Insert a foreign element</span> for the token, in the <span>MathML
+ namespace</span>.</p>
- <!-- If we ever change the frameset-ok flag to an insertion mode,
- the following change would be implied, except we'd have to do it
- even in the face of a self-closed tag:
+ <!-- If we ever change the frameset-ok flag to an insertion mode, the following change would be
+ implied, except we'd have to do it even in the face of a self-closed tag:
<p>Set the <span>frameset-ok flag</span> to "not ok".</p>
-->
- <p>If the token has its <i>self-closing flag</i> set, pop the
- <span>current node</span> off the <span>stack of open
- elements</span> and <span title="acknowledge self-closing
- flag">acknowledge the token's <i>self-closing flag</i></span>.</p>
+ <p>If the token has its <i>self-closing flag</i> set, pop the <span>current node</span> off the
+ <span>stack of open elements</span> and <span title="acknowledge self-closing flag">acknowledge
+ the token's <i>self-closing flag</i></span>.</p>
</dd>
<dt>A start tag whose tag name is "svg"</dt>
<dd>
- <p><span>Reconstruct the active formatting elements</span>, if
- any.</p>
+ <p><span>Reconstruct the active formatting elements</span>, if any.</p>
- <p><span>Adjust SVG attributes</span> for the token. (This fixes
- the case of SVG attributes that are not all lowercase.)</p>
+ <p><span>Adjust SVG attributes</span> for the token. (This fixes the case of SVG attributes that
+ are not all lowercase.)</p>
- <p><span>Adjust foreign attributes</span> for the token. (This
- fixes the use of namespaced attributes, in particular XLink in
- SVG.)</p>
+ <p><span>Adjust foreign attributes</span> for the token. (This fixes the use of namespaced
+ attributes, in particular XLink in SVG.)</p>
- <p><span>Insert a foreign element</span> for the token, in the
- <span>SVG namespace</span>.</p>
+ <p><span>Insert a foreign element</span> for the token, in the <span>SVG namespace</span>.</p>
- <!-- If we ever change the frameset-ok flag to an insertion mode,
- the following change would be implied, except we'd have to do it
- even in the face of a self-closed tag:
+ <!-- If we ever change the frameset-ok flag to an insertion mode, the following change would be
+ implied, except we'd have to do it even in the face of a self-closed tag:
<p>Set the <span>frameset-ok flag</span> to "not ok".</p>
-->
- <p>If the token has its <i>self-closing flag</i> set, pop the
- <span>current node</span> off the <span>stack of open
- elements</span> and <span title="acknowledge self-closing
- flag">acknowledge the token's <i>self-closing flag</i></span>.</p>
+ <p>If the token has its <i>self-closing flag</i> set, pop the <span>current node</span> off the
+ <span>stack of open elements</span> and <span title="acknowledge self-closing flag">acknowledge
+ the token's <i>self-closing flag</i></span>.</p>
</dd>
- <dt>A start <!--or end--> tag whose tag name is one of: "caption",
- "col", "colgroup", "frame", "head", "tbody", "td", "tfoot", "th",
- "thead", "tr"</dt>
- <!--<dt>An end tag whose tag name is one of: "area", "base",
- "basefont", "bgsound", "embed", "hr", "iframe", "image", "img",
- "input", "isindex", "keygen", "link", "menuitem", "meta", "noembed",
- "noframes", "param", "script", "select", "source", "style",
- "table", "textarea", "title", "track", "wbr"</dt>-->
- <!--<dt>An end tag whose tag name is "noscript", if the
- <span>scripting flag</span> is enabled</dt>-->
+ <dt>A start <!--or end--> tag whose tag name is one of: "caption", "col", "colgroup", "frame",
+ "head", "tbody", "td", "tfoot", "th", "thead", "tr"</dt>
+ <!--<dt>An end tag whose tag name is one of: "area", "base", "basefont", "bgsound", "embed",
+ "hr", "iframe", "image", "img", "input", "isindex", "keygen", "link", "menuitem", "meta",
+ "noembed", "noframes", "param", "script", "select", "source", "style", "table", "textarea",
+ "title", "track", "wbr"</dt>-->
+ <!--<dt>An end tag whose tag name is "noscript", if the <span>scripting flag</span> is
+ enabled</dt>-->
<dd>
+
<p><span>Parse error</span>. Ignore the token.</p>
- <!-- end tags are commented out because since they can never end
- up on the stack anyway, the default end tag clause will
- automatically handle them. we don't want to have text in the spec
- that is just an optimisation, as that detracts from the spec
- itself -->
+
+ <!-- end tags are commented out because since they can never end up on the stack anyway, the
+ default end tag clause will automatically handle them. we don't want to have text in the spec
+ that is just an optimisation, as that detracts from the spec itself -->
+
</dd>
<dt>Any other start tag</dt>
<dd>
- <p><span>Reconstruct the active formatting elements</span>, if
- any.</p>
+ <p><span>Reconstruct the active formatting elements</span>, if any.</p>
<p><span>Insert an HTML element</span> for the token.</p>
@@ -102347,35 +102114,33 @@
<ol>
- <li><p>Initialize <var title="">node</var> to be the <span>current
- node</span> (the bottommost node of the stack).</p></li>
+ <li><p>Initialize <var title="">node</var> to be the <span>current node</span> (the bottommost
+ node of the stack).</p></li>
- <li><p><i>Loop</i>: If <var title="">node</var> is an <span title="HTML elements">HTML element</span> with the same tag
- name as the token, then:</p>
+ <li><p><i>Loop</i>: If <var title="">node</var> is an <span title="HTML elements">HTML
+ element</span> with the same tag name as the token, then:</p>
<ol>
- <li><p><span>Generate implied end tags</span>, except
- for <span>HTML elements</span> with the same tag name as the token.</p></li>
+ <li><p><span>Generate implied end tags</span>, except for <span>HTML elements</span> with the
+ same tag name as the token.</p></li>
- <li><p>If the tag name of the end tag token does not match
- the tag name of the <span>current node</span>, or if it is not an <span title="HTML elements">HTML element</span>, then this is a
- <span>parse error</span>.</p></li>
+ <li><p>If the tag name of the end tag token does not match the tag name of the <span>current
+ node</span>, or if it is not an <span title="HTML elements">HTML element</span>, then this is
+ a <span>parse error</span>.</p></li>
- <li><p>Pop all the nodes from the <span>current node</span> up
- to <var title="">node</var>, including <var
- title="">node</var>, then stop these steps.</p></li>
+ <li><p>Pop all the nodes from the <span>current node</span> up to <var title="">node</var>,
+ including <var title="">node</var>, then stop these steps.</p></li>
</ol>
</li>
- <li><p>Otherwise, if <var title="">node</var> is in the
- <span>special</span> category, then this is a <span>parse
- error</span>; ignore the token, and abort these steps.</p></li>
+ <li><p>Otherwise, if <var title="">node</var> is in the <span>special</span> category, then
+ this is a <span>parse error</span>; ignore the token, and abort these steps.</p></li>
- <li><p>Set <var title="">node</var> to the previous entry in the
- <span>stack of open elements</span>.</p></li>
+ <li><p>Set <var title="">node</var> to the previous entry in the <span>stack of open
+ elements</span>.</p></li>
<li><p>Return to the step labeled <i>loop</i>.</p></li>
@@ -102400,136 +102165,108 @@
</ol>
- <p id="adoptionAgency">The <dfn>adoption agency algorithm</dfn>, which takes as its only argument a tag name <var
- title="">subject</var> for which the algorithm is being run, consists of the following steps:</p>
+ <p id="adoptionAgency">The <dfn>adoption agency algorithm</dfn>, which takes as its only argument
+ a tag name <var title="">subject</var> for which the algorithm is being run, consists of the
+ following steps:</p>
-<!--CLEANUP-->
<ol>
- <li><p>Let <var title="">outer loop counter</var> be
- zero.</p></li>
+ <li><p>Let <var title="">outer loop counter</var> be zero.</p></li>
- <li><p><i>Outer loop</i>: If <var title="">outer loop
- counter</var> is greater than or equal to eight, then abort these
- steps.</p></li>
+ <li><p><i>Outer loop</i>: If <var title="">outer loop counter</var> is greater than or equal to
+ eight, then abort these steps.</p></li>
- <li><p>Increment <var title="">outer loop counter</var> by
- one.</p></li>
+ <li><p>Increment <var title="">outer loop counter</var> by one.</p></li>
<li>
- <p>Let the <var title="">formatting element</var> be the last
- element in the <span>list of active formatting elements</span>
- that:</p>
+ <p>Let the <var title="">formatting element</var> be the last element in the <span>list of
+ active formatting elements</span> that:</p>
<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>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 tag name <var title="">subject</var>.</li>
</ul>
- <p>If there is no such node, then abort these steps and instead
- act as described in the "any other end tag" entry below.</p>
+ <p>If there is no such node, then abort these steps and instead act as described in the "any
+ other end tag" entry below.</p>
- <p>Otherwise, if there is such a node, but that node is not
- in the <span>stack of open elements</span>, then this is a
- <span>parse error</span>; remove the element from the list,
- and abort these steps.</p>
+ <p>Otherwise, if there is such a node, but that node is not in the <span>stack of open
+ elements</span>, then this is a <span>parse error</span>; remove the element from the list, and
+ abort these steps.</p>
- <p>Otherwise, if there is such a node, and that node is also in
- the <span>stack of open elements</span>, but the element is not
- <span title="has an element in scope">in scope</span>, then this
- is a <span>parse error</span>; abort these
- steps.</p>
+ <p>Otherwise, if there is such a node, and that node is also in the <span>stack of open
+ elements</span>, but the element is not <span title="has an element in scope">in scope</span>,
+ then this is a <span>parse error</span>; abort these steps.</p>
- <p>Otherwise, there is a <var title="">formatting
- element</var> and that element is in <span title="stack of
- open elements">the stack</span> and is <span title="has an
- element in scope">in scope</span>. If the element is not the
- <span>current node</span>, this is a <span>parse
- error</span>. In any case, proceed with the algorithm as
- written in the following steps.</p>
+ <p>Otherwise, there is a <var title="">formatting element</var> and that element is in <span
+ title="stack of open elements">the stack</span> and is <span title="has an element in scope">in
+ scope</span>. If the element is not the <span>current node</span>, this is a <span>parse
+ error</span>. In any case, proceed with the algorithm as written in the following steps.</p>
</li>
- <li><p>Let the <var title="">furthest block</var> be the topmost
- node in the <span>stack of open elements</span> that is lower in
- the stack than the <var title="">formatting element</var>, and is
- an element in the <span>special</span> category. There might not
- be one.</p></li>
+ <li><p>Let the <var title="">furthest block</var> be the topmost node in the <span>stack of open
+ elements</span> that is lower in the stack than the <var title="">formatting element</var>, and
+ is an element in the <span>special</span> category. There might not be one.</p></li>
- <li><p>If there is no <var title="">furthest block</var>, then
- the UA must first pop all the nodes from the bottom of the
- <span>stack of open elements</span>, from the <span>current
- node</span> up to and including the <var title="">formatting
- element</var>, then remove the <var title="">formatting
- element</var> from the <span>list of active formatting
- elements</span>, and finally abort these steps.</p></li>
+ <li><p>If there is no <var title="">furthest block</var>, then the UA must first pop all the
+ nodes from the bottom of the <span>stack of open elements</span>, from the <span>current
+ node</span> up to and including the <var title="">formatting element</var>, then remove the <var
+ title="">formatting element</var> from the <span>list of active formatting elements</span>, and
+ finally abort these steps.</p></li>
- <li><p>Let the <var title="">common ancestor</var> be the element
- immediately above the <var title="">formatting element</var> in the
- <span>stack of open elements</span>.</p></li>
+ <li><p>Let the <var title="">common ancestor</var> be the element immediately above the <var
+ title="">formatting element</var> in the <span>stack of open elements</span>.</p></li>
- <li><p>Let a bookmark note the position of the <var
- title="">formatting element</var> in the <span>list of active
- formatting elements</span> relative to the elements on either
- side of it in the list.</p></li>
+ <li><p>Let a bookmark note the position of the <var title="">formatting element</var> in the
+ <span>list of active formatting elements</span> relative to the elements on either side of it in
+ the list.</p></li>
<li>
- <p>Let <var title="">node</var> and <var title="">last node</var> be the <var
- title="">furthest block</var>. Follow these steps:</p>
+ <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><p>Let <var title="">inner loop counter</var> be zero.</p></li>
- <li><p><i>Inner loop</i>: If <var title="">inner loop counter</var> is greater than or equal
- to three, then go to the next step in the overall algorithm.</p></li>
+ <li><p><i>Inner loop</i>: If <var title="">inner loop counter</var> is greater than or equal to
+ three, then go to the next step in the overall algorithm.</p></li>
<li><p>Increment <var title="">inner loop counter</var> by one.</p></li>
- <li>Let <var title="">node</var> be the element immediately
- above <var title="">node</var> in the <span>stack of open
- elements</span>, or if <var title="">node</var> is no longer in
- the <span>stack of open elements</span> (e.g. because it got
- removed by the next step), the element that was immediately
- above <var title="">node</var> in the <span>stack of open
- elements</span> before <var title="">node</var> was
- removed.</li>
+ <li>Let <var title="">node</var> be the element immediately above <var title="">node</var> in
+ the <span>stack of open elements</span>, or if <var title="">node</var> is no longer in the
+ <span>stack of open elements</span> (e.g. because it got removed by the next step), the element
+ that was immediately above <var title="">node</var> in the <span>stack of open elements</span>
+ before <var title="">node</var> was removed.</li>
- <li>If <var title="">node</var> is not in the <span>list of
- active formatting elements</span>, then remove <var
- title="">node</var> from the <span>stack of open
- elements</span> and then go back to the step labeled <i>inner
- loop</i>.</li>
+ <li>If <var title="">node</var> is not in the <span>list of active formatting elements</span>,
+ then remove <var title="">node</var> from the <span>stack of open elements</span> and then go
+ back to the step labeled <i>inner loop</i>.</li>
- <li>Otherwise, if <var title="">node</var> is the <var
- title="">formatting element</var>, then go to the next step
- in the overall algorithm.</li>
+ <li>Otherwise, if <var title="">node</var> is the <var title="">formatting element</var>, then
+ go to the next step in the overall algorithm.</li>
- <li><span>Create an element for the token</span> for which the
- element <var title="">node</var> was created, with <var title="">common ancestor</var> as the intended parent; replace the entry
- for <var title="">node</var> in the <span>list of active
- formatting elements</span> with an entry for the new element,
- replace the entry for <var title="">node</var> in the
- <span>stack of open elements</span> with an entry for the new
- element, and let <var title="">node</var> be the new
- element.</li>
+ <li><span>Create an element for the token</span> for which the element <var title="">node</var>
+ was created, with <var title="">common ancestor</var> as the intended parent; replace the entry
+ for <var title="">node</var> in the <span>list of active formatting elements</span> with an
+ entry for the new element, replace the entry for <var title="">node</var> in the <span>stack of
+ open elements</span> with an entry for the new element, and let <var title="">node</var> be the
+ new element.</li>
- <li>If <var title="">last node</var> is the <var
- title="">furthest block</var>, then move the aforementioned
- bookmark to be immediately after the new <var
- title="">node</var> in the <span>list of active formatting
- elements</span>.</li>
+ <li>If <var title="">last node</var> is the <var title="">furthest block</var>, then move the
+ aforementioned bookmark to be immediately after the new <var title="">node</var> in the
+ <span>list of active formatting elements</span>.</li>
- <li>Insert <var title="">last node</var> into <var
- title="">node</var>, first removing it from its previous
- parent node if any.</li>
+ <li>Insert <var title="">last node</var> into <var title="">node</var>, first removing it from
+ its previous parent node if any.</li>
<li>Let <var title="">last node</var> be <var title="">node</var>.</li>
@@ -102539,32 +102276,26 @@
</li>
- <li><p>Insert whatever <var title="">last node</var> ended up being in the previous step at the <span>appropriate
- place for inserting a node</span>, but using <var
- title="">common ancestor</var> as the <i>override target</i>.</p></li>
+ <li><p>Insert whatever <var title="">last node</var> ended up being in the previous step at the
+ <span>appropriate place for inserting a node</span>, but using <var title="">common
+ ancestor</var> as the <i>override target</i>.</p></li>
- <li><p><span>Create an element for the token</span> for which the
- <var title="">formatting element</var> was created, with <var title="">furthest
- block</var> as the intended parent.</p></li>
+ <li><p><span>Create an element for the token</span> for which the <var title="">formatting
+ element</var> was created, with <var title="">furthest block</var> as the intended
+ parent.</p></li>
- <li><p>Take all of the child nodes of the <var title="">furthest
- block</var> and append them to the element created in the last
- step.</p></li>
+ <li><p>Take all of the child nodes of the <var title="">furthest block</var> and append them to
+ the element created in the last step.</p></li>
- <li><p>Append that new element to the <var title="">furthest
- block</var>.</p></li>
+ <li><p>Append that new element to the <var title="">furthest block</var>.</p></li>
- <li><p>Remove the <var title="">formatting element</var> from the
- <span>list of active formatting elements</span>, and insert the
- new element into the <span>list of active formatting
- elements</span> at the position of the aforementioned
- bookmark.</p></li>
+ <li><p>Remove the <var title="">formatting element</var> from the <span>list of active formatting
+ elements</span>, and insert the new element into the <span>list of active formatting
+ elements</span> at the position of the aforementioned bookmark.</p></li>
- <li><p>Remove the <var title="">formatting element</var> from the
- <span>stack of open elements</span>, and insert the new element
- into the <span>stack of open elements</span> immediately below
- the position of the <var title="">furthest block</var> in that
- stack.</p></li>
+ <li><p>Remove the <var title="">formatting element</var> from the <span>stack of open
+ elements</span>, and insert the new element into the <span>stack of open elements</span>
+ immediately below the position of the <var title="">furthest block</var> in that stack.</p></li>
<li><p>Jump back to the step labeled <i>outer loop</i>.</p></li>
More information about the Commit-Watchers
mailing list